33namespace globaltracking
 
   45  void connectTree(
const std::string& 
filename);
 
   47  std::unique_ptr<TFile> mFile;
 
   48  std::unique_ptr<TTree> mTree;
 
   49  std::string mFileName = 
"";
 
   50  std::vector<o2::dataformats::TrackTPCITS> mTracks, *mTracksPtr = &mTracks;
 
   51  std::vector<o2::itsmft::TrkClusRef> mABTrkClusRefs, *mABTrkClusRefsPtr = &mABTrkClusRefs;
 
   52  std::vector<int> mABTrkClIDs, *mABTrkClIDsPtr = &mABTrkClIDs;
 
   53  std::vector<o2::MCCompLabel> mLabels, *mLabelsPtr = &mLabels;
 
   54  std::vector<o2::MCCompLabel> mLabelsAB, *mLabelsABPtr = &mLabelsAB;
 
 
   60                                            ic.
options().
get<std::string>(
"itstpc-track-infile"));
 
   61  connectTree(mFileName);
 
 
   66  auto ent = mTree->GetReadEntry() + 1;
 
   67  assert(ent < mTree->GetEntries()); 
 
   69  LOG(info) << 
"Pushing " << mTracks.size() << 
" TPC-ITS matches at entry " << ent;
 
   79  if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {
 
 
   85void TrackTPCITSReader::connectTree(
const std::string& 
filename)
 
   88  mFile.reset(TFile::Open(
filename.c_str()));
 
   89  assert(mFile && !mFile->IsZombie());
 
   90  mTree.reset((TTree*)mFile->Get(
"matchTPCITS"));
 
   92  mTree->SetBranchAddress(
"TPCITS", &mTracksPtr);
 
   93  mTree->SetBranchAddress(
"TPCITSABRefs", &mABTrkClusRefsPtr);
 
   94  mTree->SetBranchAddress(
"TPCITSABCLID", &mABTrkClIDsPtr);
 
   96    mTree->SetBranchAddress(
"MatchMCTruth", &mLabelsPtr);
 
   97    mTree->SetBranchAddress(
"MatchABMCTruth", &mLabelsABPtr);
 
   99  LOG(info) << 
"Loaded tree from " << 
filename << 
" with " << mTree->GetEntries() << 
" entries";
 
  104  std::vector<OutputSpec> outputs;
 
  105  outputs.emplace_back(
"GLO", 
"TPCITS", 0, Lifetime::Timeframe);
 
  106  outputs.emplace_back(
"GLO", 
"TPCITSAB_REFS", 0, Lifetime::Timeframe); 
 
  107  outputs.emplace_back(
"GLO", 
"TPCITSAB_CLID", 0, Lifetime::Timeframe); 
 
  109    outputs.emplace_back(
"GLO", 
"TPCITS_MC", 0, Lifetime::Timeframe);
 
  110    outputs.emplace_back(
"GLO", 
"TPCITSAB_MC", 0, Lifetime::Timeframe); 
 
  114    "itstpc-track-reader",
 
  119      {
"itstpc-track-infile", VariantType::String, 
"o2match_itstpc.root", {
"Name of the input file"}},
 
  120      {
"input-dir", VariantType::String, 
"none", {
"Input directory"}}}};
 
 
Header of the General Run Parameters object.
Definition of the Names Generator class.
Type wrappers for enfording a specific serialization method.
Result of refitting TPC-ITS matched track.
Reference on ITS/MFT clusters set.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
ServiceRegistryRef services()
The services registry associated with this processing context.
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
TrackTPCITSReader(bool useMC)
void init(InitContext &ic) final
~TrackTPCITSReader() override=default
void run(ProcessingContext &pc) final
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
framework::DataProcessorSpec getTrackTPCITSReaderSpec(bool useMC)
create a processor spec
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static std::string rectifyDirectory(const std::string_view p)
static std::string concat_string(Ts const &... ts)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"