Skip to content

Commit 64c0a90

Browse files
committed
digi out
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 8d80594 commit 64c0a90

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

Steer/DigitizerWorkflow/src/ITSMFTDigitizerSpec.cxx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <TChain.h>
3737
#include <TStopwatch.h>
3838
#include <string>
39+
#include <format>
3940

4041
using namespace o2::framework;
4142
using SubSpecificationType = o2::framework::DataAllocator::SubSpecificationType;
@@ -347,12 +348,30 @@ constexpr o2::header::DataOrigin MFTDPLDigitizerTask::DETOR;
347348

348349
std::vector<OutputSpec> makeOutChannels(o2::header::DataOrigin detOrig, bool mctruth)
349350
{
351+
using Param = o2::itsmft::DPLAlpideParam<ITSDPLDigitizerTask::DETID>;
350352
std::vector<OutputSpec> outputs;
351-
outputs.emplace_back(detOrig, "DIGITS", 0, Lifetime::Timeframe);
352-
outputs.emplace_back(detOrig, "DIGITSROF", 0, Lifetime::Timeframe);
353-
if (mctruth) {
354-
outputs.emplace_back(detOrig, "DIGITSMC2ROF", 0, Lifetime::Timeframe);
355-
outputs.emplace_back(detOrig, "DIGITSMCTR", 0, Lifetime::Timeframe);
353+
if (Param::Instance().roFrameLayerRef < 0) {
354+
outputs.emplace_back(detOrig, "DIGITS", 0, Lifetime::Timeframe);
355+
outputs.emplace_back(detOrig, "DIGITSROF", 0, Lifetime::Timeframe);
356+
if (mctruth) {
357+
outputs.emplace_back(detOrig, "DIGITSMC2ROF", 0, Lifetime::Timeframe);
358+
outputs.emplace_back(detOrig, "DIGITSMCTR", 0, Lifetime::Timeframe);
359+
}
360+
} else {
361+
auto makeOutput = [&](const char* name, int i) {
362+
const auto fname = std::format("{}{}", name, i);
363+
header::DataDescription desc;
364+
desc.runtimeInit(fname.data(), fname.size());
365+
outputs.emplace_back(detOrig, desc, 0, Lifetime::Timeframe);
366+
};
367+
for (int i{0}; i < Param::getNLayers(); ++i) {
368+
makeOutput("DIGITS", i);
369+
makeOutput("DIGITSROF", i);
370+
if (mctruth) {
371+
makeOutput("DIGITSMC2ROF", i);
372+
makeOutput("DIGITSMCTR", i);
373+
}
374+
}
356375
}
357376
outputs.emplace_back(detOrig, "ROMode", 0, Lifetime::Timeframe);
358377
return outputs;

0 commit comments

Comments
 (0)