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 
41 
42 #include <vector>
43 #include <map>
44 #include <set>
45 
46 class FEDRawData;
47 class SiPixelFedCabling;
48 class SiPixelQuality;
52 
54 
55 public:
56 
58 
59  typedef std::map<int, FEDRawData> RawData;
60  typedef std::vector<PixelDigi> DetDigis;
61  typedef std::map<cms_uint32_t, DetDigis> Digis;
62  typedef std::pair<DetDigis::const_iterator, DetDigis::const_iterator> Range;
63  typedef std::vector<SiPixelRawDataError> DetErrors;
64  typedef std::map<cms_uint32_t, DetErrors> Errors;
65 
68 
70 
71  void setErrorStatus(bool ErrorStatus);
72  void setQualityStatus(bool QualityStatus, const SiPixelQuality* QualityInfo);
73  void setModulesToUnpack(const std::set<unsigned int> * moduleIds);
74  void passFrameReverter(const SiPixelFrameReverter* reverter);
75 
76  int nDigis() const { return theDigiCounter; }
77  int nWords() const { return theWordCounter; }
78 
79  void interpretRawData(bool& errorsInEvent, int fedId, const FEDRawData & data, Collection & digis, Errors & errors);
80 
81  void formatRawData( unsigned int lvl1_ID, RawData & fedRawData, const Digis & digis);
82 
83 private:
84  mutable int theDigiCounter;
85  mutable int theWordCounter;
86 
87 
91  const std::set<unsigned int> * modulesToUnpack;
92 
95  bool debug;
99 
100  int checkError(const Word32& data) const;
101 
102  int digi2word( cms_uint32_t detId, const PixelDigi& digi,
103  std::map<int, std::vector<Word32> > & words) const;
104 
105  int word2digi( const int fedId,
106  const SiPixelFrameConverter* converter,
107  const bool includeError,
108  const bool useQuality,
109  const Word32& word,
110  Digis & digis) const;
111 
112  std::string print(const PixelDigi & digi) const;
113  std::string print(const Word64 & word) const;
114 
116  int fedId, int errorType, const Word32 & word) const;
117 
118 };
119 
120 #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 setErrorStatus(bool ErrorStatus)
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 interpretRawData(bool &errorsInEvent, int fedId, const FEDRawData &data, Collection &digis, Errors &errors)
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
edm::DetSetVector< PixelDigi > Collection
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
SiPixelFedCabling const * theCablingTree