@@ -142,25 +142,25 @@ GBTLink::ErrorType GBTLink::checkErrorsRDH(const RDH& rdh)
142142 if (!RDHUtils::checkRDH (rdh, true )) {
143143 statistics.errorCounts [GBTLinkDecodingStat::ErrNoRDHAtStart]++;
144144 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrNoRDHAtStart])) {
145- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrNoRDHAtStart];
145+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrNoRDHAtStart];
146146 }
147147 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrNoRDHAtStart);
148148 err = Abort;
149149 return err; // fatal error
150150 }
151151 if (format == OldFormat && RDHUtils::getVersion (rdh) > 4 ) {
152152 if (verbosity >= VerboseErrors) {
153- LOG (ERROR ) << " Requested old format requires data with RDH version 3 or 4, RDH version "
154- << RDHUtils::getVersion (rdh) << " is found" ;
153+ LOG (important ) << " Requested old format requires data with RDH version 3 or 4, RDH version "
154+ << RDHUtils::getVersion (rdh) << " is found" ;
155155 }
156156 err = Abort;
157157 return err;
158158 }
159159 if ((RDHUtils::getPacketCounter (rdh) > packetCounter + 1 ) && packetCounter >= 0 ) {
160160 statistics.errorCounts [GBTLinkDecodingStat::ErrPacketCounterJump]++;
161161 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrPacketCounterJump])) {
162- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrPacketCounterJump]
163- << " : jump from " << int (packetCounter) << " to " << int (RDHUtils::getPacketCounter (rdh));
162+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrPacketCounterJump]
163+ << " : jump from " << int (packetCounter) << " to " << int (RDHUtils::getPacketCounter (rdh));
164164 }
165165 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrPacketCounterJump);
166166 err = Warning;
@@ -177,7 +177,7 @@ GBTLink::ErrorType GBTLink::checkErrorsRDHStop(const RDH& rdh)
177177 && !RDHUtils::getStop (*lastRDH)) {
178178 statistics.errorCounts [GBTLinkDecodingStat::ErrPageNotStopped]++;
179179 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrPageNotStopped])) {
180- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrPageNotStopped];
180+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrPageNotStopped];
181181 RDHUtils::printRDH (*lastRDH);
182182 RDHUtils::printRDH (rdh);
183183 }
@@ -194,7 +194,7 @@ GBTLink::ErrorType GBTLink::checkErrorsRDHStopPageEmpty(const RDH& rdh)
194194 if (format == NewFormat && RDHUtils::getStop (rdh) && RDHUtils::getMemorySize (rdh) != sizeof (RDH ) + sizeof (GBTDiagnostic)) {
195195 statistics.errorCounts [GBTLinkDecodingStat::ErrStopPageNotEmpty]++;
196196 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrStopPageNotEmpty])) {
197- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrStopPageNotEmpty];
197+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrStopPageNotEmpty];
198198 RDHUtils::printRDH (rdh);
199199 }
200200 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrStopPageNotEmpty);
@@ -211,7 +211,7 @@ GBTLink::ErrorType GBTLink::checkErrorsTriggerWord(const GBTTrigger* gbtTrg)
211211 statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTTrigger]++;
212212 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTTrigger])) {
213213 gbtTrg->printX ();
214- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTTrigger];
214+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTTrigger];
215215 }
216216 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrMissingGBTTrigger);
217217 return Abort;
@@ -235,7 +235,7 @@ GBTLink::ErrorType GBTLink::checkErrorsHeaderWord(const GBTDataHeader* gbtH)
235235 statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTHeader]++;
236236 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTHeader])) {
237237 gbtH->printX ();
238- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTHeader];
238+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTHeader];
239239 }
240240 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrMissingGBTHeader);
241241 return Abort;
@@ -251,7 +251,7 @@ GBTLink::ErrorType GBTLink::checkErrorsHeaderWord(const GBTDataHeaderL* gbtH)
251251 statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTHeader]++;
252252 if (verbosity >= VerboseErrors) {
253253 gbtH->printX ();
254- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTHeader];
254+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTHeader];
255255 }
256256 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrMissingGBTHeader);
257257 return Abort;
@@ -261,8 +261,8 @@ GBTLink::ErrorType GBTLink::checkErrorsHeaderWord(const GBTDataHeaderL* gbtH)
261261 if (gbtH->packetIdx != cnt) {
262262 statistics.errorCounts [GBTLinkDecodingStat::ErrRDHvsGBTHPageCnt]++;
263263 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrRDHvsGBTHPageCnt])) {
264- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrRDHvsGBTHPageCnt] << " : diff in GBT header "
265- << gbtH->packetIdx << " and RDH page " << cnt << " counters" ;
264+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrRDHvsGBTHPageCnt] << " : diff in GBT header "
265+ << gbtH->packetIdx << " and RDH page " << cnt << " counters" ;
266266 }
267267 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrRDHvsGBTHPageCnt);
268268 return Warning;
@@ -273,8 +273,8 @@ GBTLink::ErrorType GBTLink::checkErrorsHeaderWord(const GBTDataHeaderL* gbtH)
273273 if (gbtH->packetIdx ) {
274274 statistics.errorCounts [GBTLinkDecodingStat::ErrNonZeroPageAfterStop]++;
275275 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrNonZeroPageAfterStop])) {
276- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrNonZeroPageAfterStop]
277- << " : Non-0 page counter (" << cnt << " ) while all lanes were stopped" ;
276+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrNonZeroPageAfterStop]
277+ << " : Non-0 page counter (" << cnt << " ) while all lanes were stopped" ;
278278 }
279279 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrNonZeroPageAfterStop);
280280 return Warning;
@@ -291,8 +291,8 @@ GBTLink::ErrorType GBTLink::checkErrorsActiveLanes(int cbl)
291291 statistics.errorCounts [GBTLinkDecodingStat::ErrInvalidActiveLanes]++;
292292 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrInvalidActiveLanes])) {
293293 std::bitset<32 > expectL (cbl), gotL (lanesActive);
294- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrInvalidActiveLanes] << ' '
295- << gotL << " vs " << expectL << " skip page" ;
294+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrInvalidActiveLanes] << ' '
295+ << gotL << " vs " << expectL << " skip page" ;
296296 }
297297 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrInvalidActiveLanes);
298298 return Warning;
@@ -308,8 +308,8 @@ GBTLink::ErrorType GBTLink::checkErrorsGBTData(int cablePos)
308308 if (lanesStop & (0x1 << cablePos)) { // make sure stopped lanes do not transmit the data
309309 statistics.errorCounts [GBTLinkDecodingStat::ErrDataForStoppedLane]++;
310310 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrDataForStoppedLane])) {
311- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrDataForStoppedLane]
312- << cablePos;
311+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrDataForStoppedLane]
312+ << cablePos;
313313 }
314314 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrDataForStoppedLane);
315315 return Warning;
@@ -333,7 +333,7 @@ GBTLink::ErrorType GBTLink::checkErrorsGBTDataID(const GBTData* gbtD)
333333 printCableStatus ((GBTCableStatus*)gbtD);
334334 }
335335 gbtD->printX (true );
336- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrGBTWordNotRecognized];
336+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrGBTWordNotRecognized];
337337 }
338338 return Skip;
339339}
@@ -346,7 +346,7 @@ GBTLink::ErrorType GBTLink::checkErrorsTrailerWord(const GBTDataTrailer* gbtT)
346346 gbtT->printX ();
347347 statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTTrailer]++;
348348 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrMissingGBTTrailer])) {
349- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTTrailer];
349+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingGBTTrailer];
350350 }
351351 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrMissingGBTTrailer);
352352 return Abort;
@@ -360,10 +360,10 @@ GBTLink::ErrorType GBTLink::checkErrorsTrailerWord(const GBTDataTrailer* gbtT)
360360// / Check the Done status in GBT Trailer word
361361GBTLink::ErrorType GBTLink::checkErrorsPacketDoneMissing (const GBTDataTrailer* gbtT, bool notEnd)
362362{
363- if (!gbtT->packetDone && notEnd) { // Done may be missing only in case of carry-over to new CRU page
363+ if (!gbtT || (!gbtT ->packetDone && notEnd) ) { // Done may be missing only in case of carry-over to new CRU page
364364 statistics.errorCounts [GBTLinkDecodingStat::ErrPacketDoneMissing]++;
365365 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrPacketDoneMissing])) {
366- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrPacketDoneMissing];
366+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrPacketDoneMissing];
367367 }
368368 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrPacketDoneMissing);
369369 return Warning;
@@ -382,8 +382,8 @@ GBTLink::ErrorType GBTLink::checkErrorsLanesStops()
382382 statistics.errorCounts [GBTLinkDecodingStat::ErrUnstoppedLanes]++;
383383 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrUnstoppedLanes])) {
384384 std::bitset<32 > active (lanesActive), stopped (lanesStop);
385- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrUnstoppedLanes]
386- << " | active: " << active << " stopped: " << stopped;
385+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrUnstoppedLanes]
386+ << " | active: " << active << " stopped: " << stopped;
387387 }
388388 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrUnstoppedLanes);
389389 }
@@ -394,8 +394,8 @@ GBTLink::ErrorType GBTLink::checkErrorsLanesStops()
394394 statistics.errorCounts [GBTLinkDecodingStat::ErrNoDataForActiveLane]++;
395395 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrNoDataForActiveLane])) {
396396 std::bitset<32 > withData (lanesWithData), active (lanesActive), timeOut (lanesTimeOut);
397- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrNoDataForActiveLane]
398- << " | with data: " << withData << " active: " << active << " timeOut: " << timeOut;
397+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrNoDataForActiveLane]
398+ << " | with data: " << withData << " active: " << active << " timeOut: " << timeOut;
399399 }
400400 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrNoDataForActiveLane);
401401 err = Warning;
@@ -411,7 +411,7 @@ GBTLink::ErrorType GBTLink::checkErrorsDiagnosticWord(const GBTDiagnostic* gbtD)
411411 statistics.errorCounts [GBTLinkDecodingStat::ErrMissingDiagnosticWord]++;
412412 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrMissingDiagnosticWord])) {
413413 gbtD->printX ();
414- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingDiagnosticWord];
414+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrMissingDiagnosticWord];
415415 }
416416 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrMissingDiagnosticWord);
417417 return Abort;
@@ -427,7 +427,7 @@ GBTLink::ErrorType GBTLink::checkErrorsCableID(const GBTData* gbtD, uint8_t cabl
427427 statistics.errorCounts [GBTLinkDecodingStat::ErrWrongeCableID]++;
428428 if (needToPrintError (statistics.errorCounts [GBTLinkDecodingStat::ErrWrongeCableID])) {
429429 gbtD->printX ();
430- LOG (ERROR ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrWrongeCableID] << ' ' << gbtD->getCableID ();
430+ LOG (important ) << describe () << ' ' << statistics.ErrNames [GBTLinkDecodingStat::ErrWrongeCableID] << ' ' << gbtD->getCableID ();
431431 }
432432 errorBits |= 0x1 << int (GBTLinkDecodingStat::ErrWrongeCableID);
433433 return Skip;
0 commit comments