CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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);
24  CTPPSPixelDataError(uint64_t errorWord64, 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 
53 inline bool operator<(const CTPPSPixelDataError& one, const CTPPSPixelDataError& other) {
54  return one.fedId() < other.fedId();
55 }
56 
57 #endif
uint32_t errorWord32() const
the 32-bit word that contains the error information
static const std::array< std::string, 14 > errorMessages_
unsigned long long uint64_t
Definition: Time.h:13
bool operator<(DTCELinkId const &lhs, DTCELinkId const &rhs)
Definition: DTCELinkId.h:70
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.