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:
22  CTPPSPixelDataError(uint32_t errorWord32, const int errorType, int fedId);
27 
29  inline uint32_t errorWord32() const { return errorWord32_; }
31  inline uint64_t errorWord64() const { return errorWord64_; }
33  inline int errorType() const { return errorType_; }
35  inline int fedId() const { return fedId_; }
37  inline const std::string& errorMessage() const {
38  if (errorType_ >= 25 && errorType_ <= 37)
39  return errorMessages_[errorType_ - 24];
40  return errorMessages_[0];
41  }
42 
43 private:
44  static const std::array<std::string, 14> errorMessages_;
45 
47  uint32_t errorWord32_;
49  int fedId_;
50 };
51 
54  return one.fedId() < other.fedId();
55 }
56 
57 #endif
const std::string & errorMessage() const
the error message to be displayed with the error
int fedId() const
the fedId where the error occured
uint64_t errorWord64() const
the 64-bit word that contains the error information
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:13
~CTPPSPixelDataError()
Destructor.
CTPPSPixelDataError()
Default constructor.
int errorType() const
the number associated with the error type (26-31 for ROC number errors, 32-33 for calibration errors)...
Pixel error – collection of errors.