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

Constructor & Destructor Documentation

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

Definition at line 23 of file ReadoutError.h.

References name(), AlCaHLTBitMon_QueryRunRegistry::string, type(), and where().

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

Definition at line 7 of file ReadoutError.cc.

References LinkBoardElectronicIndex::dccId, LinkBoardElectronicIndex::dccInputChannelNum, LinkBoardElectronicIndex::lbNumInLink, LinkBoardElectronicIndex::tbLinkInputNum, 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
type
Definition: HCALResponse.h:21

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__(), validation.Sample::digest(), VIDSelectorBase.VIDSelectorBase::initialize(), and Vispa.Views.PropertyView.Property::valueChanged().

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: { result = "NoProblem"; }
69  }
70  return result;
71 }
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
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:82

Member Data Documentation

unsigned int rpcrawtodigi::ReadoutError::theError
private

Definition at line 37 of file ReadoutError.h.

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