Project
Loading...
Searching...
No Matches
o2::emcal::MinorAltroDecodingError Class Reference

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 chargetErrorTypeName (ErrorType_t errortype)
 Get the name connected to the error type.
 
static const chargetErrorTypeName (unsigned int errortype)
 Get the name connected to the error type.
 
static const chargetErrorTypeTitle (ErrorType_t errortype)
 Get the title connected to the error type.
 
static const chargetErrorTypeTitle (unsigned int errortype)
 Get the title connected to the error type.
 
static const chargetErrorTypeDescription (ErrorType_t errortype)
 Get the description connected to the error type.
 
static const chargetErrorTypeDescription (unsigned int errortype)
 Get the description connected to the error type.
 

Detailed Description

Error handling for the ALTRO decoder for non-crashing errors.

Definition at line 152 of file AltroDecoder.h.

Member Enumeration Documentation

◆ ErrorType_t

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.

Constructor & Destructor Documentation

◆ MinorAltroDecodingError() [1/2]

o2::emcal::MinorAltroDecodingError::MinorAltroDecodingError ( )
default

Dummy constructor.

◆ MinorAltroDecodingError() [2/2]

o2::emcal::MinorAltroDecodingError::MinorAltroDecodingError ( ErrorType_t  errtype,
uint32_t  channelHeader,
uint32_t  payloadword 
)
inline

Constructor, initializing the object.

Parameters
errtypeType of the error
channelHeaderHeader of the channel raising the error
payloadwordPayload word raising the error

Definition at line 175 of file AltroDecoder.h.

◆ ~MinorAltroDecodingError()

o2::emcal::MinorAltroDecodingError::~MinorAltroDecodingError ( )
defaultnoexcept

Destructor.

Member Function Documentation

◆ errorTypeToInt()

int MinorAltroDecodingError::errorTypeToInt ( ErrorType_t  errortype)
static

convert the error type from symoblic constant into int

Returns
the error number

Definition at line 368 of file AltroDecoder.cxx.

◆ getChannelHeader()

uint32_t o2::emcal::MinorAltroDecodingError::getChannelHeader ( ) const
inlinenoexcept

Get the header of the channel raising the error.

Returns
Hardware address

Definition at line 186 of file AltroDecoder.h.

◆ getErrorType()

ErrorType_t o2::emcal::MinorAltroDecodingError::getErrorType ( ) const
inlinenoexcept

Get the type of the error.

Returns
Error type

Definition at line 194 of file AltroDecoder.h.

◆ getErrorTypeDescription() [1/2]

const char * MinorAltroDecodingError::getErrorTypeDescription ( ErrorType_t  errortype)
static

Get the description connected to the error type.

A detailed description i.e. used for error message on the stdout is produced.

Parameters
errortypeError type raising the exception (symbolic representation)
Returns
Description connected to the error type

Definition at line 486 of file AltroDecoder.cxx.

◆ getErrorTypeDescription() [2/2]

static const char * o2::emcal::MinorAltroDecodingError::getErrorTypeDescription ( unsigned int  errortype)
inlinestatic

Get the description connected to the error type.

A detailed description i.e. used for error message on the stdout is produced.

Parameters
errortypeError type raising the exception (numeric representation)
Returns
Description connected to the error type

Definition at line 274 of file AltroDecoder.h.

◆ getErrorTypeName() [1/2]

const char * MinorAltroDecodingError::getErrorTypeName ( ErrorType_t  errortype)
static

Get the name connected to the error type.

A single word descriptor i.e. used for object names is produced.

Parameters
errortypeError type raising the exception (symbolic representation)
Returns
Name of the error type

Definition at line 440 of file AltroDecoder.cxx.

◆ getErrorTypeName() [2/2]

static const char * o2::emcal::MinorAltroDecodingError::getErrorTypeName ( unsigned int  errortype)
inlinestatic

Get the name connected to the error type.

A single word descriptor i.e. used for object names is produced.

Parameters
errortypeError type raising the exception (numeric representation)
Returns
Name of the error type

Definition at line 232 of file AltroDecoder.h.

◆ getErrorTypeTitle() [1/2]

const char * MinorAltroDecodingError::getErrorTypeTitle ( ErrorType_t  errortype)
static

Get the title connected to the error type.

A short description i.e. used for bin labels or histogam titles is produced.

Parameters
errortypeError type raising the exception (symbolic representation)
Returns
Title of the error type

Definition at line 463 of file AltroDecoder.cxx.

◆ getErrorTypeTitle() [2/2]

static const char * o2::emcal::MinorAltroDecodingError::getErrorTypeTitle ( unsigned int  errortype)
inlinestatic

Get the title connected to the error type.

A short description i.e. used for bin labels or histogam titles is produced.

Parameters
errortypeError type raising the exception (numeric representation)
Returns
Title of the error type

Definition at line 253 of file AltroDecoder.h.

◆ getNumberOfErrorTypes()

static constexpr int o2::emcal::MinorAltroDecodingError::getNumberOfErrorTypes ( )
inlinestaticconstexprnoexcept

Get the number of error types handled by the AltroDecoderError.

Returns
Number of error types

Definition at line 214 of file AltroDecoder.h.

◆ getPayloadWord()

uint32_t o2::emcal::MinorAltroDecodingError::getPayloadWord ( ) const
inlinenoexcept

Get the payload word raising the error.

Returns
Payload word

Definition at line 190 of file AltroDecoder.h.

◆ intToErrorType()

MinorAltroErrType MinorAltroDecodingError::intToErrorType ( int  errornumber)
static

convert the error from number into a type (symbolic constant)

Returns
the error type

Definition at line 403 of file AltroDecoder.cxx.

◆ what()

std::string MinorAltroDecodingError::what ( ) const
noexcept

Create and return error message for different error types.

Returns
Error message

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.


The documentation for this class was generated from the following files: