CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes
CSCDDUEventData Class Reference

#include <CSCDDUEventData.h>

Public Member Functions

void add (CSCEventData &, int dmbId, int dduInput)
 for making events. Sets the bxnum and lvl1num inside the chamber event More...
 
bool check () const
 
const std::vector< CSCEventData > & cscData () const
 accessor to data More...
 
 CSCDDUEventData (const CSCDDUHeader &)
 
 CSCDDUEventData (unsigned short *buf, CSCDCCExaminer *examiner=NULL)
 
CSCDCCHeader dccHeader () const
 
CSCDCCTrailer dccTrailer () const
 
void decodeStatus (int status) const
 
void decodeStatus () const
 
CSCDDUHeader header () const
 
boost::dynamic_bitset pack ()
 Alex check this 16 or 64. More...
 
int size () const
 
int sizeInWords () const
 
CSCDDUTrailer trailer () const
 
uint16_t trailer0 () const
 
 ~CSCDDUEventData ()
 

Static Public Member Functions

static void setDebug (bool value)
 
static void setErrorMask (unsigned int value)
 

Public Attributes

long unsigned int errorstat
 trailer info More...
 

Static Public Attributes

static std::atomic< bool > debug {false}
 
static unsigned int errMask = 0xFFFFFFFF
 

Protected Member Functions

void unpack_data (unsigned short *buf, CSCDCCExaminer *examiner=NULL)
 a good test routine would be to unpack data, then pack it again. More...
 

Protected Attributes

std::vector< CSCEventDatatheData
 
CSCDCCHeader theDCCHeader
 
CSCDCCTrailer theDCCTrailer
 
CSCDDUHeader theDDUHeader
 
CSCDDUTrailer theDDUTrailer
 
uint16_t theDDUTrailer0
 
int theSizeInWords
 

Detailed Description

Author
Rick Wilkinson
A. Tumanov

Definition at line 19 of file CSCDDUEventData.h.

Constructor & Destructor Documentation

CSCDDUEventData::CSCDDUEventData ( const CSCDDUHeader header)
explicit

Definition at line 20 of file CSCDDUEventData.cc.

References header(), and theDDUHeader.

21 {
23 }
CSCDDUHeader header() const
CSCDDUHeader theDDUHeader
CSCDDUEventData::CSCDDUEventData ( unsigned short *  buf,
CSCDCCExaminer examiner = NULL 
)
explicit
CSCDDUEventData::~CSCDDUEventData ( )

Definition at line 31 of file CSCDDUEventData.cc.

32 {
33 }

Member Function Documentation

void CSCDDUEventData::add ( CSCEventData cscData,
int  dmbId,
int  dduInput 
)

for making events. Sets the bxnum and lvl1num inside the chamber event

Definition at line 36 of file CSCDDUEventData.cc.

References CSCDDUHeader::bxnum(), CSCEventData::dmbHeader(), CSCDDUHeader::lvl1num(), CSCDDUHeader::setDMBDAV(), CSCDMBHeader::setdmbID(), CSCEventData::setEventInformation(), theData, and theDDUHeader.

37 {
38  theDDUHeader.setDMBDAV(dduInput);
39  //@@ Tim: The following sets the word which is supposed to be CSCs in error, with bit 15 set for DMB Full
40  //@@ so I think sim should not set it at all
41  //@@ theDDUTrailer.setDMBDAV(dmbId);
42  cscData.dmbHeader()->setdmbID(dmbId);
44  theData.push_back(cscData);
45 }
void setEventInformation(int bxnum, int lvl1num)
void setDMBDAV(int dduInput)
Definition: CSCDDUHeader.cc:31
CSCDDUHeader theDDUHeader
int lvl1num() const
Definition: CSCDDUHeader.h:23
int bxnum() const
Definition: CSCDDUHeader.h:22
std::vector< CSCEventData > theData
const CSCDMBHeader * dmbHeader() const
the DAQ motherboard header. A good place for event and chamber info
Definition: CSCEventData.h:90
void setdmbID(int newDMBID)
Definition: CSCDMBHeader.h:29
bool CSCDDUEventData::check ( ) const

Definition at line 315 of file CSCDDUEventData.cc.

References CSCDDUTrailer::check(), CSCDDUHeader::check(), debug, LogTrace, sizeInWords(), theDDUHeader, theDDUTrailer, and CSCDDUTrailer::wordcount().

Referenced by CSCDCCEventData::unpack_data().

316 {
317  // the trailer counts in 64-bit words
318  if (debug)
319  {
320  LogTrace ("CSCDDUEventData|CSCRawToDigi") << sizeInWords();
321  LogTrace ("CSCDDUEventData|CSCRawToDigi") << "wordcount = " << theDDUTrailer.wordcount()*4;
322  }
323 
324  return theDDUHeader.check() && theDDUTrailer.check();
325 }
bool check() const
Definition: CSCDDUHeader.cc:48
CSCDDUHeader theDDUHeader
bool check() const
Definition: CSCDDUTrailer.h:30
#define LogTrace(id)
unsigned wordcount() const
Definition: CSCDDUTrailer.h:42
CSCDDUTrailer theDDUTrailer
static std::atomic< bool > debug
int sizeInWords() const
const std::vector<CSCEventData>& CSCDDUEventData::cscData ( ) const
inline

accessor to data

Definition at line 34 of file CSCDDUEventData.h.

References theData.

Referenced by CSCDDUDataItr::CSCDDUDataItr(), CSCDDUDataItr::operator*(), and cscdqm::EventProcessor::processDDU().

34 {return theData;}
std::vector< CSCEventData > theData
CSCDCCHeader CSCDDUEventData::dccHeader ( ) const
inline

Definition at line 40 of file CSCDDUEventData.h.

References theDCCHeader.

40 {return theDCCHeader;}
CSCDCCHeader theDCCHeader
CSCDCCTrailer CSCDDUEventData::dccTrailer ( ) const
inline

Definition at line 41 of file CSCDDUEventData.h.

References theDCCTrailer.

41 {return theDCCTrailer;}
CSCDCCTrailer theDCCTrailer
void CSCDDUEventData::decodeStatus ( int  status) const

prints out the error associated with this status from the header or trailer

this is a mask for printing out errors

Definition at line 52 of file CSCDDUEventData.cc.

References errMask, and LogTrace.

53 {
54  // JRG is Jason Gilmore
55  // JRG, low-order 16-bit status (most serious errors):
56  if((code&errMask)>0)
57  {
58  // JRG, low-order 16-bit status (most serious errors):
59  if((code&0x0000F000)>0)
60  {
61  if((0x00008000&code)>0)
62  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Critical Error, ** needs reset **";
63  if((0x00004000&code)>0)
64  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Single Error, bad event";
65  if((0x00002000&code)>0)
66  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Single Warning";
67  if((0x00001000&code)>0)
68  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Near Full Warning";
69  }
70  if((code&0x00000F00)>0)
71  {
72  if((0x00000800&code)>0)
73  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU 64-bit Alignment Error";
74  if((0x00000400&code)>0)
75  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Control DLL Error occured";
76  if((0x00000200&code)>0)
77  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU DMB Error occurred";
78  if((0x00000100&code)>0)
79  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Lost In Event Error";
80  }
81  if((code&0x000000F0)>0)
82  {
83  if((0x00000080&code)>0)
84  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Lost In Data Error occurred";
85  if((0x00000040&code)>0)
86  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Timeout Error";
87  if((0x00000020&code)>0)
88  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " TMB or ALCT CRC Error";
89  if((0x00000010&code)>0)
90  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Multiple Transmit Errors";
91  }
92  if((code&0x0000000F)>0)
93  {
94  if((0x00000008&code)>0)
95  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Sync Lost or FIFO Full Error";
96  if((0x00000004&code)>0)
97  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Fiber/FIFO Connection Error";
98  if((0x00000002&code)>0)
99  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU L1A Match Error";
100  if((0x00000001&code)>0)
101  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU DMB or CFEB CRC Error";
102  }
103  if((code&0xF0000000)>0)
104  {
105  // JRG, high-order 16-bit status (not-so-serious errors):
106  if((0x80000000&code)>0)
107  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU DMB LCT/DAV/Movlp Mismatch";
108  if((0x40000000&code)>0)
109  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU-CFEB L1 Mismatch";
110  if((0x20000000&code)>0)
111  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU saw no good DMB CRCs";
112  if((0x10000000&code)>0)
113  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU CFEB Count Error";
114  }
115  if((code&0x0F000000)>0)
116  {
117  if((0x08000000&code)>0)
118  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU FirstDat Error";
119  if((0x04000000&code)>0)
120  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU L1A-FIFO Full Error";
121  if((0x02000000&code)>0)
122  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Data Stuck in FIFO";
123  if((0x01000000&code)>0)
124  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU NoLiveFibers Error";
125  }
126  if((code&0x00F00000)>0)
127  {
128  if((0x00800000&code)>0)
129  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Spwd single-bit Warning";
130  if((0x00400000&code)>0)
131  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Input FPGA Error";
132  if((0x00200000&code)>0)
133  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU DAQ Stop bit set";
134  if((0x00100000&code)>0)
135  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU DAQ says Not Ready";
136  if((0x00300000&code)==0x00200000)
137  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU DAQ Applied Backpressure";
138  }
139  if((code&0x000F0000)>0)
140  {
141  if((0x00080000&code)>0)
142  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU TMB Error";
143  if((0x00040000&code)>0)
144  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU ALCT Error";
145  if((0x00020000&code)>0)
146  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Trigger Readout Wordcount Error";
147  if((0x00010000&code)>0)
148  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " DDU Trigger L1A Match Error";
149  }
150  }
151 }
static unsigned int errMask
#define LogTrace(id)
void CSCDDUEventData::decodeStatus ( ) const

Definition at line 47 of file CSCDDUEventData.cc.

References CSCDDUTrailer::errorstat(), and theDDUTrailer.

Referenced by unpack_data().

48 {
50 }
unsigned errorstat() const
Definition: CSCDDUTrailer.h:41
void decodeStatus() const
CSCDDUTrailer theDDUTrailer
CSCDDUHeader CSCDDUEventData::header ( ) const
inline

Definition at line 36 of file CSCDDUEventData.h.

References theDDUHeader.

Referenced by CSCDDUEventData(), and cscdqm::EventProcessor::processDDU().

36 {return theDDUHeader;}
CSCDDUHeader theDDUHeader
boost::dynamic_bitset CSCDDUEventData::pack ( )

Alex check this 16 or 64.

returns packed event data

Definition at line 327 of file CSCDDUEventData.cc.

References bitset_utilities::append(), CSCDDUHeader::data(), CSCDDUTrailer::data(), i, query::result, CSCDDUTrailer::setWordCount(), CSCDDUTrailer::sizeInWords(), CSCDDUHeader::sizeInWords(), theData, theDDUHeader, theDDUTrailer, theSizeInWords, and bitset_utilities::ushortToBitset().

Referenced by pyrootRender.interactiveRender::draw().

328 {
329  boost::dynamic_bitset<> result = bitset_utilities::ushortToBitset( theDDUHeader.sizeInWords()*16,
330  theDDUHeader.data());
331  //std::cout <<"SANDRIK inside DDUEvdata check = ";
332  //theDDUHeader.check();
333  //std::cout <<std::endl;
334  //std::cout <<"printing out ddu header words"<<std::endl;
335  //for (unsigned int i=0;i<theDDUHeader.sizeInWords();i++) {
336  // unsigned short * buf = theDDUHeader.data();
337  // printf("%04x %04x %04x %04x\n",buf[i+3],buf[i+2],buf[i+1],buf[i]);
338  // i+=3;
339  //}
340  //std::cout <<"printing out ddu header words via bitset"<<std::endl;
341  //bitset_utilities::printWords(result);
342 
343  for(unsigned int i = 0; i < theData.size(); ++i)
344  {
345  result = bitset_utilities::append(result,theData[i].pack());
346  }
347  theSizeInWords = result.size()/16 + theDDUTrailer.sizeInWords();
348  // 64-bit word count
350  boost::dynamic_bitset<> dduTrailer = bitset_utilities::ushortToBitset ( theDDUTrailer.sizeInWords()*16,
351  theDDUTrailer.data());
352  result = bitset_utilities::append(result,dduTrailer);
353 
354  return result;
355 }
int i
Definition: DBlmapReader.cc:9
static unsigned sizeInWords()
Definition: CSCDDUTrailer.h:28
CSCDDUHeader theDDUHeader
void setWordCount(unsigned wordcount)
Definition: CSCDDUTrailer.h:43
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 ...
unsigned short * data()
Definition: CSCDDUTrailer.h:37
tuple result
Definition: query.py:137
static unsigned sizeInWords()
Definition: CSCDDUHeader.h:31
std::vector< CSCEventData > theData
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...
CSCDDUTrailer theDDUTrailer
unsigned short * data()
Definition: CSCDDUHeader.h:33
boost::dynamic_bitset pack()
Alex check this 16 or 64.
static void CSCDDUEventData::setDebug ( bool  value)
inlinestatic

Definition at line 30 of file CSCDDUEventData.h.

References debug, and relativeConstraints::value.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

30 {debug = value;}
static std::atomic< bool > debug
static void CSCDDUEventData::setErrorMask ( unsigned int  value)
inlinestatic

Definition at line 31 of file CSCDDUEventData.h.

References errMask, and relativeConstraints::value.

Referenced by CSCDCCUnpacker::CSCDCCUnpacker().

31 {errMask = value;}
static unsigned int errMask
int CSCDDUEventData::size ( void  ) const
inline

Definition at line 57 of file CSCDDUEventData.h.

References theSizeInWords.

Referenced by unpack_data().

57 {return theSizeInWords*16;}
int CSCDDUEventData::sizeInWords ( ) const
inline

Definition at line 56 of file CSCDDUEventData.h.

References theSizeInWords.

Referenced by check(), cscdqm::EventProcessor::processDDU(), and CSCDCCEventData::unpack_data().

56 {return theSizeInWords;}
CSCDDUTrailer CSCDDUEventData::trailer ( ) const
inline

Definition at line 37 of file CSCDDUEventData.h.

References theDDUTrailer.

Referenced by cscdqm::EventProcessor::processDDU().

37 {return theDDUTrailer;}
CSCDDUTrailer theDDUTrailer
uint16_t CSCDDUEventData::trailer0 ( ) const
inline

Definition at line 38 of file CSCDDUEventData.h.

References theDDUTrailer0.

38 {return theDDUTrailer0;}
uint16_t theDDUTrailer0
void CSCDDUEventData::unpack_data ( unsigned short *  buf,
CSCDCCExaminer examiner = NULL 
)
protected

a good test routine would be to unpack data, then pack it again.

To pack trailer 0

Pack Trailer 0 (to access TTS)

Definition at line 153 of file CSCDDUEventData.cc.

References CSCDDUTrailer::check(), gather_cfg::cout, CSCDCCExaminer::DDU_block(), CSCDCCExaminer::DDU_size(), debug, decodeStatus(), CSCDCCExaminer::DMB_block(), errMask, benchmark_cfg::errors, CSCDCCExaminer::errorsForChamber(), CSCDDUTrailer::errorstat(), errorstat, CSCDCCExaminer::getMask(), i, LogTrace, CSCDDUHeader::ncsc(), NULL, size(), CSCDDUTrailer::sizeInWords(), CSCDDUHeader::sizeInWords(), CSCDDUHeader::source_id(), theData, theDDUHeader, theDDUTrailer, theDDUTrailer0, and theSizeInWords.

154 {
155  // just to calculate length
156  uint16_t * inputBuf = buf;
157  uint16_t * inputBuf0 = buf;
158  theData.clear();
159  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi") << "CSCDDUEventData::unpack_data() is called";
160  if (debug)
161  for (int i=0;i<6;++i)
162  {
163  LogTrace ("CSCDDUEventData|CSCRawToDigi") << i << std::hex << buf[4*i+3] << buf[4*i+2]
164  << buf[4*i+1] << buf[4*i];
165  std::cout << i << " " << std::hex << buf[4*i+3] << " " << buf[4*i+2] << " "
166  << buf[4*i+1] << " " << buf[4*i] << std::endl;
167  }
168  //std::cout << "DDU Size: " << std::dec << theDDUHeader.sizeInWords() << std::endl;
169 
170  memcpy(&theDDUHeader, buf, theDDUHeader.sizeInWords()*2);
171 
172  if (debug) {
173  LogTrace ("CSCDDUEventData|CSCRawToDigi") << "size of ddu header in words = " << theDDUHeader.sizeInWords();
174  LogTrace ("CSCDDUEventData|CSCRawToDigi") << "sizeof(DDUHeader) = " << sizeof(theDDUHeader);
175  }
176  buf += theDDUHeader.sizeInWords();
177 
178 
179 
180 
181  //std::cout << "sandrik dduID =" << theDDUHeader.source_id() << std::endl;
182  //int i=-1;
183 
184 
185  // we really don't want to copy CSCEventData's while filling the vec
186  theData.clear();
187  theData.reserve(theDDUHeader.ncsc());
188 
189  if (examiner!= NULL) { // Use selective unpacking mode
190 
191  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi") << "selective unpacking starting";
192 
193  // Find this DDU in examiner's DDUs list
194  DDUIdType dduID = theDDUHeader.source_id();
195 
196  std::map<DDUIdType,std::map<CSCIdType,const uint16_t*> > ddus = examiner->DMB_block();
197  std::map<DDUIdType,std::map<CSCIdType,const uint16_t*> >::iterator ddu_itr = ddus.find(dduID);
198  uint16_t* dduBlock = (uint16_t*)((examiner->DDU_block())[dduID]);
199  uint32_t dduBufSize = (examiner->DDU_size())[dduID];
200 
201  if (ddu_itr != ddus.end() && dduBufSize!=0 && dduBlock==inputBuf) {
202  std::map<CSCIdType,const uint16_t*> &cscs = ddu_itr->second;
203  std::map<CSCIdType,const uint16_t*>::iterator csc_itr;
204 
205  for (csc_itr=cscs.begin(); csc_itr != cscs.end(); ++csc_itr) {
206  short cscid = csc_itr->first;
207 
208  if(cscid != -1)
209  {
210  uint16_t* pos = (uint16_t*)csc_itr->second;
211 
212 
213  ExaminerStatusType errors = examiner->errorsForChamber(cscid);
214  if ((errors & examiner->getMask()) > 0 ) {
215  if (debug)
216  LogTrace ("CSCDDUEventData|CSCRawToDigi" )
217  << "skip unpacking of CSC " << cscid << " due format errors: 0x" << std::hex << errors << std::dec;
218  continue;
219  }
220 
221  theData.push_back(CSCEventData(pos));
222  }
223  }
224 
225  if (debug)
226  {
227  LogTrace ("CSCDDUEventData|CSCRawToDigi") << "size of vector of cscData = " << theData.size();
228  }
229  // std::cout << std::dec << theDDUTrailer.sizeInWords() << std::endl;
230  // decode ddu tail
231  memcpy(&theDDUTrailer, inputBuf+dduBufSize, theDDUTrailer.sizeInWords()*2);
232  // memcpy(&theDDUTrailer, dduBlock+(dduBufSize-theDDUTrailer.sizeInWords())*2, theDDUTrailer.sizeInWords()*2);
233  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi") << theDDUTrailer.check();
235  if ((errorstat&errMask) != 0)
236  {
237  if (theDDUTrailer.check())
238  {
239  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi")
240  << "+++ CSCDDUEventData warning: DDU Trailer errors = " << std::hex << errorstat << " +++ ";
241  if (debug) decodeStatus(errorstat);
242  }
243  else
244  {
245  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi" )
246  << " Unpacking lost DDU trailer - check() failed and 8 8 ffff 8 was not found ";
247  }
248  }
249 
250  if (debug) {
251  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " Final errorstat " << std::hex << errorstat << std::dec ;
252  }
253  // the trailer counts in 64-bit words
254 
255  // theSizeInWords = dduBufSize;
256  // buf=inputBuf+dduBufSize;
257 
258  }
259  theSizeInWords = dduBufSize+12;
260  buf=inputBuf+dduBufSize;
261 
262  } else {
263 
264 
265  while( (((buf[0]&0xf000) == 0x9000)||((buf[0]&0xf000) == 0xa000))
266  && (buf[3] != 0x8000)) {
267  // ++i;
268  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi") << "unpack csc data loop started";
269  theData.push_back(CSCEventData(buf));
270  buf += (theData.back()).size();
271  if (debug) {
272  LogTrace ("CSCDDUEventData|CSCRawToDigi") << "size of vector of cscData = " << theData.size();
273  }
274  }
275 
276  if (debug) {
277  LogTrace ("CSCDDUEventData|CSCRawToDigi") << "unpacking ddu trailer ";
278  LogTrace ("CSCDDUEventData|CSCRawToDigi") << std::hex << buf[3]<<" " << buf[2]
279  <<" " << buf[1]<<" " << buf[0];
280  }
281 
282  // decode ddu tail
283  memcpy(&theDDUTrailer, buf, theDDUTrailer.sizeInWords()*2);
284  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi") << theDDUTrailer.check();
286  if ((errorstat&errMask) != 0)
287  {
288  if (theDDUTrailer.check())
289  {
290  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi")
291  << "+++ CSCDDUEventData warning: DDU Trailer errors = " << std::hex << errorstat << " +++ ";
292  if (debug) decodeStatus(errorstat);
293  }
294  else
295  {
296  if (debug) LogTrace ("CSCDDUEventData|CSCRawToDigi" )
297  << " Unpacking lost DDU trailer - check() failed and 8 8 ffff 8 was not found ";
298  }
299  }
300 
301  if (debug)
302  LogTrace ("CSCDDUEventData|CSCRawToDigi") << " Final errorstat " << std::hex << errorstat << std::dec ;
303  // the trailer counts in 64-bit words
304  buf += theDDUTrailer.sizeInWords();
305 
306  theSizeInWords = buf - inputBuf;
307  }
308 
309 //std::cout << "DDUevData Size: " << theSizeInWords << " BUFlast: " << std::hex << inputBuf0[theSizeInWords-4] << //std::endl;
311 theDDUTrailer0 = inputBuf0[theSizeInWords-4];
312 }
int i
Definition: DBlmapReader.cc:9
static unsigned sizeInWords()
Definition: CSCDDUTrailer.h:28
CSCDDUHeader theDDUHeader
unsigned errorstat() const
Definition: CSCDDUTrailer.h:41
ExaminerStatusType errorsForChamber(CSCIdType chamber) const
#define NULL
Definition: scimark2.h:8
std::map< DDUIdType, std::map< CSCIdType, const uint16_t * > > DMB_block(void) const
bool check() const
Definition: CSCDDUTrailer.h:30
static unsigned int errMask
std::map< DDUIdType, uint32_t > DDU_size(void) const
#define LogTrace(id)
std::map< DDUIdType, const uint16_t * > DDU_block(void) const
ExaminerMaskType getMask() const
uint16_t theDDUTrailer0
uint32_t ExaminerStatusType
int size() const
static unsigned sizeInWords()
Definition: CSCDDUHeader.h:31
int16_t DDUIdType
std::vector< CSCEventData > theData
tuple cout
Definition: gather_cfg.py:121
int ncsc() const
Definition: CSCDDUHeader.h:25
int source_id() const
Definition: CSCDDUHeader.h:21
void decodeStatus() const
CSCDDUTrailer theDDUTrailer
static std::atomic< bool > debug
long unsigned int errorstat
trailer info

Member Data Documentation

std::atomic< bool > CSCDDUEventData::debug {false}
static
uint32_t CSCDDUEventData::errMask = 0xFFFFFFFF
static

Definition at line 64 of file CSCDDUEventData.h.

Referenced by decodeStatus(), setErrorMask(), and unpack_data().

long unsigned int CSCDDUEventData::errorstat

trailer info

Definition at line 48 of file CSCDDUEventData.h.

Referenced by unpack_data().

std::vector<CSCEventData> CSCDDUEventData::theData
protected

Definition at line 72 of file CSCDDUEventData.h.

Referenced by add(), cscData(), pack(), and unpack_data().

CSCDCCHeader CSCDDUEventData::theDCCHeader
protected

Definition at line 69 of file CSCDDUEventData.h.

Referenced by dccHeader().

CSCDCCTrailer CSCDDUEventData::theDCCTrailer
protected

Definition at line 74 of file CSCDDUEventData.h.

Referenced by dccTrailer().

CSCDDUHeader CSCDDUEventData::theDDUHeader
protected

Definition at line 70 of file CSCDDUEventData.h.

Referenced by add(), check(), CSCDDUEventData(), header(), pack(), and unpack_data().

CSCDDUTrailer CSCDDUEventData::theDDUTrailer
protected

Definition at line 73 of file CSCDDUEventData.h.

Referenced by check(), decodeStatus(), pack(), trailer(), and unpack_data().

uint16_t CSCDDUEventData::theDDUTrailer0
protected

Definition at line 75 of file CSCDDUEventData.h.

Referenced by trailer0(), and unpack_data().

int CSCDDUEventData::theSizeInWords
protected

Definition at line 76 of file CSCDDUEventData.h.

Referenced by pack(), size(), sizeInWords(), and unpack_data().