![]() |
Project
|
Error handling for the ALTRO decoder for non-crashing errors. More...
#include <AltroDecoder.h>
Public Types | |
| enum class | ErrorType_t { BUNCH_HEADER_NULL , CHANNEL_HEADER , CHANNEL_END_PAYLOAD_UNEXPECT , CHANNEL_PAYLOAD_EXCEED , CHANNEL_ORDER , BUNCH_LENGTH_EXCEED , BUNCH_LENGTH_ALLOW_EXCEED , BUNCH_STARTTIME } |
| Error codes connected with the ALTRO decoding. More... | |
Public Member Functions | |
| MinorAltroDecodingError ()=default | |
| Dummy constructor. | |
| MinorAltroDecodingError (ErrorType_t errtype, uint32_t channelHeader, uint32_t payloadword) | |
| Constructor, initializing the object. | |
| ~MinorAltroDecodingError () noexcept=default | |
| Destructor. | |
| uint32_t | getChannelHeader () const noexcept |
| Get the header of the channel raising the error. | |
| uint32_t | getPayloadWord () const noexcept |
| Get the payload word raising the error. | |
| ErrorType_t | getErrorType () const noexcept |
| Get the type of the error. | |
| std::string | what () const noexcept |
| Create and return error message for different error types. | |
Static Public Member Functions | |
| 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. | |
| static const char * | getErrorTypeName (ErrorType_t errortype) |
| Get the name connected to the error type. | |
| static const char * | getErrorTypeName (unsigned int errortype) |
| Get the name connected to the error type. | |
| static const char * | getErrorTypeTitle (ErrorType_t errortype) |
| Get the title connected to the error type. | |
| static const char * | getErrorTypeTitle (unsigned int 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 * | getErrorTypeDescription (unsigned int errortype) |
| Get the description connected to the error type. | |
Error handling for the ALTRO decoder for non-crashing errors.
Definition at line 152 of file AltroDecoder.h.
|
strong |
Error codes connected with the ALTRO decoding.
| Enumerator | |
|---|---|
| BUNCH_HEADER_NULL | Bunch header is 0. |
| CHANNEL_HEADER | Channel header corruption. |
| CHANNEL_END_PAYLOAD_UNEXPECT | Unexpected end of payload (channel or trailer word in bunch words) |
| CHANNEL_PAYLOAD_EXCEED | Exceeding channel payload block. |
| CHANNEL_ORDER | Channels not in increasing order. |
| BUNCH_LENGTH_EXCEED | Bunch length exceeding channel payload size. |
| BUNCH_LENGTH_ALLOW_EXCEED | Exceeds maximum allowed bunch length. |
| BUNCH_STARTTIME | Bunch start time exceeding. |
Definition at line 157 of file AltroDecoder.h.
|
default |
Dummy constructor.
|
inline |
Constructor, initializing the object.
| errtype | Type of the error |
| channelHeader | Header of the channel raising the error |
| payloadword | Payload word raising the error |
Definition at line 175 of file AltroDecoder.h.
|
defaultnoexcept |
Destructor.
|
static |
convert the error type from symoblic constant into int
Definition at line 368 of file AltroDecoder.cxx.
|
inlinenoexcept |
Get the header of the channel raising the error.
Definition at line 186 of file AltroDecoder.h.
|
inlinenoexcept |
|
static |
Get the description connected to the error type.
A detailed description i.e. used for error message on the stdout is produced.
| errortype | Error type raising the exception (symbolic representation) |
Definition at line 486 of file AltroDecoder.cxx.
|
inlinestatic |
Get the description connected to the error type.
A detailed description i.e. used for error message on the stdout is produced.
| errortype | Error type raising the exception (numeric representation) |
Definition at line 274 of file AltroDecoder.h.
|
static |
Get the name connected to the error type.
A single word descriptor i.e. used for object names is produced.
| errortype | Error type raising the exception (symbolic representation) |
Definition at line 440 of file AltroDecoder.cxx.
|
inlinestatic |
Get the name connected to the error type.
A single word descriptor i.e. used for object names is produced.
| errortype | Error type raising the exception (numeric representation) |
Definition at line 232 of file AltroDecoder.h.
|
static |
Get the title connected to the error type.
A short description i.e. used for bin labels or histogam titles is produced.
| errortype | Error type raising the exception (symbolic representation) |
Definition at line 463 of file AltroDecoder.cxx.
|
inlinestatic |
Get the title connected to the error type.
A short description i.e. used for bin labels or histogam titles is produced.
| errortype | Error type raising the exception (numeric representation) |
Definition at line 253 of file AltroDecoder.h.
|
inlinestaticconstexprnoexcept |
Get the number of error types handled by the AltroDecoderError.
Definition at line 214 of file AltroDecoder.h.
|
inlinenoexcept |
Get the payload word raising the error.
Definition at line 190 of file AltroDecoder.h.
|
static |
convert the error from number into a type (symbolic constant)
Definition at line 403 of file AltroDecoder.cxx.
|
noexcept |
Create and return error message for different error types.
Object returning a std::string which can be owned by the caller. This is in contrast to exceptions inheriting from std::exception which must return const char * in order to comply with the interface.
Definition at line 352 of file AltroDecoder.cxx.