00001 00002 00003 #ifndef CSCDCCEventData_h 00004 #define CSCDCCEventData_h 00005 00006 #include <vector> 00007 #include <boost/dynamic_bitset.hpp> 00008 #include "EventFilter/CSCRawToDigi/interface/CSCDDUEventData.h" 00009 #include "EventFilter/CSCRawToDigi/interface/CSCDCCHeader.h" 00010 #include "EventFilter/CSCRawToDigi/interface/CSCDCCTrailer.h" 00011 #include "EventFilter/CSCRawToDigi/interface/CSCDCCExaminer.h" 00012 00013 class CSCDCCEventData { 00014 public: 00015 CSCDCCEventData(int sourceId, int nDDUs, int bx, int l1a); 00018 explicit CSCDCCEventData(unsigned short *buf, CSCDCCExaminer* examiner=NULL); 00019 00020 ~CSCDCCEventData(); 00021 00022 static void setDebug(bool value) {debug = value;} 00023 00025 const std::vector<CSCDDUEventData> & dduData() const {return theDDUData;} 00026 std::vector<CSCDDUEventData> & dduData() {return theDDUData;} 00027 00028 CSCDCCHeader dccHeader() const {return theDCCHeader;} 00029 CSCDCCTrailer dccTrailer() const {return theDCCTrailer;} 00030 00031 00033 //void add(CSCEventData &); 00034 00035 bool check() const; 00036 00039 int sizeInWords() const {return theSizeInWords;} 00040 00041 void addChamber(CSCEventData & chamber, int dduID, int dduSlot, int dmbID); 00042 00044 boost::dynamic_bitset<> pack(); 00045 00046 static bool debug; 00047 00048 00049 protected: 00050 void unpack_data(unsigned short * buf, CSCDCCExaminer* examiner=NULL); 00051 CSCDCCHeader theDCCHeader; 00052 // DDUData is unpacked and stored in this vector 00053 std::vector<CSCDDUEventData> theDDUData; 00054 CSCDCCTrailer theDCCTrailer; 00055 int theSizeInWords; 00056 }; 00057 00058 #endif