CMS 3D CMS Logo

CTPPSPixelDataFormatter.h
Go to the documentation of this file.
1 #ifndef CTPPS_CTPPSRawToDigi_CTPPSPixelDataFormatter_h
2 #define CTPPS_CTPPSRawToDigi_CTPPSPixelDataFormatter_h
3 
33 //
34 
39 
41 
42 #include <cstdint>
43 #include <vector>
44 #include <map>
45 
46 class FEDRawData;
47 class RPixErrorChecker;
48 
50 
51 public:
52 
54 
55  typedef std::map<int, FEDRawData> RawData;
56  typedef std::vector<CTPPSPixelDigi> DetDigis;
57 
58  typedef std::vector<CTPPSPixelDataError> DetErrors;
59  typedef std::map<uint32_t, DetErrors> Errors;
60 
61  typedef uint32_t Word32;
62  typedef uint64_t Word64;
63 
64  CTPPSPixelDataFormatter(std::map<CTPPSPixelFramePosition, CTPPSPixelROCInfo> const &mapping);
65 
66  void setErrorStatus(bool theErrorStatus);
67 
68  int nWords() const { return m_WordCounter; }
69 
70  void interpretRawData( bool& errorsInEvent, int fedId, const FEDRawData & data, Collection & digis, Errors & errors);
71 
72 
73 
74 private:
75 
76 
77  mutable int m_WordCounter;
78 
81 
84 
85 
86  int checkError(const Word32& data) const;
87 
88  std::string print(const Word64& word) const;
89 
90  const std::map<CTPPSPixelFramePosition, CTPPSPixelROCInfo> &m_Mapping;
91 
92 };
93 
94 #endif
void setErrorStatus(bool theErrorStatus)
edm::DetSetVector< CTPPSPixelDigi > Collection
std::map< uint32_t, DetErrors > Errors
const std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > & m_Mapping
std::string print(const Word64 &word) const
std::map< int, FEDRawData > RawData
std::vector< CTPPSPixelDataError > DetErrors
int checkError(const Word32 &data) const
void interpretRawData(bool &errorsInEvent, int fedId, const FEDRawData &data, Collection &digis, Errors &errors)
unsigned long long uint64_t
Definition: Time.h:15
std::vector< CTPPSPixelDigi > DetDigis
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
Definition: errors.py:1
CTPPSPixelDataFormatter(std::map< CTPPSPixelFramePosition, CTPPSPixelROCInfo > const &mapping)