Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Detectors/ITSMFT/common/workflow/src/ClusterReaderSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ void ClusterReader<N>::run(ProcessingContext& pc)
}
if (mUseMC) {
pc.outputs().snapshot(Output{Origin, "CLUSTERSMCTR", iLayer}, *mClusterMCTruth[iLayer]);
// read dummy MC2ROF vector to keep writer/readers backward compatible
static std::vector<o2::itsmft::MC2ROFRecord> dummyMC2ROF;
pc.outputs().snapshot(Output{Origin, "CLUSTERSMC2ROF", iLayer}, dummyMC2ROF);
}
}
if (mTriggerOut) {
Expand Down Expand Up @@ -141,6 +144,7 @@ std::vector<OutputSpec> makeOutChannels(o2::header::DataOrigin detOrig, bool mct
}
if (mctruth) {
outputs.emplace_back(detOrig, "CLUSTERSMCTR", iLayer, Lifetime::Timeframe);
outputs.emplace_back(detOrig, "CLUSTERSMC2ROF", iLayer, Lifetime::Timeframe);
}
}
if (triggerOut) {
Expand Down
6 changes: 6 additions & 0 deletions Detectors/ITSMFT/common/workflow/src/ClusterWriterSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ using CompClusType = std::vector<o2::itsmft::CompClusterExt>;
using PatternsType = std::vector<unsigned char>;
using ROFrameRType = std::vector<o2::itsmft::ROFRecord>;
using LabelsType = o2::dataformats::MCTruthContainer<o2::MCCompLabel>;
using ROFRecLblT = std::vector<o2::itsmft::MC2ROFRecord>;
using namespace o2::header;

template <int N>
Expand Down Expand Up @@ -105,6 +106,11 @@ DataProcessorSpec getClusterWriterSpec(bool useMC, bool doStag)
(detName + "ClusterMCTruth").c_str(), "cluster-label-branch",
(useMC ? nLayers : 0),
getIndex,
getName},
BranchDefinition<ROFRecLblT>{InputSpec{"MC2ROframes", ConcreteDataTypeMatcher{Origin, "CLUSTERSMC2ROF"}},
(detName + "ClustersMC2ROF").c_str(), "cluster-mc2rof-branch",
(useMC ? nLayers : 0),
getIndex,
getName})();
}

Expand Down
4 changes: 4 additions & 0 deletions Detectors/ITSMFT/common/workflow/src/ClustererSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ void ClustererDPL<N>::run(ProcessingContext& pc)

if (mUseMC) {
pc.outputs().snapshot(Output{Origin, "CLUSTERSMCTR", iLayer}, *clusterLabels); // at the moment requires snapshot
// write dummy MC2ROF vector to keep writer/readers backward compatible
static std::vector<o2::itsmft::MC2ROFRecord> dummyMC2ROF;
pc.outputs().snapshot(Output{Origin, "CLUSTERSMC2ROF", iLayer}, dummyMC2ROF);
}
reader.reset();

Expand Down Expand Up @@ -306,6 +309,7 @@ DataProcessorSpec getClustererSpec(bool useMC, bool doStag)
outputs.emplace_back(Origin, "CLUSTERSROF", iLayer, Lifetime::Timeframe);
if (useMC) {
outputs.emplace_back(Origin, "CLUSTERSMCTR", iLayer, Lifetime::Timeframe);
outputs.emplace_back(Origin, "CLUSTERSMC2ROF", iLayer, Lifetime::Timeframe);
}
}
return DataProcessorSpec{
Expand Down
4 changes: 4 additions & 0 deletions Detectors/ITSMFT/common/workflow/src/DigitReaderSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ void DigitReader<N>::run(ProcessingContext& pc)
mPLabels[iLayer]->copyandflatten(sharedlabels);
delete mPLabels[iLayer];
mPLabels[iLayer] = nullptr;
// read dummy MC2ROF vector to keep writer/readers backward compatible
static std::vector<o2::itsmft::MC2ROFRecord> dummyMC2ROF;
pc.outputs().snapshot(Output{Origin, "DIGITSMC2ROF", iLayer}, dummyMC2ROF);
}
}
if (mUseCalib) {
Expand Down Expand Up @@ -267,6 +270,7 @@ std::vector<OutputSpec> makeOutChannels(bool mctruth, bool doStag, bool useCalib
outputs.emplace_back(Origin, "DIGITS", iLayer, Lifetime::Timeframe);
outputs.emplace_back(Origin, "DIGITSROF", iLayer, Lifetime::Timeframe);
if (mctruth) {
outputs.emplace_back(Origin, "DIGITSMC2ROF", iLayer, Lifetime::Timeframe);
outputs.emplace_back(Origin, "DIGITSMCTR", iLayer, Lifetime::Timeframe);
}
}
Expand Down
5 changes: 5 additions & 0 deletions Detectors/ITSMFT/common/workflow/src/DigitWriterSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ DataProcessorSpec getDigitWriterSpec(bool mctruth, bool doStag, bool dec, bool c
fillLabels,
getIndex,
getName},
BranchDefinition<std::vector<itsmft::MC2ROFRecord>>{InputSpec{detStr + "_digitsMC2ROF", ConcreteDataTypeMatcher{Origin, "DIGITSMC2ROF"}},
detStr + "DigitMC2ROF", "digit-mc2rof-branch",
(mctruth ? mLayers : 0),
getIndex,
getName},
BranchDefinition<std::vector<itsmft::GBTCalibData>>{InputSpec{detStr + "calib", ConcreteDataTypeMatcher{Origin, "GBTCALIB"}},
detStr + "Calib", "digit-calib-branch",
(calib ? 1 : 0)})();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
bool doStag = o2::itsmft::DPLAlpideParamInitializer::isMFTStaggeringEnabled(cfgc);
wf.emplace_back(o2::itsmft::getMFTDigitReaderSpec(useMC, doStag, calib, withTriggers));
} else {
bool doStag = o2::itsmft::DPLAlpideParamInitializer::isMFTStaggeringEnabled(cfgc);
bool doStag = o2::itsmft::DPLAlpideParamInitializer::isITSStaggeringEnabled(cfgc);
wf.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, doStag, calib, withTriggers));
}
o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf);
Expand Down
4 changes: 4 additions & 0 deletions Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ class ITSMFTDPLDigitizerTask : BaseDPLDigitizer
// free space of existing label containers
mLabels[iLayer].clear_andfreememory();
mLabelsAccum[iLayer].clear_andfreememory();
// write dummy MC2ROF vector to keep writer/readers backward compatible
static std::vector<o2::itsmft::MC2ROFRecord> dummyMC2ROF;
pc.outputs().snapshot(Output{Origin, "DIGITSMC2ROF", iLayer}, dummyMC2ROF);
}
}

Expand Down Expand Up @@ -404,6 +407,7 @@ std::vector<OutputSpec> makeOutChannels(o2::header::DataOrigin detOrig, bool mct
outputs.emplace_back(detOrig, "DIGITS", iLayer, Lifetime::Timeframe);
outputs.emplace_back(detOrig, "DIGITSROF", iLayer, Lifetime::Timeframe);
if (mctruth) {
outputs.emplace_back(detOrig, "DIGITSMC2ROF", iLayer, Lifetime::Timeframe);
outputs.emplace_back(detOrig, "DIGITSMCTR", iLayer, Lifetime::Timeframe);
}
}
Expand Down
Loading