CMS 3D CMS Logo

CTPPSPixelDataError.h
Go to the documentation of this file.
1 #ifndef DataFormats_CTPPSPixelDataError_h
2 #define DataFormats_CTPPSPixelDataError_h
3 
4 //---------------------------------------------------------------------------
10 //---------------------------------------------------------------------------
11 
13 
14 #include <string>
15 #include <array>
16 
18 public:
19 
23  CTPPSPixelDataError(uint32_t errorWord32, const int errorType, int fedId);
25  CTPPSPixelDataError(uint64_t errorWord64, const int errorType, int fedId);
28 
29 
31  inline uint32_t errorWord32() const {return errorWord32_;}
33  inline uint64_t errorWord64() const {return errorWord64_;}
35  inline int errorType() const {return errorType_;}
37  inline int fedId() const {return fedId_;}
39  inline const std::string & errorMessage() const {
40  if(errorType_>=25 && errorType_ <= 37) return errorMessages_[errorType_-24];
41  return errorMessages_[0];
42  }
43 
44 
45 private:
46 
47  static const std::array<std::string, 14> errorMessages_;
48 
50  uint32_t errorWord32_;
52  int fedId_;
53 
54 };
55 
58  return one.fedId() < other.fedId();
59 }
60 
61 #endif
uint32_t errorWord32() const
the 32-bit word that contains the error information
static const std::array< std::string, 14 > errorMessages_
bool operator<(const CTPPSPixelDataError &one, const CTPPSPixelDataError &other)
Comparison operators.
unsigned long long uint64_t
Definition: Time.h:15
const std::string & errorMessage() const
the error message to be displayed with the error
~CTPPSPixelDataError()
Destructor.
int errorType() const
the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors)...
CTPPSPixelDataError()
Default constructor.
uint64_t errorWord64() const
the 64-bit word that contains the error information
int fedId() const
the fedId where the error occured
Pixel error – collection of errors.