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

Error handling of the ALTRO Decoder. More...

#include <AltroDecoder.h>

Inherits std::exception.

Public Types

enum class  ErrorType_t {
  RCU_TRAILER_ERROR , RCU_VERSION_ERROR , RCU_TRAILER_SIZE_ERROR , ALTRO_BUNCH_HEADER_ERROR ,
  ALTRO_BUNCH_LENGTH_ERROR , ALTRO_PAYLOAD_ERROR , ALTRO_MAPPING_ERROR , CHANNEL_ERROR
}
 Error codes connected with the ALTRO decoding. More...
 

Public Member Functions

 AltroDecoderError (ErrorType_t errtype, const std::string_view message)
 Constructor.
 
 ~AltroDecoderError () noexcept override=default
 Destructor.
 
const charwhat () const noexcept override
 Access to error message cnnected to the error.
 
const ErrorType_t getErrorType () const noexcept
 Access to the error type connected to the erro.
 

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 of the ALTRO Decoder.

Definition at line 33 of file AltroDecoder.h.

Member Enumeration Documentation

◆ ErrorType_t

Error codes connected with the ALTRO decoding.

Enumerator
RCU_TRAILER_ERROR 

RCU trailer cannot be decoded or invalid.

RCU_VERSION_ERROR 

RCU trailer version not matching with the version in the raw header.

RCU_TRAILER_SIZE_ERROR 

RCU trailer size length.

ALTRO_BUNCH_HEADER_ERROR 

ALTRO bunch header cannot be decoded or is invalid.

ALTRO_BUNCH_LENGTH_ERROR 

ALTRO bunch has incorrect length.

ALTRO_PAYLOAD_ERROR 

ALTRO payload cannot be decoded.

ALTRO_MAPPING_ERROR 

Incorrect ALTRO channel mapping.

CHANNEL_ERROR 

Channels not initialized.

Definition at line 38 of file AltroDecoder.h.

Constructor & Destructor Documentation

◆ AltroDecoderError()

o2::emcal::AltroDecoderError::AltroDecoderError ( ErrorType_t  errtype,
const std::string_view  message 
)
inline

Constructor.

Defining error code and error message. To be called when the exception is thrown

Parameters
errtypeType of the error
messageError message related to the error

Definition at line 56 of file AltroDecoder.h.

◆ ~AltroDecoderError()

o2::emcal::AltroDecoderError::~AltroDecoderError ( )
overridedefaultnoexcept

Destructor.

Member Function Documentation

◆ errorTypeToInt()

int AltroDecoderError::errorTypeToInt ( ErrorType_t  errortype)
static

convert the error type from symoblic constant into int

Returns
the error number

Definition at line 207 of file AltroDecoder.cxx.

◆ getErrorType()

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

Access to the error type connected to the erro.

Returns
Error type

Definition at line 79 of file AltroDecoder.h.

◆ getErrorTypeDescription() [1/2]

const char * AltroDecoderError::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 329 of file AltroDecoder.cxx.

◆ getErrorTypeDescription() [2/2]

static const char * o2::emcal::AltroDecoderError::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 139 of file AltroDecoder.h.

◆ getErrorTypeName() [1/2]

const char * AltroDecoderError::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 283 of file AltroDecoder.cxx.

◆ getErrorTypeName() [2/2]

static const char * o2::emcal::AltroDecoderError::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 97 of file AltroDecoder.h.

◆ getErrorTypeTitle() [1/2]

const char * AltroDecoderError::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 306 of file AltroDecoder.cxx.

◆ getErrorTypeTitle() [2/2]

static const char * o2::emcal::AltroDecoderError::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 118 of file AltroDecoder.h.

◆ getNumberOfErrorTypes()

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

Get the number of error types handled by the AltroDecoderError.

Returns
Number of error types

Definition at line 75 of file AltroDecoder.h.

◆ intToErrorType()

AltroErrType AltroDecoderError::intToErrorType ( int  errornumber)
static

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

Returns
the error type

Definition at line 245 of file AltroDecoder.cxx.

◆ what()

const char * o2::emcal::AltroDecoderError::what ( ) const
inlineoverridenoexcept

Access to error message cnnected to the error.

Returns
Error message

Definition at line 63 of file AltroDecoder.h.


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