CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelDataFormatter.h
Go to the documentation of this file.
1 #ifndef PixelDataFormatter_H
2 #define PixelDataFormatter_H
3 
40 
41 #include <vector>
42 #include <map>
43 #include <set>
44 
45 class FEDRawData;
46 class SiPixelFedCabling;
47 class SiPixelQuality;
50 
52 
53 public:
54 
55  typedef std::map<int, FEDRawData> RawData;
56  typedef std::vector<PixelDigi> DetDigis;
57  typedef std::map<cms_uint32_t, DetDigis> Digis;
58  typedef std::pair<DetDigis::const_iterator, DetDigis::const_iterator> Range;
59  typedef std::vector<SiPixelRawDataError> DetErrors;
60  typedef std::map<cms_uint32_t, DetErrors> Errors;
61 
64 
66 
67  void setErrorStatus(bool ErrorStatus);
68  void setQualityStatus(bool QualityStatus, const SiPixelQuality* QualityInfo);
69  void setModulesToUnpack(const std::set<unsigned int> * moduleIds);
70  void passFrameReverter(const SiPixelFrameReverter* reverter);
71 
72  int nDigis() const { return theDigiCounter; }
73  int nWords() const { return theWordCounter; }
74 
75  void interpretRawData(bool& errorsInEvent, int fedId, const FEDRawData & data, Digis & digis, Errors & errors);
76 
77  void formatRawData( unsigned int lvl1_ID, RawData & fedRawData, const Digis & digis);
78 
79 private:
80  mutable int theDigiCounter;
81  mutable int theWordCounter;
82 
86  const std::set<unsigned int> * modulesToUnpack;
87 
90  bool debug;
94 
95  int checkError(const Word32& data) const;
96 
97  int digi2word( cms_uint32_t detId, const PixelDigi& digi,
98  std::map<int, std::vector<Word32> > & words) const;
99 
100  int word2digi( const int fedId,
101  const SiPixelFrameConverter* converter,
102  const bool includeError,
103  const bool useQuality,
104  const Word32& word,
105  Digis & digis) const;
106 
107  std::string print(const PixelDigi & digi) const;
108  std::string print(const Word64 & word) const;
109 
111  int fedId, int errorType, const Word32 & word) const;
112 
113 };
114 
115 #endif
int checkError(const Word32 &data) const
std::map< cms_uint32_t, DetDigis > Digis
void passFrameReverter(const SiPixelFrameReverter *reverter)
cms_uint32_t errorDetId(const SiPixelFrameConverter *converter, int fedId, int errorType, const Word32 &word) const
void interpretRawData(bool &errorsInEvent, int fedId, const FEDRawData &data, Digis &digis, Errors &errors)
void setErrorStatus(bool ErrorStatus)
dictionary map
Definition: Association.py:205
std::vector< SiPixelRawDataError > DetErrors
PixelDataFormatter(const SiPixelFedCabling *map)
std::string print(const PixelDigi &digi) const
void formatRawData(unsigned int lvl1_ID, RawData &fedRawData, const Digis &digis)
void setQualityStatus(bool QualityStatus, const SiPixelQuality *QualityInfo)
const std::set< unsigned int > * modulesToUnpack
const SiPixelQuality * badPixelInfo
unsigned int cms_uint32_t
Definition: typedefs.h:15
std::map< cms_uint32_t, DetErrors > Errors
std::pair< DetDigis::const_iterator, DetDigis::const_iterator > Range
void setModulesToUnpack(const std::set< unsigned int > *moduleIds)
const SiPixelFrameReverter * theFrameReverter
std::map< int, FEDRawData > RawData
std::vector< PixelDigi > DetDigis
int digi2word(cms_uint32_t detId, const PixelDigi &digi, std::map< int, std::vector< Word32 > > &words) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int word2digi(const int fedId, const SiPixelFrameConverter *converter, const bool includeError, const bool useQuality, const Word32 &word, Digis &digis) const
unsigned long long cms_uint64_t
Definition: typedefs.h:17
const SiPixelFedCabling * theCablingTree