CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
rpcrawtodigi::ReadoutError Class Reference

#include <ReadoutError.h>

Public Types

enum  ReadoutErrorType {
  NoProblem = 0, HeaderCheckFail = 1, InconsitentFedId = 2, TrailerCheckFail = 3,
  InconsistentDataSize = 4, InvalidLB = 5, EmptyPackedStrips = 6, InvalidDetId = 7,
  InvalidStrip = 8, EOD = 9
}
 

Public Member Functions

std::string name () const
 
unsigned int rawCode () const
 
 ReadoutError (unsigned int rawCode=0)
 
 ReadoutError (const LinkBoardElectronicIndex &, const ReadoutErrorType &)
 
ReadoutErrorType type () const
 
LinkBoardElectronicIndex where () const
 

Static Public Member Functions

static std::string name (const ReadoutErrorType &code)
 

Private Attributes

unsigned int theError
 

Detailed Description

Definition at line 8 of file ReadoutError.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

rpcrawtodigi::ReadoutError::ReadoutError ( unsigned int  rawCode = 0)
inlineexplicit

Definition at line 23 of file ReadoutError.h.

23 : theError(rawCode) {}
unsigned int rawCode() const
Definition: ReadoutError.h:34
ReadoutError::ReadoutError ( const LinkBoardElectronicIndex path,
const ReadoutErrorType type 
)

Member Function Documentation

std::string ReadoutError::name ( const ReadoutErrorType code)
static

Definition at line 29 of file ReadoutError.cc.

References EmptyPackedStrips, EOD, HeaderCheckFail, InconsistentDataSize, InconsitentFedId, InvalidDetId, InvalidLB, InvalidStrip, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, and TrailerCheckFail.

Referenced by config.CFG::__str__(), geometryComparison.GeometryComparison::createScript(), validation.Sample::digest(), primaryVertexResolution.PrimaryVertexResolution::getRepMap(), primaryVertexValidation.PrimaryVertexValidation::getRepMap(), zMuMuValidation.ZMuMuValidation::getRepMap(), and VIDSelectorBase.VIDSelectorBase::initialize().

29  {
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 }
tuple result
Definition: mps_fire.py:311
std::string rpcrawtodigi::ReadoutError::name ( ) const
inline
unsigned int rpcrawtodigi::ReadoutError::rawCode ( ) const
inline

Definition at line 34 of file ReadoutError.h.

References theError.

Referenced by RPCRawDataCounts::addReadoutError().

34 { return theError; }
ReadoutError::ReadoutErrorType ReadoutError::type ( ) const

Definition at line 14 of file ReadoutError.cc.

References theError.

Referenced by RPCMonitorRaw::analyze(), name(), and RPCRecordFormatter::recordUnpack().

14  {
15  //return static_cast<ReadoutErrorType>(theError&0xf);
16  return ReadoutErrorType(theError & 0xf);
17 }
LinkBoardElectronicIndex ReadoutError::where ( ) const

Definition at line 19 of file ReadoutError.cc.

References data, LinkBoardElectronicIndex::dccId, LinkBoardElectronicIndex::dccInputChannelNum, LinkBoardElectronicIndex::lbNumInLink, LinkBoardElectronicIndex::tbLinkInputNum, and theError.

Referenced by RPCMonitorRaw::analyze(), and ReadoutError().

19  {
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 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

Member Data Documentation

unsigned int rpcrawtodigi::ReadoutError::theError
private

Definition at line 37 of file ReadoutError.h.

Referenced by rawCode(), ReadoutError(), type(), and where().