CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ReadoutError.cc
Go to the documentation of this file.
2 #include <bitset>
3 #include <iostream>
4 
5 using namespace rpcrawtodigi;
6 
8 
9  unsigned int where = (path.dccId<< 13) | (path.dccInputChannelNum << 7) | (path.tbLinkInputNum << 2) | path.lbNumInLink;
10  unsigned int what = type;
11  theError = (where<<4) | (what & 0xf);
12 }
13 
15 {
16 //return static_cast<ReadoutErrorType>(theError&0xf);
17  return ReadoutErrorType(theError & 0xf);
18 }
19 
21 {
22  unsigned int data= (theError>>4);
24  ele.dccId = (data >> 13);
25  ele.dccInputChannelNum= (data >> 7) & 63;
26  ele.tbLinkInputNum = (data >> 2) & 31;
27  ele.lbNumInLink = data & 3;
28  return ele;
29 }
30 
32 {
34  switch (code) {
35  case (HeaderCheckFail) : { result = "HeaderCheckFail"; break; }
36  case (InconsitentFedId) : { result = "InconsitentFedId"; break; }
37  case (TrailerCheckFail) : { result = "TrailerCheckFail"; break; }
38  case (InconsistentDataSize) : { result = "InconsistentDataSize"; break; }
39  case (InvalidLB) : { result = "InvalidLB"; break; }
40  case (EmptyPackedStrips) : { result = "EmptyPackedStrips"; break; }
41  case (InvalidDetId) : { result = "InvalidDetId"; break; }
42  case (InvalidStrip) : { result = "InvalidStrip"; break; }
43  case (EOD) : { result = "EOD"; break; }
44  default : { result = "NoProblem"; }
45  }
46  return result;
47 }
48 
LinkBoardElectronicIndex where() const
Definition: ReadoutError.cc:20
type
Definition: HCALResponse.h:21
ReadoutError(unsigned int rawCode=0)
Definition: ReadoutError.h:24
std::string name() const
Definition: ReadoutError.h:33
ReadoutErrorType type() const
Definition: ReadoutError.cc:14
tuple result
Definition: query.py:137