29 std::shared_ptr<o2::framework::RootTreeReader> reader;
38 ic.options().get<std::string>(
"infile"));
39 auto treename = ic.options().get<std::string>(
"treename");
40 auto dtbrName = ic.options().get<std::string>(config.
databranch.
option.c_str());
42 auto mcbrName = ic.options().get<std::string>(config.
mcbranch.
option.c_str());
43 auto nofEvents = ic.options().get<
int>(
"nevents");
46 auto processAttributes = std::make_shared<ProcessAttributes>();
49 using TriggerInputType = std::vector<o2::emcal::TriggerRecord>;
50 processAttributes->terminateOnEod = ic.options().get<
bool>(
"terminate-on-eod");
51 processAttributes->finished =
false;
54 processAttributes->reader = creator(treename.c_str(),
64 if (processAttributes->finished) {
68 auto publish = [&processAttributes, &pc, propagateMC]() {
69 if (processAttributes->reader->next()) {
70 (*processAttributes->reader)(pc);
72 processAttributes->reader.reset();
84 return processFunction;
87 auto createOutputSpecs = [&config, subspec, propagateMC]() {
88 std::vector<o2::framework::OutputSpec> outputSpecs;
92 outputSpecs.emplace_back(
o2::framework::OutputSpec{{
"output"}, dto.origin, dto.description, subspec, o2::framework::Lifetime::Timeframe});
93 outputSpecs.emplace_back(
o2::framework::OutputSpec{{
"outputTRG"}, tro.origin, tro.description, subspec, o2::framework::Lifetime::Timeframe});
95 outputSpecs.emplace_back(
o2::framework::OutputSpec{{
"outputMC"}, mco.origin, mco.description, subspec, o2::framework::Lifetime::Timeframe});
97 return std::move(outputSpecs);
106 {createOutputSpecs()},
std::function< std::shared_ptr< Reader >(const char *, const char *, int, Reader::PublishingMode, const char *, const char *, const char *)> Creator