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 (const LinkBoardElectronicIndex &, const ReadoutErrorType &)
 
 ReadoutError (unsigned int rawCode=0)
 
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

Enumerator
NoProblem 
HeaderCheckFail 
InconsitentFedId 
TrailerCheckFail 
InconsistentDataSize 
InvalidLB 
EmptyPackedStrips 
InvalidDetId 
InvalidStrip 
EOD 

Definition at line 10 of file ReadoutError.h.

10  {
11  NoProblem = 0,
12  HeaderCheckFail = 1,
13  InconsitentFedId = 2,
14  TrailerCheckFail = 3,
16  InvalidLB = 5,
18  InvalidDetId = 7,
19  InvalidStrip = 8,
20  EOD = 9
21  };

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) {}

◆ ReadoutError() [2/2]

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

Definition at line 7 of file ReadoutError.cc.

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 }

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

Member Function Documentation

◆ name() [1/2]

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

◆ name() [2/2]

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

Definition at line 29 of file ReadoutError.cc.

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 }

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().

◆ rawCode()

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

Definition at line 34 of file ReadoutError.h.

34 { return theError; }

References theError.

◆ type()

ReadoutError::ReadoutErrorType ReadoutError::type ( ) const

Definition at line 14 of file ReadoutError.cc.

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

References theError.

Referenced by name().

◆ where()

LinkBoardElectronicIndex ReadoutError::where ( ) const

Definition at line 19 of file ReadoutError.cc.

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 }

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

Referenced by ReadoutError().

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().

rpcrawtodigi::ReadoutError::ReadoutErrorType
ReadoutErrorType
Definition: ReadoutError.h:10
rpcrawtodigi::ReadoutError::EOD
Definition: ReadoutError.h:20
LinkBoardElectronicIndex::dccId
int dccId
Definition: LinkBoardElectronicIndex.h:11
rpcrawtodigi::ReadoutError::theError
unsigned int theError
Definition: ReadoutError.h:37
rpcrawtodigi::ReadoutError::type
ReadoutErrorType type() const
Definition: ReadoutError.cc:14
rpcrawtodigi::ReadoutError::NoProblem
Definition: ReadoutError.h:11
rpcrawtodigi::ReadoutError::InvalidLB
Definition: ReadoutError.h:16
rpcrawtodigi::ReadoutError::EmptyPackedStrips
Definition: ReadoutError.h:17
LinkBoardElectronicIndex::dccInputChannelNum
int dccInputChannelNum
Definition: LinkBoardElectronicIndex.h:12
rpcrawtodigi::ReadoutError::InvalidStrip
Definition: ReadoutError.h:19
rpcrawtodigi::ReadoutError::InconsitentFedId
Definition: ReadoutError.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LinkBoardElectronicIndex::tbLinkInputNum
int tbLinkInputNum
Definition: LinkBoardElectronicIndex.h:13
rpcrawtodigi::ReadoutError::InconsistentDataSize
Definition: ReadoutError.h:15
rpcrawtodigi::ReadoutError::HeaderCheckFail
Definition: ReadoutError.h:12
rpcrawtodigi::ReadoutError::name
std::string name() const
Definition: ReadoutError.h:32
rpcrawtodigi::ReadoutError::rawCode
unsigned int rawCode() const
Definition: ReadoutError.h:34
rpcrawtodigi::ReadoutError::InvalidDetId
Definition: ReadoutError.h:18
LinkBoardElectronicIndex
Definition: LinkBoardElectronicIndex.h:10
type
type
Definition: HCALResponse.h:21
rpcrawtodigi::ReadoutError::TrailerCheckFail
Definition: ReadoutError.h:14
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
mps_fire.result
result
Definition: mps_fire.py:303
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
rpcrawtodigi::ReadoutError::where
LinkBoardElectronicIndex where() const
Definition: ReadoutError.cc:19
LinkBoardElectronicIndex::lbNumInLink
int lbNumInLink
Definition: LinkBoardElectronicIndex.h:14