@@ -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,9 @@ 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 ;
529+ ;
528530 }
529531 return 0 ;
530532}
@@ -533,6 +535,7 @@ int RawDataDecoder::shiftNew(const o2::InteractionRecord& irin, uint32_t TFOrbit
533535int RawDataDecoder::shiftInputs (std::map<o2::InteractionRecord, CTPDigit>& digitsMap, o2::pmr::vector<CTPDigit>& digits, uint32_t TFOrbit, uint64_t trgclassmask)
534536{
535537 // int nClasswoInp = 0; // counting classes without input which should never happen
538+ int lost = 0 ;
536539 std::map<o2::InteractionRecord, CTPDigit> digitsMapShifted;
537540 auto L0shift = o2::ctp::TriggerOffsetsParam::Instance ().LM_L0 ;
538541 auto L1shift = L0shift + o2::ctp::TriggerOffsetsParam::Instance ().L0_L1 ;
@@ -551,38 +554,38 @@ int RawDataDecoder::shiftInputs(std::map<o2::InteractionRecord, CTPDigit>& digit
551554 if (lut == 0 || lut == 1 ) { // no inps or LM
552555 digitsMapShifted[dig.first ] = dig.second ;
553556 } else if (lut == 2 ) { // L0
554- shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
557+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
555558 if (dig.second .CTPClassMask .count ()) {
556559 // LOG(error) << "Adding class mask without input ?";
557560 // This is not needed as it can happen; Full checj done below - see next LOG(error)
558561 CTPDigit digi = {dig.first , 0 , dig.second .CTPClassMask };
559562 digitsMapShifted[dig.first ] = digi;
560563 }
561564 } else if (lut == 4 ) { // L1
562- shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
565+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
563566 if (dig.second .CTPClassMask .count ()) {
564567 CTPDigit digi = {dig.first , 0 , dig.second .CTPClassMask };
565568 digitsMapShifted[dig.first ] = digi;
566569 }
567570 } 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);
571+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
572+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
570573 if (dig.second .CTPClassMask .count ()) {
571574 CTPDigit digi = {dig.first , 0 , dig.second .CTPClassMask };
572575 digitsMapShifted[dig.first ] = digi;
573576 }
574577 } else if (lut == 3 ) { // LM and L0
575- shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
578+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
576579 CTPDigit digi = {dig.first , inpmask & (~L0MASKInputs), dig.second .CTPClassMask };
577580 // if LM level do not need to add class as LM is not shifted;
578581 digitsMapShifted[dig.first ] = digi;
579582 } else if (lut == 5 ) { // LM and L1
580- shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
583+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
581584 CTPDigit digi = {dig.first , inpmask & (~L1MASKInputs), dig.second .CTPClassMask };
582585 digitsMapShifted[dig.first ] = digi;
583586 } 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);
587+ lost += shiftNew (dig.first , TFOrbit, inpmask, L0shift, 0 , digitsMapShifted);
588+ lost += shiftNew (dig.first , TFOrbit, inpmask, L1shift, 1 , digitsMapShifted);
586589 CTPDigit digi = {dig.first , inpmaskLM, dig.second .CTPClassMask };
587590 digitsMapShifted[dig.first ] = digi;
588591 } else {
@@ -592,7 +595,7 @@ int RawDataDecoder::shiftInputs(std::map<o2::InteractionRecord, CTPDigit>& digit
592595 for (auto const & dig : digitsMapShifted) {
593596 digits.push_back (dig.second );
594597 }
595- return 0 ;
598+ return lost ;
596599}
597600//
598601int RawDataDecoder::checkReadoutConsistentncy (o2::pmr::vector<CTPDigit>& digits, uint64_t trgclassmask, uint64_t trgclassmaskNoTrgDet)
@@ -654,16 +657,13 @@ int RawDataDecoder::checkReadoutConsistentncy(o2::pmr::vector<CTPDigit>& digits,
654657 mClassErrorsB [cls.getIndex ()]++;
655658 ret = 256 ;
656659 } else {
657- mLostDueToShift ++;
660+ mLostDueToShiftCC ++;
658661 }
659662 }
660663 }
661664 }
662665 }
663666 }
664- if (mLostDueToShift ) {
665- LOG (debug) << " LOST classes because of shift:" << mLostDueToShift ;
666- }
667667 return ret;
668668}
669669//
0 commit comments