CMS 3D CMS Logo

CSCDCCEventData.h
Go to the documentation of this file.
1 
3 #ifndef EventFilter_CSCRawToDigi_CSCDCCEventData_h
4 #define EventFilter_CSCRawToDigi_CSCDCCEventData_h
5 
6 #include <vector>
7 #include <boost/dynamic_bitset.hpp>
12 
14 public:
15  CSCDCCEventData(int sourceId, int nDDUs, int bx, int l1a);
18  explicit CSCDCCEventData(const uint16_t* buf, CSCDCCExaminer* examiner = nullptr);
19 
21 
22  static void setDebug(bool value) { debug = value; }
23 
25  const std::vector<CSCDDUEventData>& dduData() const { return theDDUData; }
26  std::vector<CSCDDUEventData>& dduData() { return theDDUData; }
27 
28  CSCDCCHeader dccHeader() const { return theDCCHeader; }
30 
32  //void add(CSCEventData &);
33 
34  bool check() const;
35 
38  int sizeInWords() const { return theSizeInWords; }
39 
40  void addChamber(
41  CSCEventData& chamber, int dduID, int dduSlot, int dduInput, int dmbID, uint16_t format_version = 2005);
42 
44  boost::dynamic_bitset<> pack();
45 
46 #ifdef LOCAL_UNPACK
47  static bool debug;
48 #else
49  static std::atomic<bool> debug;
50 #endif
51 
52 protected:
53  void unpack_data(const uint16_t* buf, CSCDCCExaminer* examiner = nullptr);
55  // DDUData is unpacked and stored in this vector
56  std::vector<CSCDDUEventData> theDDUData;
59 };
60 
61 #endif
01/20/05 A.Tumanov
CSCDCCHeader theDCCHeader
CSCDCCTrailer theDCCTrailer
boost::dynamic_bitset pack()
packs data into bits
static std::atomic< bool > debug
int sizeInWords() const
const std::vector< CSCDDUEventData > & dduData() const
accessor to dduData
void unpack_data(const uint16_t *buf, CSCDCCExaminer *examiner=nullptr)
std::vector< CSCDDUEventData > theDDUData
static void setDebug(bool value)
Definition: value.py:1
bool check() const
for making events. Sets the bxnum and lvl1num inside the chamber event
void addChamber(CSCEventData &chamber, int dduID, int dduSlot, int dduInput, int dmbID, uint16_t format_version=2005)
CSCDCCEventData(int sourceId, int nDDUs, int bx, int l1a)
CSCDCCTrailer dccTrailer() const
std::vector< CSCDDUEventData > & dduData()
CSCDCCHeader dccHeader() const