CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

rpcrawtodigi::ReadoutError Class Reference

#include <ReadoutError.h>

List of all members.

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

Enumerator:
NoProblem 
HeaderCheckFail 
InconsitentFedId 
TrailerCheckFail 
InconsistentDataSize 
InvalidLB 
EmptyPackedStrips 
InvalidDetId 
InvalidStrip 
EOD 

Definition at line 11 of file ReadoutError.h.


Constructor & Destructor Documentation

rpcrawtodigi::ReadoutError::ReadoutError ( unsigned int  rawCode = 0) [inline, explicit]

Definition at line 24 of file ReadoutError.h.

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

                                                                                              {

  unsigned int where = (path.dccId<< 13) | (path.dccInputChannelNum << 7) | (path.tbLinkInputNum << 2) | path.lbNumInLink;
  unsigned int what  = type;
  theError =  (where<<4) | (what & 0xf);
}

Member Function Documentation

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

Definition at line 31 of file ReadoutError.cc.

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

{
  std::string result;
  switch (code) {
    case (HeaderCheckFail)      : { result = "HeaderCheckFail"; break; }
    case (InconsitentFedId)     : { result = "InconsitentFedId"; break; }
    case (TrailerCheckFail)     : { result = "TrailerCheckFail"; break; }
    case (InconsistentDataSize) : { result = "InconsistentDataSize"; break; }
    case (InvalidLB)            : { result = "InvalidLB"; break; }
    case (EmptyPackedStrips)    : { result = "EmptyPackedStrips"; break; }
    case (InvalidDetId)         : { result = "InvalidDetId"; break; }
    case (InvalidStrip)         : { result = "InvalidStrip"; break; }
    case (EOD)                  : { result = "EOD"; break; }
    default                     : { result = "NoProblem"; }
  }
  return result;
}
std::string rpcrawtodigi::ReadoutError::name ( ) const [inline]

Definition at line 33 of file ReadoutError.h.

References name(), and type().

Referenced by RPCRawDataCountsHistoMaker::emptyReadoutErrorHisto(), and name().

{ return name(type()); }
unsigned int rpcrawtodigi::ReadoutError::rawCode ( ) const [inline]

Definition at line 35 of file ReadoutError.h.

References theError.

Referenced by RPCRawDataCounts::addReadoutError().

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

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

Member Data Documentation

unsigned int rpcrawtodigi::ReadoutError::theError [private]

Definition at line 38 of file ReadoutError.h.

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