15#ifndef _ALICEO2_DECODINGSTAT_H_
16#define _ALICEO2_DECODINGSTAT_H_
75 static constexpr std::array<std::string_view, NErrorsDefined>
ErrNames = {
76 "BusyViolation flag ON",
77 "DataOverrun flag ON",
81 "Data truncated after ChipEmpty",
82 "Data truncated after ChipHeader",
83 "Data truncated after Region",
84 "Data truncated after LongData",
85 "LongData pattern has highest bit set",
86 "Region is not followed by Short or Long data",
88 "Same pixel fired multiple times",
89 "Non-existing row decoded",
95 "APE_LANE_FIFO_OVERFLOW_ERROR",
97 "APE_PENDING_DETECTOR_EVENT_LIMIT",
98 "APE_PENDING_LANE_EVENT_LIMIT",
100 "APE_RATE_MISSING_TRG_ERROR",
101 "APE_PE_DATA_MISSING",
102 "APE_OOT_NON_CRITICAL",
103 "DColumns non-increasing",
104 "Chip data interleaved on the cable",
106 "TrailerAfterHeader",
109 "Wrong Alpide ChipID",
113 static constexpr std::array<uint32_t, NErrorsDefined>
ErrActions = {
164 if (
c == 0xfd ||
c == 0xfe) {
173 if (c < 0xf2 || c > 0xfe) {
177 ft =
c >= 0xf2 &&
c <= 0xfe;
191 void print(
bool skipNoErr =
true,
const std::string& pref =
"FEEID")
const;
193 template <
typename Func>
209 int16_t
getChipID()
const {
return int16_t(
id & 0xffff); }
210 uint16_t
getFEEID()
const {
return uint16_t(
id >> 16); }
211 static uint32_t
composeID(uint16_t feeID, int16_t chipID) {
return uint32_t(feeID) << 16 | uint16_t(chipID); }
246 static constexpr std::array<std::string_view, NErrorsDefined>
ErrNames = {
247 "Page data does not start with expected RDH",
248 "RDH is stopped, but the time is not matching the stop packet",
249 "Page with RDH.stop does not contain diagnostic word only",
250 "RDH page counters for the same RU/trigger are not continuous",
251 "RDH and GBT header page counters are not consistent",
252 "GBT trigger word was expected but not found",
253 "GBT payload header was expected but not found",
254 "GBT payload trailer was expected but not found",
255 "All lanes were stopped but the page counter in not 0",
256 "End of FEE data reached while not all lanes received stop",
257 "Data was received for stopped lane",
258 "No data was seen for lane (which was not in timeout)",
259 "ChipID (on module) was different from the lane ID on the IB stave",
260 "Cable data does not start with chip header or empty chip",
261 "Active lanes pattern conflicts with expected for given RU type",
262 "Jump in RDH_packetCounter",
263 "Packet done is missing in the trailer while CRU page is not over",
264 "Wrong/missing diagnostic GBT word after RDH with stop",
265 "GBT word not recognized",
267 "Unexpected CRU page alignment padding word",
268 "ROF in future, pause decoding to synchronize",
269 "Old ROF, discarding",
270 "Data discarded due to the recovery flag in RDH",
278 std::array<uint32_t, GBTDataTrailer::MaxStateCombinations>
packetStates = {};
288 void print(
bool skipNoErr =
true)
const;
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static uint32_t composeID(uint16_t feeID, int16_t chipID)
uint16_t getFEEID() const
int16_t getChipID() const
static int getAPENonCritical(uint8_t c)
static constexpr std::array< uint32_t, NErrorsDefined > ErrActions
uint32_t addErrors(const ChipPixelData &d, int verbosity)
static int getAPECode(uint8_t c, bool &ft)
static uint8_t getAPEByte(DecErrors c)
@ APE_RATE_MISSING_TRG_ERROR
@ APE_PENDING_LANE_EVENT_LIMIT
@ APE_LANE_FIFO_OVERFLOW_ERROR
@ APE_PENDING_DETECTOR_EVENT_LIMIT
static constexpr std::array< std::string_view, NErrorsDefined > ErrNames
std::array< uint32_t, NErrorsDefined > errorCounts
static void forEachError(Func f)
uint32_t getNErrors() const
ChipStat(uint16_t _feeID)
Statistics for per-link decoding.
DecErrors
counters for format checks
@ ErrGBTWordNotRecognized
@ ErrMissingDiagnosticWord
@ ErrPageCounterDiscontinuity
@ ErrNonZeroPageAfterStop
std::array< uint32_t, GBTDataTrailer::MaxStateCombinations > packetStates
static constexpr std::array< std::string_view, NErrorsDefined > ErrNames
ClassDefNV(GBTLinkDecodingStat, 3)
std::array< uint32_t, NErrorsDefined > errorCounts