@@ -296,12 +296,12 @@ int RawDataDecoder::decodeRaw(o2::framework::InputRecord& inputs, std::vector<o2
296296 uint64_t trgclassmask = 0xffffffffffffffff ;
297297 uint64_t trgclassmaskNOTRGDet = 0xffffffffffffffff ;
298298 if (mCTPConfig .getRunNumber () != 0 ) {
299- trgclassmask = mCTPConfig .getTriggerClassMaskWInputs ();
299+ trgclassmask = mCTPConfig .getTriggerClassMaskWInputs (); // classes triggered by internal ctp generators not here
300300 trgclassmaskNOTRGDet = mCTPConfig .getTriggerClassMaskWInputsNoTrgDets ();
301301 // mCTPConfig.printStream(std::cout);
302302 }
303303 // std::cout << "trgclassmask:" << std::hex << trgclassmask << std::dec << std::endl;
304- ret = shiftInputs (digitsMap, digits, mTFOrbit );
304+ mLostDueToShiftInps + = shiftInputs (digitsMap, digits, mTFOrbit );
305305 if (mCheckConsistency ) {
306306 ret = checkReadoutConsistentncy (digits, trgclassmask, trgclassmaskNOTRGDet);
307307 }
@@ -524,7 +524,8 @@ int RawDataDecoder::shiftNew(const o2::InteractionRecord& irin, uint32_t TFOrbit
524524 digmap[ir] = digit;
525525 }
526526 } else {
527- LOG (info) << " LOST:" << irin << " shift:" << shift;
527+ // LOG(info) << "LOST:" << irin << " shift:" << shift;
528+ return 1 ;;
528529 }
529530 return 0 ;
530531}
@@ -533,6 +534,7 @@ int RawDataDecoder::shiftNew(const o2::InteractionRecord& irin, uint32_t TFOrbit
533534int RawDataDecoder::shiftInputs (std::map<o2::InteractionRecord, CTPDigit>& digitsMap, o2::pmr::vector<CTPDigit>& digits, uint32_t TFOrbit, uint64_t trgclassmask)
534535{
535536 // int nClasswoInp = 0; // counting classes without input which should never happen
537+ int lost = 0 ;
536538 std::map<o2::InteractionRecord, CTPDigit> digitsMapShifted;
537539 auto L0shift = o2::ctp::TriggerOffsetsParam::Instance ().LM_L0 ;
538540 auto L1shift = L0shift + o2::ctp::TriggerOffsetsParam::Instance ().L0_L1 ;
@@ -551,38 +553,38 @@ int RawDataDecoder::shiftInputs(std::map<o2::InteractionRecord, CTPDigit>& digit
551553 if (lut == 0 || lut == 1 ) { // no inps or LM
552554 digitsMapShifted[dig.first ] = dig.second ;
553555 } else if (lut == 2 ) { // L0
554- shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
556+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
555557 if (dig.second .CTPClassMask .count ()) {
556558 // LOG(error) << "Adding class mask without input ?";
557559 // This is not needed as it can happen; Full checj done below - see next LOG(error)
558560 CTPDigit digi = {dig.first , 0 , dig.second .CTPClassMask };
559561 digitsMapShifted[dig.first ] = digi;
560562 }
561563 } else if (lut == 4 ) { // L1
562- shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
564+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
563565 if (dig.second .CTPClassMask .count ()) {
564566 CTPDigit digi = {dig.first , 0 , dig.second .CTPClassMask };
565567 digitsMapShifted[dig.first ] = digi;
566568 }
567569 } else if (lut == 6 ) { // L0 and L1
568- shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
569- shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
570+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
571+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
570572 if (dig.second .CTPClassMask .count ()) {
571573 CTPDigit digi = {dig.first , 0 , dig.second .CTPClassMask };
572574 digitsMapShifted[dig.first ] = digi;
573575 }
574576 } else if (lut == 3 ) { // LM and L0
575- shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
577+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
576578 CTPDigit digi = {dig.first , inpmask & (~L0MASKInputs), dig.second .CTPClassMask };
577579 // if LM level do not need to add class as LM is not shifted;
578580 digitsMapShifted[dig.first ] = digi;
579581 } else if (lut == 5 ) { // LM and L1
580- shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
582+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
581583 CTPDigit digi = {dig.first , inpmask & (~L1MASKInputs), dig.second .CTPClassMask };
582584 digitsMapShifted[dig.first ] = digi;
583585 } else if (lut == 7 ) { // LM and L0 and L1
584- shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
585- shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
586+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
587+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
586588 CTPDigit digi = {dig.first , inpmaskLM, dig.second .CTPClassMask };
587589 digitsMapShifted[dig.first ] = digi;
588590 } else {
@@ -592,7 +594,7 @@ int RawDataDecoder::shiftInputs(std::map<o2::InteractionRecord, CTPDigit>& digit
592594 for (auto const & dig : digitsMapShifted) {
593595 digits.push_back (dig.second );
594596 }
595- return 0 ;
597+ return lost ;
596598}
597599//
598600int RawDataDecoder::checkReadoutConsistentncy (o2::pmr::vector<CTPDigit>& digits, uint64_t trgclassmask, uint64_t trgclassmaskNoTrgDet)
@@ -654,16 +656,13 @@ int RawDataDecoder::checkReadoutConsistentncy(o2::pmr::vector<CTPDigit>& digits,
654656 mClassErrorsB [cls.getIndex ()]++;
655657 ret = 256 ;
656658 } else {
657- mLostDueToShift ++;
659+ mLostDueToShiftCC ++;
658660 }
659661 }
660662 }
661663 }
662664 }
663665 }
664- if (mLostDueToShift ) {
665- LOG (debug) << " LOST classes because of shift:" << mLostDueToShift ;
666- }
667666 return ret;
668667}
669668//
0 commit comments