CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Static Private Attributes
CTPPSPixelDataError Class Reference

Pixel error – collection of errors. More...

#include <CTPPSPixelDataError.h>

Public Member Functions

 CTPPSPixelDataError ()
 Default constructor. More...
 
 CTPPSPixelDataError (uint32_t errorWord32, const int errorType, int fedId)
 Constructor for 32-bit error word. More...
 
 CTPPSPixelDataError (uint64_t errorWord64, const int errorType, int fedId)
 Constructor with 64-bit error word and type included (header or trailer word) More...
 
const std::string & errorMessage () const
 the error message to be displayed with the error More...
 
int errorType () const
 the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors) More...
 
uint32_t errorWord32 () const
 the 32-bit word that contains the error information More...
 
uint64_t errorWord64 () const
 the 64-bit word that contains the error information More...
 
int fedId () const
 the fedId where the error occured More...
 
 ~CTPPSPixelDataError ()
 Destructor. More...
 

Private Attributes

int errorType_
 
uint32_t errorWord32_
 
uint64_t errorWord64_
 
int fedId_
 

Static Private Attributes

static const std::array< std::string, 14 > errorMessages_
 

Detailed Description

Pixel error – collection of errors.

Class storing info about pixel errors

Definition at line 18 of file CTPPSPixelDataError.h.

Constructor & Destructor Documentation

◆ CTPPSPixelDataError() [1/3]

CTPPSPixelDataError::CTPPSPixelDataError ( )

Default constructor.

Definition at line 34 of file CTPPSPixelDataError.cc.

◆ CTPPSPixelDataError() [2/3]

CTPPSPixelDataError::CTPPSPixelDataError ( uint32_t  errorWord32,
const int  errorType,
int  fedId 
)

Constructor for 32-bit error word.

Definition at line 36 of file CTPPSPixelDataError.cc.

int fedId() const
the fedId where the error occured
uint32_t errorWord32() const
the 32-bit word that contains the error information
int errorType() const
the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors)...

◆ CTPPSPixelDataError() [3/3]

CTPPSPixelDataError::CTPPSPixelDataError ( uint64_t  errorWord64,
const int  errorType,
int  fedId 
)

Constructor with 64-bit error word and type included (header or trailer word)

Definition at line 39 of file CTPPSPixelDataError.cc.

int fedId() const
the fedId where the error occured
uint64_t errorWord64() const
the 64-bit word that contains the error information
int errorType() const
the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors)...

◆ ~CTPPSPixelDataError()

CTPPSPixelDataError::~CTPPSPixelDataError ( )
default

Destructor.

Member Function Documentation

◆ errorMessage()

const std::string& CTPPSPixelDataError::errorMessage ( ) const
inline

the error message to be displayed with the error

Definition at line 38 of file CTPPSPixelDataError.h.

References errorMessages_, and errorType_.

Referenced by ConfigToolBase.ConfigToolBase::typeError().

38  {
39  if (errorType_ >= 25 && errorType_ <= 37)
40  return errorMessages_[errorType_ - 24];
41  return errorMessages_[0];
42  }
static const std::array< std::string, 14 > errorMessages_

◆ errorType()

int CTPPSPixelDataError::errorType ( ) const
inline

the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors)

Definition at line 34 of file CTPPSPixelDataError.h.

References errorType_.

34 { return errorType_; }

◆ errorWord32()

uint32_t CTPPSPixelDataError::errorWord32 ( ) const
inline

the 32-bit word that contains the error information

Definition at line 30 of file CTPPSPixelDataError.h.

References errorWord32_.

30 { return errorWord32_; }

◆ errorWord64()

uint64_t CTPPSPixelDataError::errorWord64 ( ) const
inline

the 64-bit word that contains the error information

Definition at line 32 of file CTPPSPixelDataError.h.

References errorWord64_.

32 { return errorWord64_; }

◆ fedId()

int CTPPSPixelDataError::fedId ( ) const
inline

the fedId where the error occured

Definition at line 36 of file CTPPSPixelDataError.h.

References fedId_.

36 { return fedId_; }

Member Data Documentation

◆ errorMessages_

const std::array< std::string, 14 > CTPPSPixelDataError::errorMessages_
staticprivate
Initial value:
= {{
"Error: Unknown error type",
"Error: ROC=25",
"Error: Gap word",
"Error: Dummy word",
"Error: FIFO nearly full",
"Error: Timeout",
"Error: Trailer",
"Error: Event number mismatch",
"Error: Invalid or missing header",
"Error: Invalid or missing trailer",
"Error: Size mismatch",
"Error: Invalid channel",
"Error: Invalid ROC number",
"Error: Invalid dcol/pixel address"}}

Definition at line 45 of file CTPPSPixelDataError.h.

Referenced by errorMessage().

◆ errorType_

int CTPPSPixelDataError::errorType_
private

Definition at line 49 of file CTPPSPixelDataError.h.

Referenced by errorMessage(), and errorType().

◆ errorWord32_

uint32_t CTPPSPixelDataError::errorWord32_
private

Definition at line 48 of file CTPPSPixelDataError.h.

Referenced by errorWord32().

◆ errorWord64_

uint64_t CTPPSPixelDataError::errorWord64_
private

Definition at line 47 of file CTPPSPixelDataError.h.

Referenced by errorWord64().

◆ fedId_

int CTPPSPixelDataError::fedId_
private

Definition at line 50 of file CTPPSPixelDataError.h.

Referenced by fedId().