39 LOG(info) <<
"Initializing MCTruth consumer " << mID;
47 LOG(info) <<
"Running MCTruth consumer " << mID;
48 TString labelfilename;
57 labelfilename =
"labels_new.root";
58 TFile
f(labelfilename.Data(),
"RECREATE");
59 TTree
tree(
"o2sim",
"o2sim");
60 auto br =
tree.Branch(
"Labels", &io);
74 labelfilename =
"labels_old.root";
75 TFile
f(labelfilename.Data(),
"RECREATE");
76 TTree
tree(
"o2sim",
"o2sim");
77 auto rawptr = labels.get();
78 auto br =
tree.Branch(
"Labels", &rawptr);
96 bool mFinished =
false;
104 std::vector<InputSpec> inputs;
107 inputs.emplace_back(
"labels2",
"TST",
"LABELS2", 0, Lifetime::Timeframe);
109 inputs.emplace_back(
"labels",
"TST",
"LABELS", 0, Lifetime::Timeframe);
111 std::stringstream
str;
112 str <<
"MCTruthWriter" <<
id;
114 std::vector<OutputSpec> outputs;
116 outputs.emplace_back(
"TST",
"TRIGGERREAD", 0, Lifetime::Timeframe);
122 AlgorithmSpec{adaptFromTask<MCTruthWriterTask>(
id, doio, newmctruth)},
A const (ready only) version of MCTruthContainer.
A special IO container - splitting a given vector to enable ROOT IO.
MCTruthWriterTask(int id, bool doio, bool newmctruth)
void run(framework::ProcessingContext &pc) override
void init(framework::InitContext &ic) override
void snapshot(const Output &spec, T const &object)
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
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::framework::DataProcessorSpec getMCTruthWriterSpec(int id, bool doio, 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()))