34 LOG(warning) <<
"ZDC RecEvent reader at the moment does not process MC";
41 ic.
options().
get<std::string>(
"zdc-reco-infile"));
42 connectTree(mInputFileName);
47 auto ent = mTree->GetReadEntry() + 1;
48 assert(ent < mTree->GetEntries());
51 LOG(info) <<
"ZDC RecEventReader pushes " << mBCRecData->size() <<
" events with " << mBCRecData->size() <<
" energy, " << mZDCTDCData->size() <<
" TDC and " << mZDCInfo->size() <<
" info records at entry " << ent;
57 if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {
63void RecEventReader::connectTree(
const std::string&
filename)
67 mFile.reset(TFile::Open(
filename.c_str()));
68 assert(mFile && !mFile->IsZombie());
69 mTree.reset((TTree*)mFile->Get(mRecEventTreeName.c_str()));
72 mTree->SetBranchAddress(mBCRecDataBranchName.c_str(), &mBCRecData);
73 mTree->SetBranchAddress(mZDCEnergyBranchName.c_str(), &mZDCEnergy);
74 mTree->SetBranchAddress(mZDCTDCDataBranchName.c_str(), &mZDCTDCData);
75 mTree->SetBranchAddress(mZDCInfoBranchName.c_str(), &mZDCInfo);
77 LOG(warning) <<
"MC-truth is not supported for ZDC recpoints currently";
81 LOG(info) <<
"Loaded ZDC RecEvents tree from " <<
filename <<
" with " << mTree->GetEntries() <<
" entries";
86 std::vector<OutputSpec> outputs;
87 outputs.emplace_back(
"ZDC",
"BCREC", 0, Lifetime::Timeframe);
88 outputs.emplace_back(
"ZDC",
"ENERGY", 0, Lifetime::Timeframe);
89 outputs.emplace_back(
"ZDC",
"TDCDATA", 0, Lifetime::Timeframe);
90 outputs.emplace_back(
"ZDC",
"INFO", 0, Lifetime::Timeframe);
92 LOG(warning) <<
"MC-truth is not supported for ZDC RecEvents currently";
101 {
"zdc-reco-infile", VariantType::String,
"zdcreco.root", {
"Name of the input file"}},
102 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}}};
Definition of the Names Generator class.
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.
void run(ProcessingContext &pc) final
void init(InitContext &ic) final
RecEventReader(bool useMC=true)
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
framework::DataProcessorSpec getRecEventReaderSpec(bool useMC)
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"