@@ -119,7 +119,7 @@ void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
119119 // must be 0x307FFFDFFFFF if all links are active
120120 std::bitset<46 > bitSetActiveLinks ((list1.to_ullong () << 32 ) + list0.to_ullong ());
121121 // container with BCid and feeID
122- std::unordered_map<ULong64_t , std::bitset<46 >> bcFreq;
122+ std::unordered_map<int64_t , std::bitset<46 >> bcFreq;
123123
124124 double timeshift = RecoParam::Instance ().getCellTimeShiftNanoSec (); // subtract offset in ns in order to center the time peak around the nominal delay
125125 constexpr auto originEMC = o2::header::gDataOriginEMC ;
@@ -181,12 +181,6 @@ void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
181181 auto feeID = raw::RDHUtils::getFEEID (header);
182182 auto triggerbits = raw::RDHUtils::getTriggerType (header);
183183
184- ULong64_t BCcoll = ULong64_t (triggerBC) + ULong64_t (triggerOrbit * 3564 );
185- bcFreq[BCcoll].set (feeID, true );
186-
187- // std::cout << "__ BCcoll=" << BCcoll << " FEEID=" << feeID << std::endl;
188- // LOG(info) << "__ BCcoll=" << BCcoll << " FEEID=" << feeID << std::endl;
189-
190184 int correctionShiftBCmod4 = 0 ;
191185 o2::InteractionRecord currentIR (triggerBC, triggerOrbit);
192186 // Correct physics triggers for the shift of the BC due to the LM-L0 delay
@@ -201,6 +195,9 @@ void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
201195 continue ;
202196 }
203197 }
198+
199+ bcFreq[currentIR.toLong ()].set (feeID, true );
200+
204201 // Correct the cell time for the bc mod 4 (LHC: 40 MHz clock - ALTRO: 10 MHz clock)
205202 // Convention: All times shifted with respect to BC % 4 = 0 for trigger BC
206203 // Attention: Correction only works for the permutation (0 1 2 3) of the BC % 4, if the permutation is
@@ -358,10 +355,9 @@ void RawToCellConverterSpec::run(framework::ProcessingContext& ctx)
358355 mOutputTriggerRecords .emplace_back (interaction, currentevent.getTriggerBits (), eventstart, ncellsEvent + nLEDMONsEvent);
359356 }
360357
361- std::unordered_map<ULong64_t, std::bitset<46 >>::iterator p;
362- for (p = bcFreq.begin (); p != bcFreq.end (); p++) {
363- if (p->second != bitSetActiveLinks) {
364- LOG (error) << " Not all EMC active links contributed in global BCid=" << p->first << " : mask=" << (p->second ^ bitSetActiveLinks);
358+ for (const auto & [globalBC, activelinks] : bcFreq) {
359+ if (activelinks != bitSetActiveLinks) {
360+ LOG (error) << " Not all EMC active links contributed in global BCid=" << globalBC << " : mask=" << (activelinks ^ bitSetActiveLinks);
365361 mOutputCells .clear ();
366362 mOutputTriggerRecords .clear ();
367363 mOutputDecoderErrors .clear ();
0 commit comments