58 static constexpr std::size_t NUMERRORCODES = 8;
60 if (errorcode < 0 || errorcode >= NUMERRORCODES) {
63 return errorcodes[errorcode];
69 return "PageDecoding";
71 return "WordUnexpected";
73 return "IndexUnexpected";
77 return "FeeIdUnexpected";
79 return "OldPayloadVersion";
81 return "FullPayloadSizeUnexpected";
83 return "ShortPayloadSizeUnexpected";
92 return "page decoding";
94 return "unexpected word";
96 return "invalid patch index";
98 return "ADC overflow";
100 return "invalid FeeID";
102 return "unsupported old payload version";
104 return "unexpected full payload size";
106 return "unexpected short payload size";
Handling of STU reconstruction errors.
ErrorCode_t
Error codes of STU decoding.
@ SHORT_PAYLOAD_SIZE_UNEXPECTED
short payload size unexpected
@ UNKNOWN
Unknown error code (needed for conversion to int)
@ ADC_OVERFLOW
ADC overflow.
@ INDEX_UNEXPECTED
Patch index unexpected.
@ OLD_PAYLOAD_VERSION
unsupported old payload version
@ PAGE_ERROR
Page decoding failed (missing header)
@ WORD_UNEXPECTED
Word unexpected.
@ FEEID_UNEXPECTED
FeeID index unexpected.
@ FULL_PAYLOAD_SIZE_UNEXPECTED
full payload size unexpected
static std::string getErrorCodeName(ErrorCode_t errorcode)
Get the name of the error code.
void printStream(std::ostream &stream) const
Print details of the error on the stream.
static ErrorCode_t intToErrorCode(int errorcode)
Convert integer to error code.
STUDecoderError(int ddlID, ErrorCode_t errcode)
Constructor.
static std::string getErrorCodeTitle(ErrorCode_t errorcode)
Get the title of the error code.
static int errorCodeToInt(ErrorCode_t errorcode)
Get integer representation of error code.
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
std::string to_string(gsl::span< T, Size > span)