12#ifndef STEER_DIGITIZERWORKFLOW_SRC_MCTRUTHREADERSPEC_H_
13#define STEER_DIGITIZERWORKFLOW_SRC_MCTRUTHREADERSPEC_H_
42 LOG(info) <<
"Initializing MCTruth reader ";
50 LOG(info) <<
"Running MCTruth reader ";
51 auto labelfilename = pc.
inputs().
get<TString*>(
"trigger");
52 LOG(info) <<
"Opening file " << labelfilename->Data();
53 TFile
f(labelfilename->Data(),
"OPEN");
54 auto tree = (TTree*)
f.Get(
"o2sim");
55 auto br =
tree->GetBranch(
"Labels");
60 br->SetAddress(&iocontainer);
70 br->SetAddress(&mccontainer);
73 LOG(info) <<
"MCCONTAINER CHECK" << mccontainer;
85 bool mFinished =
false;
91 std::vector<InputSpec> inputs;
93 inputs.emplace_back(
"trigger",
"TST",
"TRIGGERREAD", 0, Lifetime::Timeframe);
97 Outputs{{
"TST",
"LABELS2", 0, Lifetime::Timeframe}},
A const (ready only) version of MCTruthContainer.
A special IO container - splitting a given vector to enable ROOT IO.
void run(framework::ProcessingContext &pc) override
MCTruthReaderTask(bool newmctruth)
void init(framework::InitContext &ic) override
void snapshot(const Output &spec, T const &object)
decltype(auto) make(const Output &spec, Args... args)
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
InputRecord & inputs()
The inputs associated with this processing context.
ServiceRegistryRef services()
The services registry associated with this processing context.
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< OutputSpec > Outputs
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::framework::DataProcessorSpec getMCTruthReaderSpec(bool newmctruth)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::unique_ptr< TTree > tree((TTree *) flIn.Get(std::string(o2::base::NameConf::CTFTREENAME).c_str()))