12#define BOOST_TEST_MODULETest EMCAL Reconstruction
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
15#include <boost/test/unit_test.hpp>
32 std::array<std::string, 8> errornames = {{
"RCUTrailerError",
33 "RCUTrailerVersionError",
34 "RCUTrailerSizeError",
40 errortitles = {{
"RCU Trailer",
48 errordescriptions = {{
"RCU trailer decoding error",
49 "Inconsistent RCU trailer version",
50 "Invalid RCU trailer size",
51 "Inconsistent bunch header",
52 "Bunch length exceeding payload size",
53 "Payload could not be decoded",
54 "Invalid hardware address in ALTRO mapping",
55 "Channels not initizalized"}};
73 auto expecttype = errortypes[errortype];
Error handling of the ALTRO Decoder.
ErrorType_t
Error codes connected with the ALTRO decoding.
@ ALTRO_BUNCH_HEADER_ERROR
ALTRO bunch header cannot be decoded or is invalid.
@ ALTRO_MAPPING_ERROR
Incorrect ALTRO channel mapping.
@ RCU_TRAILER_SIZE_ERROR
RCU trailer size length.
@ CHANNEL_ERROR
Channels not initialized.
@ RCU_VERSION_ERROR
RCU trailer version not matching with the version in the raw header.
@ RCU_TRAILER_ERROR
RCU trailer cannot be decoded or invalid.
@ ALTRO_PAYLOAD_ERROR
ALTRO payload cannot be decoded.
@ ALTRO_BUNCH_LENGTH_ERROR
ALTRO bunch has incorrect length.
static int errorTypeToInt(ErrorType_t errortype)
convert the error type from symoblic constant into int
static ErrorType_t intToErrorType(int errornumber)
convert the error from number into a type (symbolic constant)
static constexpr int getNumberOfErrorTypes() noexcept
Get the number of error types handled by the AltroDecoderError.
const ErrorType_t getErrorType() const noexcept
Access to the error type connected to the erro.
static const char * getErrorTypeTitle(ErrorType_t errortype)
Get the title connected to the error type.
static const char * getErrorTypeDescription(ErrorType_t errortype)
Get the description connected to the error type.
static const char * getErrorTypeName(ErrorType_t errortype)
Get the name connected to the error type.
BOOST_AUTO_TEST_CASE(asynch_schedule_test)
void testThrow(AltroDecoderError::ErrorType_t errortype)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
BOOST_CHECK_EQUAL(triggersD.size(), triggers.size())