@@ -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 (ft0mask > 0 ) {
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 (fv0mask > 0 ) {
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
@@ -486,8 +490,12 @@ o2::framework::DataProcessorSpec getEMCALDigitizerSpec(int channel, bool require
486490 calibloader->defineInputSpecs (inputs);
487491 }
488492 if (requireCTPInput) {
489- inputs.emplace_back (" ft0inputs" , " FT0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
490- inputs.emplace_back (" fv0inputs" , " FV0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
493+ if (std::find (detList.begin (), detList.end (), o2::detectors::DetID::FT0 ) != detList.end ()) {
494+ inputs.emplace_back (" ft0inputs" , " FT0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
495+ }
496+ if (std::find (detList.begin (), detList.end (), o2::detectors::DetID::FV0 ) != detList.end ()) {
497+ inputs.emplace_back (" fv0inputs" , " FV0" , " TRIGGERINPUT" , 0 , Lifetime::Timeframe);
498+ }
491499 inputs.emplace_back (" ctpconfig" , " CTP" , " CTPCONFIG" , 0 , Lifetime::Condition, ccdbParamSpec (" CTP/Config/Config" , true ));
492500 }
493501
0 commit comments