|
21 | 21 | using namespace o2::ctp; |
22 | 22 | void errorCounters::printStream(std::ostream& stream) const |
23 | 23 | { |
| 24 | + stream << "Counter warnings diff 1 lmBlmA:" << lmBlmAd1 << " lmAl0B:" << lmAl0Bd1 << " l0Bl0A:" << l0Bl0Ad1 << " l0Al1B: " << l0Al1Bd1 << " l1Bl1A:" << l1Bl1Ad1; |
| 25 | + stream << std::endl; |
24 | 26 | stream << "Counter errorrs: lmB:" << lmB << " l0B:" << l0B << " l1B:" << l1B << " lmA:" << lmA << " l0A:" << l0A << " l1A:" << l1A; |
25 | 27 | stream << " lmBlmA:" << lmBlmA << " lmAl0B:" << lmAl0B << " l0Bl0A:" << l0Bl0A << " l0Al1B: " << l0Al1B << " l1Bl1A:" << l1Bl1A; |
26 | 28 | stream << std::endl; |
@@ -392,35 +394,48 @@ int CTPRunScalers::checkConsistency(const CTPScalerO2& scal0, const CTPScalerO2& |
392 | 394 | // LMB >= LMA >= L0B >= L0A >= L1B >= L1A: 5 relations |
393 | 395 | // broken for classes started at L0 |
394 | 396 | // |
395 | | - if ((scal1.lmAfter - scal0.lmAfter) > (scal1.lmBefore - scal0.lmBefore)) { |
| 397 | + int64_t difThres = 2; |
| 398 | + int64_t dif = (scal1.lmAfter - scal0.lmAfter) - (scal1.lmBefore - scal0.lmBefore); |
| 399 | + if (dif <= difThres) { |
| 400 | + eCnts.lmBlmAd1++; |
| 401 | + } else if (dif > difThres) { |
396 | 402 | eCnts.lmBlmA++; |
397 | 403 | if (eCnts.lmBlmA < eCnts.MAXPRINT) { |
398 | | - LOG(error) << "LMA > LMB error:" << ((scal1.lmAfter - scal0.lmAfter) - (scal1.lmBefore - scal0.lmBefore)); |
| 404 | + LOG(error) << "LMA > LMB error:" << dif; |
399 | 405 | } |
400 | 406 | ret++; |
401 | 407 | } |
402 | | - if ((scal1.l0After - scal0.l0After) > (scal1.l0Before - scal0.l0Before)) { |
| 408 | + dif = (scal1.l0After - scal0.l0After) - (scal1.l0Before - scal0.l0Before); |
| 409 | + if (dif <= difThres) { |
| 410 | + eCnts.l0Bl0Ad1++; |
| 411 | + } else if (dif > difThres) { |
403 | 412 | eCnts.l0Bl0A++; |
404 | 413 | if (eCnts.l0Bl0A < eCnts.MAXPRINT) { |
405 | | - LOG(error) << "L0A > L0B error:" << ((scal1.l0After - scal0.l0After) - (scal1.l0Before - scal0.l0Before)); |
| 414 | + LOG(error) << "L0A > L0B error:" << dif; |
406 | 415 | } |
407 | 416 | ret++; |
408 | 417 | } |
409 | | - if ((scal1.l1After - scal0.l1After) > (scal1.l1Before - scal0.l1Before)) { |
| 418 | + dif = (scal1.l0After - scal0.l0After) - (scal1.l0Before - scal0.l0Before); |
| 419 | + if (dif <= difThres) { |
| 420 | + eCnts.l1Bl1Ad1++; |
| 421 | + } else if (dif > difThres) { |
410 | 422 | eCnts.l1Bl1A++; |
411 | 423 | if (eCnts.l1Bl1A < eCnts.MAXPRINT) { |
412 | | - LOG(error) << "L1A > L1B error:" << ((scal1.l0After - scal0.l0After) - (scal1.l0Before - scal0.l0Before)); |
| 424 | + LOG(error) << "L1A > L1B error:" << dif; |
413 | 425 | } |
414 | 426 | ret++; |
415 | 427 | } |
416 | 428 | if ((scal1.l0Before - scal0.l0Before) > (scal1.lmAfter - scal0.lmAfter)) { |
417 | 429 | // LOG(warning) << "L0B > LMA ok if L0 class."; |
418 | 430 | // ret++; |
419 | 431 | } |
420 | | - if ((scal1.l1Before - scal0.l1Before) > (scal1.l0After - scal0.l0After)) { |
| 432 | + dif = (scal1.l1Before - scal0.l1Before) - (scal1.l0After - scal0.l0After); |
| 433 | + if (dif <= difThres) { |
| 434 | + eCnts.l0Al1Bd1++; |
| 435 | + } else if (dif > difThres) { |
421 | 436 | eCnts.l0Al1B++; |
422 | 437 | if (eCnts.l0Al1B < eCnts.MAXPRINT) { |
423 | | - LOG(error) << "L1B > L0A Before error:" << ((scal1.l1Before - scal0.l1Before) - (scal1.l0After - scal0.l0After)); |
| 438 | + LOG(error) << "L1B > L0A Before error:" << dif; |
424 | 439 | } |
425 | 440 | ret++; |
426 | 441 | } |
@@ -482,6 +497,14 @@ int CTPRunScalers::updateOverflows(const CTPScalerRaw& scal0, const CTPScalerRaw |
482 | 497 | // |
483 | 498 | int CTPRunScalers::updateOverflowsInps(const CTPScalerRecordRaw& rec0, const CTPScalerRecordRaw& rec1, std::array<uint32_t, 48>& overflow) const |
484 | 499 | { |
| 500 | + static int iPrint = 0; |
| 501 | + if (mRunNumber < 545367) { |
| 502 | + if (iPrint < 1) { |
| 503 | + LOG(info) << "CTP Input scalers not available for run:" << mRunNumber; |
| 504 | + iPrint++; |
| 505 | + } |
| 506 | + return 0; |
| 507 | + } |
485 | 508 | uint32_t NINPS = 48; |
486 | 509 | if (rec0.scalersInps.size() < NINPS) { |
487 | 510 | LOG(error) << "updateOverflowsInps.size < 48:" << rec0.scalersInps.size(); |
|
0 commit comments