CMS 3D CMS Logo

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

◆ ReadoutErrorType

Constructor & Destructor Documentation

◆ ReadoutError() [1/2]

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() [2/2]

ReadoutError::ReadoutError ( const LinkBoardElectronicIndex path,
const ReadoutErrorType type 
)

Definition at line 7 of file ReadoutError.cc.

References EnsembleCalibrationLA_cfg::path, theError, and where().

7  {
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 }
LinkBoardElectronicIndex where() const
Definition: ReadoutError.cc:19

Member Function Documentation

◆ name() [1/2]

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__(), validation.Sample::digest(), 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 }

◆ name() [2/2]

std::string rpcrawtodigi::ReadoutError::name ( ) const
inline

◆ rawCode()

unsigned int rpcrawtodigi::ReadoutError::rawCode ( ) const
inline

Definition at line 34 of file ReadoutError.h.

References theError.

34 { return theError; }

◆ type()

ReadoutError::ReadoutErrorType ReadoutError::type ( ) const

Definition at line 14 of file ReadoutError.cc.

References theError.

Referenced by name().

14  {
15  //return static_cast<ReadoutErrorType>(theError&0xf);
16  return ReadoutErrorType(theError & 0xf);
17 }

◆ where()

LinkBoardElectronicIndex ReadoutError::where ( ) const

Member Data Documentation

◆ theError

unsigned int rpcrawtodigi::ReadoutError::theError
private

Definition at line 37 of file ReadoutError.h.

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