|
36 | 36 | #include <TChain.h> |
37 | 37 | #include <TStopwatch.h> |
38 | 38 | #include <string> |
| 39 | +#include <format> |
39 | 40 |
|
40 | 41 | using namespace o2::framework; |
41 | 42 | using SubSpecificationType = o2::framework::DataAllocator::SubSpecificationType; |
@@ -347,12 +348,30 @@ constexpr o2::header::DataOrigin MFTDPLDigitizerTask::DETOR; |
347 | 348 |
|
348 | 349 | std::vector<OutputSpec> makeOutChannels(o2::header::DataOrigin detOrig, bool mctruth) |
349 | 350 | { |
| 351 | + using Param = o2::itsmft::DPLAlpideParam<ITSDPLDigitizerTask::DETID>; |
350 | 352 | 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 | + } |
356 | 375 | } |
357 | 376 | outputs.emplace_back(detOrig, "ROMode", 0, Lifetime::Timeframe); |
358 | 377 | return outputs; |
|
0 commit comments