Skip to content

Commit f0a2139

Browse files
committed
fix: consistencycheck:b order error for L1 class=>inps
1 parent 384ee2f commit f0a2139

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

Detectors/CTP/reconstruction/src/RawDataDecoder.cxx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ int RawDataDecoder::checkReadoutConsistentncy(o2::pmr::vector<CTPDigit>& digits,
603603
LOG(debug) << "Checking readout";
604604
int ret = 0;
605605
static int nerror = 0;
606+
int32_t magicBC = o2::constants::lhc::LHCMaxBunches - o2::ctp::TriggerOffsetsParam::Instance().LM_L0 - o2::ctp::TriggerOffsetsParam::Instance().L0_L1_classes - 1;
606607
for (auto const& digit : digits) {
607608
// if class mask => inps
608609
for (int i = 0; i < digit.CTPClassMask.size(); i++) {
@@ -624,12 +625,15 @@ int RawDataDecoder::checkReadoutConsistentncy(o2::pmr::vector<CTPDigit>& digits,
624625
uint64_t clsinpmask = cls->descriptor->getInputsMask();
625626
uint64_t diginpmask = digit.CTPInputMask.to_ullong();
626627
if (!((clsinpmask & diginpmask) == clsinpmask)) {
627-
if (nerror < mErrorMax) {
628-
LOG(error) << "Cls=>Inps: CTP class:" << cls->name << " inpmask:" << clsinpmask << " not compatible with inputs mask:" << diginpmask;
629-
nerror++;
628+
if(!((digit.intRecord.bc == magicBC) && (clsinpmask & L1MASKInputs.to_ullong())))
629+
{
630+
if (nerror < mErrorMax) {
631+
LOG(error) << "Cls=>Inps: CTP class:" << cls->name << " inpmask:" << clsinpmask << " not compatible with inputs mask:" << diginpmask << " " << digit.intRecord ;
632+
nerror++;
633+
}
634+
mClassErrorsA[i]++;
635+
ret = 128;
630636
}
631-
mClassErrorsA[i]++;
632-
ret = 128;
633637
}
634638
}
635639
}

Detectors/CTP/workflow/src/RawDecoderSpec.cxx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ void RawDecoderSpec::init(framework::InitContext& ctx)
5050
}
5151
void RawDecoderSpec::endOfStream(framework::EndOfStreamContext& ec)
5252
{
53+
auto clsEA = mDecoder.getClassErrorsA();
54+
auto clsEB = mDecoder.getClassErrorsB();
55+
auto cntCA = mDecoder.getClassCountersA();
56+
auto cntCB = mDecoder.getClassCountersB();
57+
int totClasses = 0;
58+
for (int i = 0; i < o2::ctp::CTP_NCLASSES; i++) {
59+
mClsEA[i] += clsEA[i];
60+
mClsEB[i] += clsEB[i];
61+
mClsA[i] += cntCA[i];
62+
mClsB[i] += cntCB[i];
63+
totClasses += cntCA[i];
64+
}
5365
auto& TFOrbits = mDecoder.getTFOrbits();
5466
std::sort(TFOrbits.begin(), TFOrbits.end());
5567
size_t l = TFOrbits.size();
@@ -79,6 +91,7 @@ void RawDecoderSpec::endOfStream(framework::EndOfStreamContext& ec)
7991
}
8092
if (mCheckConsistency) {
8193
LOG(info) << "Lost due to the shift Consistency Checker:" << mDecoder.getLostDueToShiftCls();
94+
LOG(info) << "Toatl classes:" << totClasses;
8295
auto ctpcfg = mDecoder.getCTPConfig();
8396
for (int i = 0; i < o2::ctp::CTP_NCLASSES; i++) {
8497
std::string name = ctpcfg.getClassNameFromIndex(i);
@@ -168,16 +181,6 @@ void RawDecoderSpec::run(framework::ProcessingContext& ctx)
168181
mErrorTCR += mDecoder.getErrorTCR();
169182
mIRRejected += mDecoder.getIRRejected();
170183
mTCRRejected += mDecoder.getTCRRejected();
171-
auto clsEA = mDecoder.getClassErrorsA();
172-
auto clsEB = mDecoder.getClassErrorsB();
173-
auto cntCA = mDecoder.getClassCountersA();
174-
auto cntCB = mDecoder.getClassCountersB();
175-
for (int i = 0; i < o2::ctp::CTP_NCLASSES; i++) {
176-
mClsEA[i] += clsEA[i];
177-
mClsEB[i] += clsEB[i];
178-
mClsA[i] += cntCA[i];
179-
mClsB[i] += cntCB[i];
180-
}
181184
}
182185
if (mDoLumi) {
183186
uint32_t tfCountsT = 0;

0 commit comments

Comments
 (0)