@@ -248,15 +248,19 @@ void DigitizerSpec::run(framework::ProcessingContext& ctx)
248248 }
249249 LOG (debug) << " FTO mask: " << std::bitset<64 >(ft0mask);
250250 LOG (debug) << " FVO mask: " << std::bitset<64 >(fv0mask);
251- for (const auto & trg : ctx.inputs ().get <gsl::span<o2::ft0::DetTrigInput>>(" ft0inputs" )) {
252- if (trg.mInputs .to_ulong () & ft0mask) {
253- mbtriggers.emplace_back (trg.mIntRecord );
251+ if (mDetMask [o2::detectors::DetID::FT0 ]) {
252+ for (const auto & trg : ctx.inputs ().get <gsl::span<o2::ft0::DetTrigInput>>(" ft0inputs" )) {
253+ if (trg.mInputs .to_ulong () & ft0mask) {
254+ mbtriggers.emplace_back (trg.mIntRecord );
255+ }
254256 }
255257 }
256- for (const auto & trg : ctx.inputs ().get <gsl::span<o2::fv0::DetTrigInput>>(" fv0inputs" )) {
257- if (trg.mInputs .to_ulong () & fv0mask) {
258- if (std::find (mbtriggers.begin (), mbtriggers.end (), trg.mIntRecord ) == mbtriggers.end ()) {
259- mbtriggers.emplace_back (trg.mIntRecord );
258+ if (mDetMask [o2::detectors::DetID::FV0 ]) {
259+ for (const auto & trg : ctx.inputs ().get <gsl::span<o2::fv0::DetTrigInput>>(" fv0inputs" )) {
260+ if (trg.mInputs .to_ulong () & fv0mask) {
261+ if (std::find (mbtriggers.begin (), mbtriggers.end (), trg.mIntRecord ) == mbtriggers.end ()) {
262+ mbtriggers.emplace_back (trg.mIntRecord );
263+ }
260264 }
261265 }
262266 }
@@ -460,7 +464,7 @@ void DigitizerSpec::finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, vo
460464 }
461465}
462466
463- o2::framework::DataProcessorSpec getEMCALDigitizerSpec (int channel, bool requireCTPInput, bool mctruth, bool useccdb)
467+ o2::framework::DataProcessorSpec getEMCALDigitizerSpec (int channel, bool requireCTPInput, const std::vector<o2::detectors::DetID>& detList, bool mctruth, bool useccdb)
464468{
465469 // create the full data processor spec using
466470 // a name identifier
@@ -485,17 +489,24 @@ o2::framework::DataProcessorSpec getEMCALDigitizerSpec(int channel, bool require
485489 calibloader->enableFEEDCS (true );
486490 calibloader->defineInputSpecs (inputs);
487491 }
492+ o2::detectors::DetID::mask_t detMask;
488493 if (requireCTPInput) {
489- inputs.emplace_back (" ft0inputs" , " FT0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
490- inputs.emplace_back (" fv0inputs" , " FV0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
494+ if (std::find (detList.begin (), detList.end (), o2::detectors::DetID::FT0 ) != detList.end ()) {
495+ detMask.set (o2::detectors::DetID::FT0 );
496+ inputs.emplace_back (" ft0inputs" , " FT0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
497+ }
498+ if (std::find (detList.begin (), detList.end (), o2::detectors::DetID::FV0 ) != detList.end ()) {
499+ detMask.set (o2::detectors::DetID::FV0 );
500+ inputs.emplace_back (" fv0inputs" , " FV0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
501+ }
491502 inputs.emplace_back (" ctpconfig" , " CTP" , " CTPCONFIG" , 0 , Lifetime::Condition, ccdbParamSpec (" CTP/Config/Config" , true ));
492503 }
493504
494505 return DataProcessorSpec{
495506 " EMCALDigitizer" , // Inputs{InputSpec{"collisioncontext", "SIM", "COLLISIONCONTEXT", static_cast<SubSpecificationType>(channel), Lifetime::Timeframe}, InputSpec{"EMC_SimParam", o2::header::gDataOriginEMC, "SIMPARAM", 0, Lifetime::Condition, ccdbParamSpec("EMC/Config/SimParam")}},
496507 inputs,
497508 outputs,
498- AlgorithmSpec{o2::framework::adaptFromTask<DigitizerSpec>(calibloader, requireCTPInput)},
509+ AlgorithmSpec{o2::framework::adaptFromTask<DigitizerSpec>(calibloader, requireCTPInput, detMask )},
499510 Options{
500511 {" pileup" , VariantType::Int, 1 , {" whether to run in continuous time mode" }},
501512 {" disable-dig-tru" , VariantType::Bool, false , {" Disable TRU digitisation" }},
0 commit comments