34 LOG(info) <<
"Starting ClusterizerSpec::run() ";
35 LOG(
debug) <<
"CPVClusterizer - run on digits called";
38 static bool isConfigFetched =
false;
39 if (!isConfigFetched) {
40 LOG(info) <<
"ClusterizerSpec::run() : fetching o2::cpv::CPVSimParams from CCDB";
42 LOG(info) <<
"ClusterizerSpec::run() : o2::cpv::CPVSimParams::Instance() now is following:";
44 isConfigFetched =
true;
47 auto digits = ctx.inputs().get<std::vector<Digit>>(
"digits");
50 LOG(info) <<
"ClusterizerSpec::run() : no digits; moving on";
51 mOutputClusters.clear();
53 mOutputClusterTrigRecs.clear();
58 mOutputTruthCont.
clear();
63 auto digitsTR = ctx.inputs().get<std::vector<o2::cpv::TriggerRecord>>(
"digitTriggerRecords");
69 mClusterizer.
process(
digits, digitsTR, truthcont.get(), &mOutputClusters, &mOutputClusterTrigRecs, &mOutputTruthCont, &mCalibDigits);
71 mClusterizer.
process(
digits, digitsTR,
nullptr, &mOutputClusters, &mOutputClusterTrigRecs, &mOutputTruthCont, &mCalibDigits);
74 LOG(
debug) <<
"CPVClusterizer::run() : Received " << digitsTR.size() <<
" TR, calling clusterizer ...";
82 LOG(info) <<
"Finished, wrote " << mOutputClusters.size() <<
" clusters, " << mOutputClusterTrigRecs.size() <<
"TR and " << mOutputTruthCont.
getIndexedSize() <<
" Labels";
86 std::vector<o2::framework::InputSpec> inputs;
87 std::vector<o2::framework::OutputSpec> outputs;
88 inputs.emplace_back(
"simparams",
"CPV",
"CPV_SimPars", 0, o2::framework::Lifetime::Condition,
o2::framework::ccdbParamSpec(
"CPV/Config/CPVSimParams"));
92 inputs.emplace_back(
"digitsmctr",
"CPV",
"DIGITSMCTR", 0, o2::framework::Lifetime::Timeframe);
94 outputs.emplace_back(
"CPV",
"CLUSTERS", 0, o2::framework::Lifetime::Timeframe);
95 outputs.emplace_back(
"CPV",
"CLUSTERTRIGRECS", 0, o2::framework::Lifetime::Timeframe);
97 outputs.emplace_back(
"CPV",
"CLUSTERTRUEMC", 0, o2::framework::Lifetime::Timeframe);
99 outputs.emplace_back(
"CPV",
"CALIBDIGITS", 0, o2::framework::Lifetime::Timeframe);
104 o2::framework::adaptFromTask<o2::cpv::reco_workflow::ClusterizerSpec>(propagateMC)};
void process(gsl::span< const Digit > digits, gsl::span< const TriggerRecord > dtr, const o2::dataformats::MCTruthContainer< o2::MCCompLabel > *dmc, std::vector< Cluster > *clusters, std::vector< TriggerRecord > *trigRec, o2::dataformats::MCTruthContainer< o2::MCCompLabel > *cluMC, std::vector< Digit > *calibDigits)