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

Error handling of the raw reader. More...

#include <RawDecodingError.h>

Inherits std::exception.

Public Types

enum class  ErrorType_t {
  PAGE_NOTFOUND , HEADER_DECODING , PAYLOAD_DECODING , HEADER_INVALID ,
  PAGE_START_INVALID , PAYLOAD_INVALID , TRAILER_DECODING , TRAILER_INCOMPLETE
}
 Codes for different error types. More...
 

Public Member Functions

 RawDecodingError (ErrorType_t errtype, int fecID)
 Constructor.
 
 ~RawDecodingError () noexcept override=default
 destructor
 
const charwhat () const noexcept override
 Providing error message of the exception.
 
ErrorType_t getErrorType () const
 Get the type identifier of the error handled with this exception.
 
int getFECID () const
 Get the ID of the frontend electronics responsible for the error.
 

Static Public Member Functions

static int ErrorTypeToInt (RawDecodingError::ErrorType_t errortype)
 Convert error type to error code number.
 
static constexpr int getNumberOfErrorTypes ()
 Get the number of error codes.
 
static ErrorType_t intToErrorType (unsigned int errortype)
 
static const chargetErrorCodeNames (ErrorType_t errortype)
 Get name of error type.
 
static const chargetErrorCodeNames (unsigned int errortype)
 Get name of error type.
 
static const chargetErrorCodeTitles (ErrorType_t errortype)
 Get title of error type.
 
static const chargetErrorCodeTitles (unsigned int errortype)
 Get title of error type.
 
static const chargetErrorCodeDescription (ErrorType_t errortype)
 Get description of error type.
 
static const chargetErrorCodeDescription (unsigned int errortype)
 Get description of error type.
 

Detailed Description

Error handling of the raw reader.

The following error types are defined:

  • Page not found
  • Raw header decoding error
  • Payload decoding error
  • Out-of-bounds errors In addition to the error type the FEE ID obtained from the current raw header is propagated.

Definition at line 35 of file RawDecodingError.h.

Member Enumeration Documentation

◆ ErrorType_t

Codes for different error types.

Enumerator
PAGE_NOTFOUND 

Page was not found (page index outside range)

HEADER_DECODING 

Header cannot be decoded (format incorrect)

PAYLOAD_DECODING 

Payload cannot be decoded (format incorrect)

HEADER_INVALID 

Header in memory not belonging to requested superpage.

PAGE_START_INVALID 

Page position starting outside payload size.

PAYLOAD_INVALID 

Payload in memory not belonging to requested superpage.

TRAILER_DECODING 

Inconsistent trailer in memory (several trailer words missing the trailer marker)

TRAILER_INCOMPLETE 

Incomplete trailer words (i.e. registers)

Definition at line 40 of file RawDecodingError.h.

Constructor & Destructor Documentation

◆ RawDecodingError()

o2::emcal::RawDecodingError::RawDecodingError ( ErrorType_t  errtype,
int  fecID 
)
inline

Constructor.

Parameters
errtypeIdentifier code of the error type

Constructing the error with error code. To be called when the exception is thrown.

Definition at line 56 of file RawDecodingError.h.

◆ ~RawDecodingError()

o2::emcal::RawDecodingError::~RawDecodingError ( )
overridedefaultnoexcept

destructor

Member Function Documentation

◆ ErrorTypeToInt()

static int o2::emcal::RawDecodingError::ErrorTypeToInt ( RawDecodingError::ErrorType_t  errortype)
inlinestatic

Convert error type to error code number.

Returns
Numeric representation of the error type

Definition at line 80 of file RawDecodingError.h.

◆ getErrorCodeDescription() [1/2]

static const char * o2::emcal::RawDecodingError::getErrorCodeDescription ( ErrorType_t  errortype)
inlinestatic

Get description of error type.

A dedicated description is created which can be used i.e. in the what() function of the exception.

Parameters
errortypeError type raising the exceptio (symbolic representation)
Returns
Description text for the error type

Definition at line 210 of file RawDecodingError.h.

◆ getErrorCodeDescription() [2/2]

static const char * o2::emcal::RawDecodingError::getErrorCodeDescription ( unsigned int  errortype)
inlinestatic

Get description of error type.

A dedicated description is created which can be used i.e. in the what() function of the exception.

Parameters
errortypeError type raising the exception (numeric representation)
Returns
Description text for the error type

Definition at line 240 of file RawDecodingError.h.

◆ getErrorCodeNames() [1/2]

static const char * o2::emcal::RawDecodingError::getErrorCodeNames ( ErrorType_t  errortype)
inlinestatic

Get name of error type.

A single word descriptor i.e. to be used in object names is produced.

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

Definition at line 126 of file RawDecodingError.h.

◆ getErrorCodeNames() [2/2]

static const char * o2::emcal::RawDecodingError::getErrorCodeNames ( unsigned int  errortype)
inlinestatic

Get name of error type.

A single word descriptor i.e. to be used in object names is produced.

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

Definition at line 156 of file RawDecodingError.h.

◆ getErrorCodeTitles() [1/2]

static const char * o2::emcal::RawDecodingError::getErrorCodeTitles ( ErrorType_t  errortype)
inlinestatic

Get title of error type.

A short description i.e. to be used in histogram titles is produced.

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

Definition at line 168 of file RawDecodingError.h.

◆ getErrorCodeTitles() [2/2]

static const char * o2::emcal::RawDecodingError::getErrorCodeTitles ( unsigned int  errortype)
inlinestatic

Get title of error type.

A short description i.e. to be used in histogram titles is produced.

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

Definition at line 198 of file RawDecodingError.h.

◆ getErrorType()

ErrorType_t o2::emcal::RawDecodingError::getErrorType ( ) const
inline

Get the type identifier of the error handled with this exception.

Returns
Error code of the exception

Definition at line 72 of file RawDecodingError.h.

◆ getFECID()

int o2::emcal::RawDecodingError::getFECID ( ) const
inline

Get the ID of the frontend electronics responsible for the error.

Returns
ID of the frontend electronics

Definition at line 76 of file RawDecodingError.h.

◆ getNumberOfErrorTypes()

static constexpr int o2::emcal::RawDecodingError::getNumberOfErrorTypes ( )
inlinestaticconstexpr

Get the number of error codes.

Returns
Number of error codes

Definition at line 107 of file RawDecodingError.h.

◆ intToErrorType()

static ErrorType_t o2::emcal::RawDecodingError::intToErrorType ( unsigned int  errortype)
inlinestatic

Definition at line 109 of file RawDecodingError.h.

◆ what()

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

Providing error message of the exception.

Returns
Error message of the exception

Definition at line 65 of file RawDecodingError.h.


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