CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDDUEventData.h
Go to the documentation of this file.
1 #ifndef CSCDDUEventData_h
2 #define CSCDDUEventData_h
3 
10 #include <vector>
17 #include <boost/dynamic_bitset.hpp>
18 
20 public:
21 
22  explicit CSCDDUEventData(const CSCDDUHeader &);
23 
24  // buf may need to stay pinned in memory as long
25  // as this data is used. Not sure
26  explicit CSCDDUEventData(unsigned short *buf, CSCDCCExaminer* examiner=NULL);
27 
29 
30  static void setDebug(bool value) {debug = value;}
31  static void setErrorMask(unsigned int value) {errMask = value;}
32 
34  const std::vector<CSCEventData> & cscData() const {return theData;}
35 
36  CSCDDUHeader header() const {return theDDUHeader;}
38  uint16_t trailer0() const {return theDDUTrailer0;}
39 
42 
43 
45  void add(CSCEventData &, int dmbId, int dduInput);
46 
48  long unsigned int errorstat;
49 
50  bool check() const;
51 
54  void decodeStatus(int status) const;
55  void decodeStatus() const;
56  int sizeInWords() const {return theSizeInWords;}
57  int size() const {return theSizeInWords*16;}
58 
60  boost::dynamic_bitset<> pack();
61 
62 
63  static bool debug;
64  static unsigned int errMask;
65 
67 protected:
68  void unpack_data(unsigned short * buf, CSCDCCExaminer* examiner=NULL);
71  // CSCData is unpacked and stored in this vector
72  std::vector<CSCEventData> theData;
75  uint16_t theDDUTrailer0;
77 };
78 
79 #endif
CSCDDUEventData(const CSCDDUHeader &)
void unpack_data(unsigned short *buf, CSCDCCExaminer *examiner=NULL)
a good test routine would be to unpack data, then pack it again.
CSCDDUHeader header() const
CSCDCCTrailer dccTrailer() const
static void setDebug(bool value)
CSCDDUHeader theDDUHeader
#define NULL
Definition: scimark2.h:8
uint16_t trailer0() const
static bool debug
static void setErrorMask(unsigned int value)
CSCDCCTrailer theDCCTrailer
void add(CSCEventData &, int dmbId, int dduInput)
for making events. Sets the bxnum and lvl1num inside the chamber event
static unsigned int errMask
const std::vector< CSCEventData > & cscData() const
accessor to data
uint16_t theDDUTrailer0
int size() const
CSCDDUTrailer trailer() const
std::vector< CSCEventData > theData
tuple status
Definition: ntuplemaker.py:245
bool check() const
void decodeStatus() const
CSCDDUTrailer theDDUTrailer
long unsigned int errorstat
trailer info
CSCDCCHeader dccHeader() const
boost::dynamic_bitset pack()
Alex check this 16 or 64.
CSCDCCHeader theDCCHeader
int sizeInWords() const