@@ -81,6 +81,7 @@ void ITSFeeTask::initialize(o2::framework::InitContext& /*ctx*/)
8181
8282void ITSFeeTask::createFeePlots ()
8383{
84+
8485 mTrigger = new TH1I (" TriggerFlag" , " Trigger vs counts" , mTriggerType .size (), 0.5 , mTriggerType .size () + 0.5 );
8586 getObjectsManager ()->startPublishing (mTrigger ); // mTrigger
8687
@@ -142,7 +143,7 @@ void ITSFeeTask::createFeePlots()
142143 mFlag1Check = new TH2I (" Flag1Check" , " Flag 1 Check" , NFees, 0 , NFees, 3 , 0 , 3 ); // Row 1 : transmission_timeout, Row 2 : packet_overflow, Row 3 : lane_starts_violation
143144 getObjectsManager ()->startPublishing (mFlag1Check ); // mFlag1Check
144145
145- mDecodingCheck = new TH2I (" DecodingCheck" , " Error in parsing data" , NFees, 0 , NFees, 5 , 0 , 5 ); // 0: DataFormat not recognized, 1: DDW index != 0, 2: DDW wrong identifier, 3: IHW wrong identifier, 4: CDW wrong version -- adapt y range!
146+ mDecodingCheck = new TH2I (" DecodingCheck" , " Error in parsing data" , NFees, 0 , NFees, 6 , 0 , 6 ); // 0: DataFormat not recognized, 1: DDW index != 0, 2: DDW wrong identifier, 3: IHW wrong identifier, 4: CDW wrong version, 5: Empty Payload -- adapt y range!
146147 getObjectsManager ()->startPublishing (mDecodingCheck );
147148
148149 mPayloadSize = new TH2F (" PayloadSize" , " Payload Size" , NFees, 0 , NFees, mNPayloadSizeBins , 0 , 4.096e5 );
@@ -513,7 +514,10 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
513514
514515 } // if doLookForTDT || mDecodeCDW
515516
516- //
517+ // Check on empty payload
518+ if (!it.size ()) {
519+ mDecodingCheck ->Fill (ifee, 5 );
520+ }
517521
518522 // Operations at the first page of each orbit
519523 // - decoding ITS header work and fill histogram with number of active lanes
@@ -546,12 +550,34 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
546550 }
547551
548552 // Operations at last page of each orbit:
553+
549554 // - decoding Diagnostic Word DDW0 and fill lane status plots and vectors
550555 if ((int )(o2::raw::RDHUtils::getStop (rdh)) && it.size ()) {
551556
552- for (int i = 0 ; i < NFees; i++) {
553- mPayloadSize ->Fill (i, (float )payloadTot[i]);
554- payloadTot[i] = 0 ;
557+ // - read triggers in RDH and fill histogram
558+ // - fill histogram with packet_done TDTs counted so far and reset counter
559+ // fill trailer count histo and reset counters
560+ if (doLookForTDT) {
561+
562+ if (!RampOngoing && !clockEvt) {
563+ mTrailerCount ->Fill (ifee, TDTcounter[ifee] < 21 ? TDTcounter[ifee] : -1 );
564+ mTrailerCount_reset ->Fill (ifee, TDTcounter[ifee] < 21 ? TDTcounter[ifee] : -1 );
565+ }
566+ TDTcounter[ifee] = 0 ;
567+ }
568+
569+ nStops[ifee]++;
570+ for (int i = 0 ; i < mTriggerType .size (); i++) {
571+ if (((o2::raw::RDHUtils::getTriggerType (rdh)) >> mTriggerType .at (i).first & 1 ) == 1 ) {
572+ mTrigger ->Fill (i + 1 );
573+ mTriggerVsFeeId ->Fill (ifee, i + 1 );
574+ mTriggerVsFeeId_reset ->Fill (ifee, i + 1 );
575+ }
576+ }
577+
578+ if (precisePayload) {
579+ mPayloadSize ->Fill (ifee, payloadTot[ifee]);
580+ payloadTot[ifee] = 0 ;
555581 }
556582
557583 const GBTDiagnosticWord* ddw;
@@ -604,29 +630,6 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
604630 }
605631 }
606632 }
607-
608- // Operations at last page of each orbit:
609- // - read triggers in RDH and fill histogram
610- // - fill histogram with packet_done TDTs counted so far and reset counter
611- if ((int )(o2::raw::RDHUtils::getStop (rdh))) {
612- // fill trailer count histo and reset counters
613- if (doLookForTDT) {
614-
615- if (!RampOngoing && !clockEvt) {
616- mTrailerCount ->Fill (ifee, TDTcounter[ifee] < 21 ? TDTcounter[ifee] : -1 );
617- mTrailerCount_reset ->Fill (ifee, TDTcounter[ifee] < 21 ? TDTcounter[ifee] : -1 );
618- }
619- TDTcounter[ifee] = 0 ;
620- }
621- nStops[ifee]++;
622- for (int i = 0 ; i < mTriggerType .size (); i++) {
623- if (((o2::raw::RDHUtils::getTriggerType (rdh)) >> mTriggerType .at (i).first & 1 ) == 1 ) {
624- mTrigger ->Fill (i + 1 );
625- mTriggerVsFeeId ->Fill (ifee, i + 1 );
626- mTriggerVsFeeId_reset ->Fill (ifee, i + 1 );
627- }
628- }
629- }
630633 }
631634
632635 // Filling histograms: loop over mStatusFlagNumber[ilayer][istave][ilane][iflag]
@@ -671,6 +674,16 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
671674 mLaneStatusOverview [1 ]->SetBinError (istave + 1 + StaveBoundary[ilayer], 1e-15 );
672675 }
673676 }
677+
678+ if (!precisePayload) {
679+ for (int i = 0 ; i < NFees; i++) {
680+ if (nStops[i]) {
681+ float payloadAvg = (float )payloadTot[i] / nStops[i];
682+ mPayloadSize ->Fill (i, payloadAvg);
683+ }
684+ }
685+ }
686+
674687 mTimeFrameId ++;
675688 mTFInfo ->Fill (mTimeFrameId % 10000 );
676689 end = std::chrono::high_resolution_clock::now ();
@@ -691,6 +704,7 @@ void ITSFeeTask::getParameters()
691704 mEnableIHWReading = o2::quality_control_modules::common::getFromConfig<int >(mCustomParameters , " EnableIHWReading" , mEnableIHWReading );
692705 mDecodeCDW = o2::quality_control_modules::common::getFromConfig<bool >(mCustomParameters , " DecodeCDW" , mDecodeCDW );
693706 nResetCycle = o2::quality_control_modules::common::getFromConfig<int >(mCustomParameters , " nResetCycle" , nResetCycle);
707+ precisePayload = o2::quality_control_modules::common::getFromConfig<bool >(mCustomParameters , " precisePayload" , precisePayload);
694708}
695709
696710void ITSFeeTask::getStavePoint (int layer, int stave, double * px, double * py)
0 commit comments