Skip to content

Commit 8fa04c5

Browse files
authored
Fix compatibility with vertexing change in O2 (#66)
- Printing compilation error
1 parent 73ba164 commit 8fa04c5

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

examples/aod/createO2tables.C

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ R__LOAD_LIBRARY(libDelphes)
22
R__LOAD_LIBRARY(libDelphesO2)
33

44
#include <algorithm> // std::shuffle
5-
#include <random> // std::default_random_engine
6-
#include <chrono> // std::chrono::system_clock
5+
#include <random> // std::default_random_engine
6+
#include <chrono> // std::chrono::system_clock
77

88
// ROOT includes
99
#include "TMath.h"
@@ -55,18 +55,16 @@ const bool do_vertexing = true;
5555
// Class to hold the information for the O2 vertexing
5656
class TrackAlice3 : public o2::track::TrackParCov
5757
{
58-
using timeEst = o2::dataformats::TimeStampWithError<float, float>;
58+
using TimeEst = o2::dataformats::TimeStampWithError<float, float>;
5959

6060
public:
6161
TrackAlice3() = default;
6262
~TrackAlice3() = default;
6363
TrackAlice3(const TrackAlice3& src) = default;
64-
TrackAlice3(const o2::track::TrackParCov& src, const float t = 0, const float te = 1, const int label = 0) : o2::track::TrackParCov(src), mTimeMUS{t, te}, mLabel{label} {}
65-
const timeEst& getTimeMUS() const { return mTimeMUS; }
64+
TrackAlice3(const o2::track::TrackParCov& src, const float t = 0, const float te = 1, const int label = 0) : o2::track::TrackParCov(src), timeEst{t, te}, mLabel{label} {}
65+
const TimeEst& getTimeMUS() const { return timeEst; }
6666
const int mLabel;
67-
68-
private:
69-
timeEst mTimeMUS; ///< time estimate in ns
67+
TimeEst timeEst; ///< time estimate in ns
7068
};
7169

7270
template <typename T>
@@ -426,7 +424,7 @@ int createO2tables(const char* inputFile = "delphes.root",
426424
idxVec.emplace_back(i, o2::dataformats::GlobalTrackID::ITS);
427425
}
428426
vertexer.setStartIR({0, 0});
429-
const int n_vertices = vertexer.process(gsl::span<const TrackAlice3>{tracks_for_vertexing},
427+
const int n_vertices = vertexer.process(tracks_for_vertexing,
430428
idxVec,
431429
gsl::span<o2::InteractionRecord>{bcData},
432430
vertices,

examples/scripts/createO2tables.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def copy_and_link(file_name):
353353
check_status=True)
354354
aod_file = f"AODRun5.{run_number}.root"
355355
aod_log_file = aod_file.replace(".root", ".log")
356-
write_to_runner(f"root -b -q -l 'createO2tables.C+(\"{delphes_file}\", \"{aod_file}\", 0)'",
356+
write_to_runner(f"root -l -b -q 'createO2tables.C+(\"{delphes_file}\", \"{aod_file}\", 0)'",
357357
log_file=aod_log_file,
358358
check_status=True)
359359
if not clean_delphes_files:
@@ -373,7 +373,7 @@ def copy_and_link(file_name):
373373
run_cmd("root -l -b -q 'createO2tables.C+(\"\")' > /dev/null 2>&1",
374374
comment="to compile the table creator only once, before running")
375375
if not os.path.isfile("createO2tables_C.so"):
376-
run_cmd("root -l -b -q 'createO2tables.C+(\"\")' 2>&1",
376+
run_cmd("root -l -b -q 'createO2tables.C+(\"\")'",
377377
comment="to compile with full log")
378378
fatal_msg("'createO2tables.C' did not compile!")
379379
total_processing_time = time.time()

0 commit comments

Comments
 (0)