CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ReadoutError.cc
Go to the documentation of this file.
2 #include <bitset>
3 #include <iostream>
4 
5 using namespace rpcrawtodigi;
6 
8  unsigned int where =
9  (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  //return static_cast<ReadoutErrorType>(theError&0xf);
16  return ReadoutErrorType(theError & 0xf);
17 }
18 
20  unsigned int data = (theError >> 4);
22  ele.dccId = (data >> 13);
23  ele.dccInputChannelNum = (data >> 7) & 63;
24  ele.tbLinkInputNum = (data >> 2) & 31;
25  ele.lbNumInLink = data & 3;
26  return ele;
27 }
28 
31  switch (code) {
32  case (HeaderCheckFail): {
33  result = "HeaderCheckFail";
34  break;
35  }
36  case (InconsitentFedId): {
37  result = "InconsitentFedId";
38  break;
39  }
40  case (TrailerCheckFail): {
41  result = "TrailerCheckFail";
42  break;
43  }
44  case (InconsistentDataSize): {
45  result = "InconsistentDataSize";
46  break;
47  }
48  case (InvalidLB): {
49  result = "InvalidLB";
50  break;
51  }
52  case (EmptyPackedStrips): {
53  result = "EmptyPackedStrips";
54  break;
55  }
56  case (InvalidDetId): {
57  result = "InvalidDetId";
58  break;
59  }
60  case (InvalidStrip): {
61  result = "InvalidStrip";
62  break;
63  }
64  case (EOD): {
65  result = "EOD";
66  break;
67  }
68  default: {
69  result = "NoProblem";
70  }
71  }
72  return result;
73 }
LinkBoardElectronicIndex where() const
Definition: ReadoutError.cc:19
ReadoutError(unsigned int rawCode=0)
Definition: ReadoutError.h:23
std::string name() const
Definition: ReadoutError.h:32
ReadoutErrorType type() const
Definition: ReadoutError.cc:14
tuple result
Definition: mps_fire.py:311
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79