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, unsigned int format_version = 2005);
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 #ifdef LOCAL_UNPACK
63  static bool debug;
64 #else
65  static std::atomic<bool> debug;
66 #endif
67  static unsigned int errMask;
68 
70 protected:
71  void unpack_data(unsigned short * buf, CSCDCCExaminer* examiner=NULL);
74  // CSCData is unpacked and stored in this vector
75  std::vector<CSCEventData> theData;
78  uint16_t theDDUTrailer0;
80  uint16_t theFormatVersion;
81 };
82 
83 #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.
uint16_t theFormatVersion
CSCDDUHeader header() const
CSCDCCTrailer dccTrailer() const
static void setDebug(bool value)
CSCDDUHeader theDDUHeader
#define NULL
Definition: scimark2.h:8
uint16_t trailer0() const
static void setErrorMask(unsigned int value)
CSCDCCTrailer theDCCTrailer
static unsigned int errMask
const std::vector< CSCEventData > & cscData() const
accessor to data
uint16_t theDDUTrailer0
int size() const
void add(CSCEventData &, int dmbId, int dduInput, unsigned int format_version=2005)
for making events. Sets the bxnum and lvl1num inside the chamber event
CSCDDUTrailer trailer() const
std::vector< CSCEventData > theData
tuple status
Definition: ntuplemaker.py:245
bool check() const
void decodeStatus() const
CSCDDUTrailer theDDUTrailer
static std::atomic< bool > debug
long unsigned int errorstat
trailer info
CSCDCCHeader dccHeader() const
boost::dynamic_bitset pack()
Alex check this 16 or 64.
CSCDCCHeader theDCCHeader
int sizeInWords() const