23 : theDCCHeader(bx, l1a, sourceId)
50 LogTrace (
"CSCDCCEventData|CSCRawToDigi") <<
"CSCDCCEventData::unpack_data() is called";
54 LogTrace (
"CSCDCCEventData|CSCRawToDigi") <<
"unpacking dcc header...";
62 while ( (buf[7]==0x8000)&&(buf[6]==0x0001)&&(buf[5]==0x8000))
67 if (
debug)
LogTrace (
"CSCDCCEventData|CSCRawToDigi") <<
" checking ddu data integrity ";
68 if (dduEventData.
check())
75 if (
debug)
LogTrace(
"CSCDCCEventData|CSCRawToDigi") <<
"DDU Data Check failed! ";
83 LogTrace (
"CSCDCCEventData|CSCRawToDigi") <<
"unpacking dcc trailer ";
84 LogTrace (
"CSCDCCEventData|CSCRawToDigi") << std::hex << buf[3] <<
" "
85 << buf[2]<<
" " << buf[1]<<
" " << buf[0];
89 if (
debug)
LogTrace (
"CSCDCCEventData|CSCRawToDigi") <<
"decoding DCC trailer";
104 LogTrace (
"CSCDCCEventData|CSCRawToDigi") <<
"size in Words () = " << std::dec <<
sizeInWords();
114 std::vector<CSCDDUEventData>::iterator dduItr;
117 for(
int i = 0; dduIndex == -1 &&
i < nDDUs; ++
i)
119 if(
theDDUData[
i].header().source_id() == dduID) dduIndex =
i;
123 unsigned ddu_fmt_version = 0x6;
124 if (format_version == 2013) ddu_fmt_version = 0x7;
130 dccHeader().getCDFEventNumber(), dduID, ddu_fmt_version);
135 theDDUData[dduIndex].add( chamber, dmbID, dduInput, format_version);
bool check() const
for making events. Sets the bxnum and lvl1num inside the chamber event
CSCDCCHeader theDCCHeader
boost::dynamic_bitset append(const boost::dynamic_bitset<> &bs1, const boost::dynamic_bitset<> &bs2)
this method takes two bitsets bs1 and bs2 and returns result of bs2 appended to the end of bs1 ...
CSCDCCTrailer theDCCTrailer
CSCDCCTrailer dccTrailer() const
boost::dynamic_bitset pack()
packs data into bits
static std::atomic< bool > debug
CSCDCCHeader dccHeader() const
std::vector< CSCDDUEventData > theDDUData
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)
void unpack_data(unsigned short *buf, CSCDCCExaminer *examiner=NULL)
static unsigned sizeInWords()
boost::dynamic_bitset ushortToBitset(const unsigned int numberOfBits, unsigned short *buf)
this method takes numberOfBits bits from unsigned short * array and returns them in the bitset obj...