6 #ifndef MVTXDECODER_DECODINGSTAT_H
7 #define MVTXDECODER_DECODINGSTAT_H
61 #if ( __cplusplus >= CXX_17 )
62 static constexpr std::array<std::string_view, NErrorsDefined>
ErrNames = {
64 const std::array<const std::string, NErrorsDefined>
ErrNames = {
66 "BusyViolation flag ON",
67 "DataOverrun flag ON",
71 "Data truncated after ChipEmpty",
72 "Data truncated after ChipHeader",
73 "Data truncated after Region",
74 "Data truncated after LongData",
75 "LongData pattern has highest bit set",
76 "Region is not followed by Short or Long data",
78 "Same pixel fired multiple times",
79 "Non-existing row decoded",
85 "APE_LANE_FIFO_OVERFLOW_ERROR",
87 "APE_OCCUPANCY_RATE_LIMIT",
88 "APE_OCCUPANCY_RATE_LIMIT_2",
89 "APE_LANE_PROTOCOL_ERROR",
91 "APE_ERROR_IN_NON_CRITICAL_BYTE",
92 "APE_OOT_NON_CRITICAL",
93 "DColumns non-increasing",
94 "Chip data interleaved on the cable",
99 static constexpr std::array<uint32_t, NErrorsDefined>
ErrActions = {
140 memset(errorCounts.data(), 0,
sizeof(uint32_t) * errorCounts.size());
146 if (c == 0xfd || c == 0xfe) {
155 if (c < 0xf2 || c > 0xfe) {
159 ft = c >= 0xf2 && c <= 0xfe;
172 uint32_t nerrors = 0;
175 int16_t
getChipID()
const {
return int16_t(
id & 0xffff); }
176 uint16_t
getFEEID()
const {
return uint16_t(
id >> 16); }
177 static uint32_t
composeID(uint16_t
feeID, int16_t chipID) {
return uint32_t(feeID) << 16 | uint16_t(chipID); }
212 #if ( __cplusplus >= CXX_17 )
213 static constexpr std::array<std::string_view, NErrorsDefined>
ErrNames = {
215 const std::array<std::string, NErrorsDefined>
ErrNames = {
217 "Page data not start with expected RDH",
218 "RDH is stopped, but the time is not matching the stop packet",
219 "Page with RDH.stop does not contain diagnostic word only",
220 "RDH page counters for the same RU/trigger are not continuous",
221 "RDH and GBT header page counters are not consistent",
222 "GBT trigger word was expected but not found",
223 "GBT payload header was expected but not found",
224 "GBT payload trailer was expected but not found",
225 "All lanes were stopped but the page counter in not 0",
226 "End of FEE data reached while not all lanes received stop",
227 "Data was received for stopped lane",
228 "No data was seen for lane (which was not in timeout)",
229 "ChipID (on module) was different from the lane ID on the IB stave",
230 "Cable data does not start with chip header or empty chip",
231 "Active lanes pattern conflicts with expected for given RU type",
232 "Jump in RDH_packetCounter",
233 "Packet done is missing in the trailer while CRU page is not over",
234 "Missing diagnostic GBT word after RDH with stop",
235 "GBT word not recognized",
237 "Unexpected CRU page alignment padding word",
238 "ROF in future, pause decoding to synchronize",
239 "Old ROF, discarding",
261 #if ( __cplusplus >= CXX_17 )
262 static constexpr std::array<std::string_view, nBitMap> BitMapName = {
264 const std::array<std::string, nBitMap> BitMapName = {
285 std::array<uint32_t, nBitMap> trgBitCounts = {};
290 trgBitCounts.fill(0);
293 void print(
bool skipNoErr =
true)
const;