ATLAS Offline Software
Loading...
Searching...
No Matches
LArBadFeb Class Reference

#include <LArBadFeb.h>

Inheritance diagram for LArBadFeb:
Collaboration diagram for LArBadFeb:

Public Types

enum  ProblemType {
  deadAllBit = 0 , deadReadoutBit = 1 , inErrorBit = 2 , deactivatedInOKSBit = 3 ,
  maskParity = 16 , maskBCID =17 , maskSampleHeader = 18 , maskEVTID = 19 ,
  maskScacStatus = 20 , maskScaOutOfRange = 21 , maskGainMismatch = 22 , maskTypeMismatch = 23 ,
  maskNumOfSamples = 24 , maskEmptyDataBlock = 25 , maskDspBlockSize = 26 , maskCheckSum = 27 ,
  maskMissingHeader = 28 , maskBadGain = 29
}
typedef unsigned int PosType
typedef unsigned int BitWord

Public Member Functions

 LArBadFeb ()
 LArBadFeb (BitWord rawStatus)
bool statusBad (ProblemType pb) const
 Returns true if corresponding status bit its set.
bool statusOK (ProblemType pb) const
 Returns true if there is no problem in corresponding status bit.
bool good () const
 Returns true if no problems at all (all bits at zero)
bool deadAll () const
 FEB is completely missing, e.g. powered off.
bool deadReadout () const
 FEB is not sending readout data, but the L1 trigger path is working.
bool inError () const
 FEB has readout errors, cannot be used.
bool deactivatedInOKS () const
 Deactivated in OKS.
unsigned int ignoreErrors () const
bool operator!= (BitWord other)
bool operator!= (LArBadFeb other)
bool operator== (BitWord other)
bool operator== (LArBadFeb other)
LArBadFeboperator|= (LArBadFeb other)
BitWord packedData () const

Static Public Member Functions

static PosType bitPosition (ProblemType pb)

Private Member Functions

BitWordpackedDataRef ()

Private Attributes

BitWord m_word

Friends

class LArBadFebBitPacking

Detailed Description

Definition at line 10 of file LArBadFeb.h.

Member Typedef Documentation

◆ BitWord

typedef unsigned int LArBadFebEnum::BitWord
inherited

Definition at line 13 of file LArBadFebEnum.h.

◆ PosType

typedef unsigned int LArBadFebEnum::PosType
inherited

Definition at line 12 of file LArBadFebEnum.h.

Member Enumeration Documentation

◆ ProblemType

Enumerator
deadAllBit 
deadReadoutBit 
inErrorBit 
deactivatedInOKSBit 
maskParity 
maskBCID 
maskSampleHeader 
maskEVTID 
maskScacStatus 
maskScaOutOfRange 
maskGainMismatch 
maskTypeMismatch 
maskNumOfSamples 
maskEmptyDataBlock 
maskDspBlockSize 
maskCheckSum 
maskMissingHeader 
maskBadGain 

Definition at line 15 of file LArBadFebEnum.h.

15 {
16 deadAllBit = 0,
17 deadReadoutBit = 1,
18 inErrorBit = 2,
19 deactivatedInOKSBit = 3, //From LArFebErrorSummary.h:
20 maskParity = 16, //Parity,
21 maskBCID =17, //BCID,
22 maskSampleHeader = 18, //SampleHeader,
23 maskEVTID = 19, //EVTID,
24 maskScacStatus = 20, //ScacStatus,
25 maskScaOutOfRange = 21, //ScaOutOfRange,
26 maskGainMismatch = 22, //GainMismatch,
27 maskTypeMismatch = 23, //TypeMismatch,
28 maskNumOfSamples = 24, //NumOfSamples,
29 maskEmptyDataBlock = 25, //EmptyDataBlock,
30 maskDspBlockSize = 26, //DspBlockSize,
31 maskCheckSum = 27, //CheckSum,
32 maskMissingHeader = 28, //MissingHeader,
33 maskBadGain = 29 //BadGain,
34 //N_LArFebErrorType
35 };

Constructor & Destructor Documentation

◆ LArBadFeb() [1/2]

LArBadFeb::LArBadFeb ( )
inline

Definition at line 13 of file LArBadFeb.h.

13: m_word(0) {}
BitWord m_word
Definition LArBadFeb.h:56

◆ LArBadFeb() [2/2]

LArBadFeb::LArBadFeb ( BitWord rawStatus)
inlineexplicit

Definition at line 15 of file LArBadFeb.h.

15: m_word(rawStatus) {}

Member Function Documentation

◆ bitPosition()

PosType LArBadFeb::bitPosition ( ProblemType pb)
inlinestatic

Definition at line 43 of file LArBadFeb.h.

43{ return static_cast<PosType>(pb);}
unsigned int PosType

◆ deactivatedInOKS()

bool LArBadFeb::deactivatedInOKS ( ) const
inline

Deactivated in OKS.

Definition at line 39 of file LArBadFeb.h.

bool statusBad(ProblemType pb) const
Returns true if corresponding status bit its set.
Definition LArBadFeb.h:18

◆ deadAll()

bool LArBadFeb::deadAll ( ) const
inline

FEB is completely missing, e.g. powered off.

Definition at line 30 of file LArBadFeb.h.

30{return statusBad( deadAllBit);}

◆ deadReadout()

bool LArBadFeb::deadReadout ( ) const
inline

FEB is not sending readout data, but the L1 trigger path is working.

Definition at line 33 of file LArBadFeb.h.

33{return statusBad( deadReadoutBit);}

◆ good()

bool LArBadFeb::good ( ) const
inline

Returns true if no problems at all (all bits at zero)

Definition at line 27 of file LArBadFeb.h.

27{return (m_word << 16) == 0;} // only use the lower 16 bits

◆ ignoreErrors()

unsigned int LArBadFeb::ignoreErrors ( ) const
inline

Definition at line 65 of file LArBadFeb.h.

66{
67 return (m_word >> 16); // return the most significant 16 bits
68}

◆ inError()

bool LArBadFeb::inError ( ) const
inline

FEB has readout errors, cannot be used.

Definition at line 36 of file LArBadFeb.h.

36{return statusBad( inErrorBit);}

◆ operator!=() [1/2]

bool LArBadFeb::operator!= ( BitWord other)
inline

Definition at line 45 of file LArBadFeb.h.

45{return m_word != other;}

◆ operator!=() [2/2]

bool LArBadFeb::operator!= ( LArBadFeb other)
inline

Definition at line 46 of file LArBadFeb.h.

46{return m_word != other.packedData();}

◆ operator==() [1/2]

bool LArBadFeb::operator== ( BitWord other)
inline

Definition at line 47 of file LArBadFeb.h.

47{return m_word == other;}

◆ operator==() [2/2]

bool LArBadFeb::operator== ( LArBadFeb other)
inline

Definition at line 48 of file LArBadFeb.h.

48{return m_word == other.packedData();}

◆ operator|=()

LArBadFeb & LArBadFeb::operator|= ( LArBadFeb other)
inline

Definition at line 50 of file LArBadFeb.h.

50{m_word|=other.m_word; return *this;}

◆ packedData()

BitWord LArBadFeb::packedData ( ) const
inline

Definition at line 52 of file LArBadFeb.h.

52{return m_word;}

◆ packedDataRef()

BitWord & LArBadFeb::packedDataRef ( )
inlineprivate

Definition at line 58 of file LArBadFeb.h.

58{return m_word;}

◆ statusBad()

bool LArBadFeb::statusBad ( ProblemType pb) const
inline

Returns true if corresponding status bit its set.

Definition at line 18 of file LArBadFeb.h.

18 {
19 BitWord mask = 1 << bitPosition(pb);
20 return ((m_word & mask) != 0);
21 }
unsigned int BitWord
static PosType bitPosition(ProblemType pb)
Definition LArBadFeb.h:43

◆ statusOK()

bool LArBadFeb::statusOK ( ProblemType pb) const
inline

Returns true if there is no problem in corresponding status bit.

Definition at line 24 of file LArBadFeb.h.

24{return !statusBad(pb);}

◆ LArBadFebBitPacking

friend class LArBadFebBitPacking
friend

Definition at line 60 of file LArBadFeb.h.

Member Data Documentation

◆ m_word

BitWord LArBadFeb::m_word
private

Definition at line 56 of file LArBadFeb.h.


The documentation for this class was generated from the following file: