CMS 3D CMS Logo

RPixErrorChecker.h
Go to the documentation of this file.
1 #ifndef CTPPS_CTPPSRawToDigi_RPixErrorChecker_h
2 #define CTPPS_CTPPSRawToDigi_RPixErrorChecker_h
3 
9 
10 #include <vector>
11 #include <map>
12 
13 class FEDRawData;
14 
16 
18 
19 public:
20 
21  typedef uint32_t Word32;
22  typedef uint64_t Word64;
23 
24  typedef std::vector<CTPPSPixelDataError> DetErrors;
25  typedef std::map<uint32_t, DetErrors> Errors;
26 
27  static constexpr int CRC_bits = 1;
28  static constexpr int ROC_bits = 5;
29  static constexpr int DCOL_bits = 5;
30  static constexpr int PXID_bits = 8;
31  static constexpr int ADC_bits = 8;
32  static constexpr int OMIT_ERR_bits = 1;
33 
34  static constexpr int CRC_shift = 2;
35  static constexpr int ADC_shift = 0;
36  static constexpr int PXID_shift = ADC_shift + ADC_bits;
37  static constexpr int DCOL_shift = PXID_shift + PXID_bits;
38  static constexpr int ROC_shift = DCOL_shift + DCOL_bits;
39  static constexpr int OMIT_ERR_shift = 20;
40 
41  static constexpr Word32 dummyDetId = 0xffffffff;
42 
46 
47 public:
48 
50 
51  void setErrorStatus(bool errorStatus);
52 
53  bool checkCRC(bool& errorsInEvent, int fedId, const Word64* trailer, Errors& errors) const;
54 
55  bool checkHeader(bool& errorsInEvent, int fedId, const Word64* header, Errors& errors) const;
56 
57  bool checkTrailer(bool& errorsInEvent, int fedId, unsigned int nWords, const Word64* trailer, Errors& errors) const;
58 
59  bool checkROC(bool& errorsInEvent, int fedId, uint32_t iD, const Word32& errorWord, Errors& errors) const;
60 
61  void conversionError(int fedId, uint32_t iD, const State& state, const Word32& errorWord, Errors& errors) const;
62 
63 private:
64 
65 
67 
68 
69 
70 };
71 
72 #endif
void conversionError(int fedId, uint32_t iD, const State &state, const Word32 &errorWord, Errors &errors) const
static constexpr int OMIT_ERR_shift
static constexpr int CRC_shift
static constexpr int DCOL_shift
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, Errors &errors) const
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, Errors &errors) const
static constexpr int ROC_bits
static constexpr int ADC_bits
std::map< uint32_t, DetErrors > Errors
static constexpr Word32 OMIT_ERR_mask
static constexpr Word32 dummyDetId
std::vector< CTPPSPixelDataError > DetErrors
static constexpr int ADC_shift
static constexpr int DCOL_bits
static constexpr int PXID_bits
void setErrorStatus(bool errorStatus)
unsigned long long uint64_t
Definition: Time.h:15
static constexpr int OMIT_ERR_bits
static constexpr int CRC_bits
static constexpr Word32 ERROR_mask
bool checkTrailer(bool &errorsInEvent, int fedId, unsigned int nWords, const Word64 *trailer, Errors &errors) const
Definition: errors.py:1
static constexpr Word64 CRC_mask
static constexpr int ROC_shift
bool checkROC(bool &errorsInEvent, int fedId, uint32_t iD, const Word32 &errorWord, Errors &errors) const
static constexpr int PXID_shift
#define constexpr