Skip to content

Commit 9929ef9

Browse files
committed
Remove default Lifetime::Timeframe when instanciating an Output
This lifetime field will be removed soon, and this is unambiguous, because it's in any case the default.
1 parent 6cbc5eb commit 9929ef9

File tree

196 files changed

+685
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+685
-688
lines changed

Detectors/AOD/src/AODMcProducerWorkflowSpec.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ void AODMcProducerWorkflowDPL::run(ProcessingContext& pc)
296296
TString ROOTVersion = ROOT_RELEASE;
297297
mMetaDataKeys = {"DataType", "Run", "O2Version", "ROOTVersion", "RecoPassName", "AnchorProduction", "AnchorPassName", "LPMProductionTag"};
298298
mMetaDataVals = {dataType, "3", O2Version, ROOTVersion, mRecoPass, mAnchorProd, mAnchorPass, mLPMProdTag};
299-
pc.outputs().snapshot(Output{"AMD", "AODMetadataKeys", 0, Lifetime::Timeframe}, mMetaDataKeys);
300-
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0, Lifetime::Timeframe}, mMetaDataVals);
299+
pc.outputs().snapshot(Output{"AMD", "AODMetadataKeys", 0}, mMetaDataKeys);
300+
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0}, mMetaDataVals);
301301
mIsMDSent = true;
302302
}
303303

304-
pc.outputs().snapshot(Output{"TFN", "TFNumber", 0, Lifetime::Timeframe}, tfNumber);
305-
pc.outputs().snapshot(Output{"TFF", "TFFilename", 0, Lifetime::Timeframe}, "");
304+
pc.outputs().snapshot(Output{"TFN", "TFNumber", 0}, tfNumber);
305+
pc.outputs().snapshot(Output{"TFF", "TFFilename", 0}, "");
306306

307307
pc.services().get<ControlService>().endOfStream();
308308
pc.services().get<ControlService>().readyToQuit(QuitRequest::Me);

Detectors/AOD/src/AODProducerWorkflowSpec.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,11 +2241,11 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
22412241
TString ROOTVersion = ROOT_RELEASE;
22422242
mMetaDataKeys = {"DataType", "Run", "O2Version", "ROOTVersion", "RecoPassName", "AnchorProduction", "AnchorPassName", "LPMProductionTag"};
22432243
mMetaDataVals = {dataType, "3", O2Version, ROOTVersion, mRecoPass, mAnchorProd, mAnchorPass, mLPMProdTag};
2244-
pc.outputs().snapshot(Output{"AMD", "AODMetadataKeys", 0, Lifetime::Timeframe}, mMetaDataKeys);
2245-
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0, Lifetime::Timeframe}, mMetaDataVals);
2244+
pc.outputs().snapshot(Output{"AMD", "AODMetadataKeys", 0}, mMetaDataKeys);
2245+
pc.outputs().snapshot(Output{"AMD", "AODMetadataVals", 0}, mMetaDataVals);
22462246

2247-
pc.outputs().snapshot(Output{"TFN", "TFNumber", 0, Lifetime::Timeframe}, tfNumber);
2248-
pc.outputs().snapshot(Output{"TFF", "TFFilename", 0, Lifetime::Timeframe}, "");
2247+
pc.outputs().snapshot(Output{"TFN", "TFNumber", 0}, tfNumber);
2248+
pc.outputs().snapshot(Output{"TFF", "TFFilename", 0}, "");
22492249

22502250
mTimer.Stop();
22512251
}

Detectors/CPV/calib/CPVCalibWorkflow/src/CPVBadMapCalibDevice.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void CPVBadMapCalibDevice::sendOutput(DataAllocator& output)
174174
output.snapshot(Output{o2::calibration::Utils::gDataOriginCDBWrapper, "CPV_BadChanMap", subSpec}, info);
175175
}
176176

177-
output.snapshot(o2::framework::Output{"CPV", "BADMAPCHANGE", 0, o2::framework::Lifetime::Timeframe}, mMapDiff);
177+
output.snapshot(o2::framework::Output{"CPV", "BADMAPCHANGE", 0}, mMapDiff);
178178
}
179179

180180
bool CPVBadMapCalibDevice::differFromCurrent()

Detectors/CPV/calib/CPVCalibWorkflow/src/CPVGainCalibDevice.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void CPVGainCalibDevice::sendOutput(DataAllocator& output)
143143
fout.Close();
144144
}
145145
// Anyway send change to QC
146-
output.snapshot(o2::framework::Output{"CPV", "GAINDIFF", 0, o2::framework::Lifetime::Timeframe}, mGainRatio);
146+
output.snapshot(o2::framework::Output{"CPV", "GAINDIFF", 0}, mGainRatio);
147147
}
148148

149149
void CPVGainCalibDevice::calculateGains()

Detectors/CPV/calib/CPVCalibWorkflow/src/CPVPedestalCalibDevice.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void CPVPedestalCalibDevice::sendOutput(DataAllocator& output)
118118
}
119119
// Anyway send change to QC
120120
LOG(info) << "[CPVPedestalCalibDevice - run] Writing ";
121-
output.snapshot(o2::framework::Output{"CPV", "PEDDIFF", 0, o2::framework::Lifetime::Timeframe}, mPedDiff);
121+
output.snapshot(o2::framework::Output{"CPV", "PEDDIFF", 0}, mPedDiff);
122122

123123
// Write pedestal distributions to calculate bad map
124124
std::string filename = mPath + "CPVPedestals.root";

Detectors/CPV/workflow/src/ClusterReaderSpec.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ void ClusterReader::run(ProcessingContext& pc)
4444
assert(ent < mTree->GetEntries()); // this should not happen
4545
mTree->GetEntry(ent);
4646
LOG(info) << "Pushing " << mClusters.size() << " Clusters in " << mTRs.size() << " TriggerRecords at entry " << ent;
47-
pc.outputs().snapshot(Output{mOrigin, "CLUSTERS", 0, Lifetime::Timeframe}, mClusters);
48-
pc.outputs().snapshot(Output{mOrigin, "CLUSTERTRIGRECS", 0, Lifetime::Timeframe}, mTRs);
47+
pc.outputs().snapshot(Output{mOrigin, "CLUSTERS", 0}, mClusters);
48+
pc.outputs().snapshot(Output{mOrigin, "CLUSTERTRIGRECS", 0}, mTRs);
4949
if (mUseMC) {
50-
pc.outputs().snapshot(Output{mOrigin, "CLUSTERTRUEMC", 0, Lifetime::Timeframe}, mMCTruth);
50+
pc.outputs().snapshot(Output{mOrigin, "CLUSTERTRUEMC", 0}, mMCTruth);
5151
}
5252

5353
if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {

Detectors/CPV/workflow/src/ClusterizerSpec.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ void ClusterizerSpec::run(framework::ProcessingContext& ctx)
4949
if (!digits.size()) { // nothing to process
5050
LOG(info) << "ClusterizerSpec::run() : no digits; moving on";
5151
mOutputClusters.clear();
52-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERS", 0, o2::framework::Lifetime::Timeframe}, mOutputClusters);
52+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERS", 0}, mOutputClusters);
5353
mOutputClusterTrigRecs.clear();
54-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRIGRECS", 0, o2::framework::Lifetime::Timeframe}, mOutputClusterTrigRecs);
54+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRIGRECS", 0}, mOutputClusterTrigRecs);
5555
mCalibDigits.clear();
56-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CALIBDIGITS", 0, o2::framework::Lifetime::Timeframe}, mCalibDigits);
56+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CALIBDIGITS", 0}, mCalibDigits);
5757
if (mPropagateMC) {
5858
mOutputTruthCont.clear();
59-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRUEMC", 0, o2::framework::Lifetime::Timeframe}, mOutputTruthCont);
59+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRUEMC", 0}, mOutputTruthCont);
6060
}
6161
return;
6262
}
@@ -73,12 +73,12 @@ void ClusterizerSpec::run(framework::ProcessingContext& ctx)
7373

7474
LOG(debug) << "CPVClusterizer::run() : Received " << digitsTR.size() << " TR, calling clusterizer ...";
7575

76-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERS", 0, o2::framework::Lifetime::Timeframe}, mOutputClusters);
77-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRIGRECS", 0, o2::framework::Lifetime::Timeframe}, mOutputClusterTrigRecs);
76+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERS", 0}, mOutputClusters);
77+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRIGRECS", 0}, mOutputClusterTrigRecs);
7878
if (mPropagateMC) {
79-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRUEMC", 0, o2::framework::Lifetime::Timeframe}, mOutputTruthCont);
79+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CLUSTERTRUEMC", 0}, mOutputTruthCont);
8080
}
81-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CALIBDIGITS", 0, o2::framework::Lifetime::Timeframe}, mCalibDigits);
81+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "CALIBDIGITS", 0}, mCalibDigits);
8282
LOG(info) << "Finished, wrote " << mOutputClusters.size() << " clusters, " << mOutputClusterTrigRecs.size() << "TR and " << mOutputTruthCont.getIndexedSize() << " Labels";
8383
}
8484
o2::framework::DataProcessorSpec o2::cpv::reco_workflow::getClusterizerSpec(bool propagateMC)

Detectors/CPV/workflow/src/DigitReaderSpec.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ void DigitReader::run(ProcessingContext& pc)
4444
assert(ent < mTree->GetEntries()); // this should not happen
4545
mTree->GetEntry(ent);
4646
LOG(info) << "Pushing " << mDigits.size() << " Digits in " << mTRs.size() << " TriggerRecords at entry " << ent;
47-
pc.outputs().snapshot(Output{mOrigin, "DIGITS", 0, Lifetime::Timeframe}, mDigits);
48-
pc.outputs().snapshot(Output{mOrigin, "DIGITTRIGREC", 0, Lifetime::Timeframe}, mTRs);
47+
pc.outputs().snapshot(Output{mOrigin, "DIGITS", 0}, mDigits);
48+
pc.outputs().snapshot(Output{mOrigin, "DIGITTRIGREC", 0}, mTRs);
4949
if (mUseMC) {
50-
pc.outputs().snapshot(Output{mOrigin, "DIGITSMCTR", 0, Lifetime::Timeframe}, mMCTruth);
50+
pc.outputs().snapshot(Output{mOrigin, "DIGITSMCTR", 0}, mMCTruth);
5151
}
5252

5353
if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {

Detectors/CPV/workflow/src/EntropyEncoderSpec.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void EntropyEncoderSpec::run(ProcessingContext& pc)
5454
if (mSelIR) {
5555
mCTFCoder.setSelectedIRFrames(pc.inputs().get<gsl::span<o2::dataformats::IRFrame>>("selIRFrames"));
5656
}
57-
auto& buffer = pc.outputs().make<std::vector<o2::ctf::BufferType>>(Output{"CPV", "CTFDATA", 0, Lifetime::Timeframe});
57+
auto& buffer = pc.outputs().make<std::vector<o2::ctf::BufferType>>(Output{"CPV", "CTFDATA", 0});
5858
auto iosize = mCTFCoder.encode(buffer, triggers, clusters);
5959
pc.outputs().snapshot({"ctfrep", 0}, iosize);
6060
if (mSelIR) {

Detectors/CPV/workflow/src/RawToDigitConverterSpec.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ void RawToDigitConverterSpec::run(framework::ProcessingContext& ctx)
136136
contDeadBeef == maxWarn ? fmt::format(". {} such inputs in row received, stopping reporting", contDeadBeef) : "");
137137
}
138138
mOutputDigits.clear();
139-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITS", 0, o2::framework::Lifetime::Timeframe}, mOutputDigits);
139+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITS", 0}, mOutputDigits);
140140
mOutputTriggerRecords.clear();
141-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITTRIGREC", 0, o2::framework::Lifetime::Timeframe}, mOutputTriggerRecords);
141+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITTRIGREC", 0}, mOutputTriggerRecords);
142142
mOutputHWErrors.clear();
143-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0, o2::framework::Lifetime::Timeframe}, mOutputHWErrors);
143+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0}, mOutputHWErrors);
144144
return; // empty TF, nothing to process
145145
}
146146
}
@@ -272,11 +272,11 @@ void RawToDigitConverterSpec::run(framework::ProcessingContext& ctx)
272272
if (skipTF) {
273273
// Send no digits
274274
mOutputDigits.clear();
275-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITS", 0, o2::framework::Lifetime::Timeframe}, mOutputDigits);
275+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITS", 0}, mOutputDigits);
276276
mOutputTriggerRecords.clear();
277-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITTRIGREC", 0, o2::framework::Lifetime::Timeframe}, mOutputTriggerRecords);
277+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITTRIGREC", 0}, mOutputTriggerRecords);
278278
// Send errors
279-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0, o2::framework::Lifetime::Timeframe}, mOutputHWErrors);
279+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0}, mOutputHWErrors);
280280
return;
281281
}
282282
}
@@ -305,9 +305,9 @@ void RawToDigitConverterSpec::run(framework::ProcessingContext& ctx)
305305
digitBuffer.clear();
306306

307307
LOG(info) << "[CPVRawToDigitConverter - run] Sending " << mOutputDigits.size() << " digits in " << mOutputTriggerRecords.size() << "trigger records.";
308-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITS", 0, o2::framework::Lifetime::Timeframe}, mOutputDigits);
309-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITTRIGREC", 0, o2::framework::Lifetime::Timeframe}, mOutputTriggerRecords);
310-
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0, o2::framework::Lifetime::Timeframe}, mOutputHWErrors);
308+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITS", 0}, mOutputDigits);
309+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "DIGITTRIGREC", 0}, mOutputTriggerRecords);
310+
ctx.outputs().snapshot(o2::framework::Output{"CPV", "RAWHWERRORS", 0}, mOutputHWErrors);
311311
}
312312
//_____________________________________________________________________________
313313
o2::framework::DataProcessorSpec o2::cpv::reco_workflow::getRawToDigitConverterSpec(bool askDISTSTF, bool isPedestal, bool useBadChannelMap, bool useGainCalibration)

0 commit comments

Comments
 (0)