ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
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
More...
 
bool statusOK (ProblemType pb) const
 Returns true if there is no problem in corresponding status bit. More...
 
bool good () const
 Returns true if no problems at all (all bits at zero) More...
 
bool deadAll () const
 FEB is completely missing, e.g. powered off. More...
 
bool deadReadout () const
 FEB is not sending readout data, but the L1 trigger path is working. More...
 
bool inError () const
 FEB has readout errors, cannot be used. More...
 
bool deactivatedInOKS () const
 Deactivated in OKS. More...
 
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) {}

◆ LArBadFeb() [2/2]

LArBadFeb::LArBadFeb ( BitWord  rawStatus)
inlineexplicit

Definition at line 15 of file LArBadFeb.h.

15 : m_word(rawStatus) {}

Member Function Documentation

◆ bitPosition()

static PosType LArBadFeb::bitPosition ( ProblemType  pb)
inlinestatic

Definition at line 43 of file LArBadFeb.h.

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

◆ deactivatedInOKS()

bool LArBadFeb::deactivatedInOKS ( ) const
inline

Deactivated in OKS.

Definition at line 39 of file LArBadFeb.h.

◆ 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  }

◆ 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);}

Friends And Related Function Documentation

◆ 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:
LArBadFebEnum::maskEmptyDataBlock
@ maskEmptyDataBlock
Definition: LArBadFebEnum.h:29
LArBadFebEnum::PosType
unsigned int PosType
Definition: LArBadFebEnum.h:12
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
LArBadFebEnum::maskScacStatus
@ maskScacStatus
Definition: LArBadFebEnum.h:24
LArBadFebEnum::maskDspBlockSize
@ maskDspBlockSize
Definition: LArBadFebEnum.h:30
LArBadFebEnum::maskGainMismatch
@ maskGainMismatch
Definition: LArBadFebEnum.h:26
LArBadFebEnum::maskParity
@ maskParity
Definition: LArBadFebEnum.h:20
LArBadFebEnum::BitWord
unsigned int BitWord
Definition: LArBadFebEnum.h:13
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LArBadFebEnum::deadAllBit
@ deadAllBit
Definition: LArBadFebEnum.h:16
LArBadFebEnum::maskTypeMismatch
@ maskTypeMismatch
Definition: LArBadFebEnum.h:27
LArBadFebEnum::maskMissingHeader
@ maskMissingHeader
Definition: LArBadFebEnum.h:32
LArBadFebEnum::inErrorBit
@ inErrorBit
Definition: LArBadFebEnum.h:18
LArBadFebEnum::maskCheckSum
@ maskCheckSum
Definition: LArBadFebEnum.h:31
LArBadFebEnum::deadReadoutBit
@ deadReadoutBit
Definition: LArBadFebEnum.h:17
LArBadFebEnum::maskSampleHeader
@ maskSampleHeader
Definition: LArBadFebEnum.h:22
LArBadFebEnum::maskNumOfSamples
@ maskNumOfSamples
Definition: LArBadFebEnum.h:28
LArBadFeb::bitPosition
static PosType bitPosition(ProblemType pb)
Definition: LArBadFeb.h:43
LArBadFebEnum::deactivatedInOKSBit
@ deactivatedInOKSBit
Definition: LArBadFebEnum.h:19
LArBadFebEnum::maskEVTID
@ maskEVTID
Definition: LArBadFebEnum.h:23
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
LArBadFeb::m_word
BitWord m_word
Definition: LArBadFeb.h:56
LArBadFebEnum::maskScaOutOfRange
@ maskScaOutOfRange
Definition: LArBadFebEnum.h:25
LArBadFeb::statusBad
bool statusBad(ProblemType pb) const
Returns true if corresponding status bit its set
Definition: LArBadFeb.h:18
LArBadFebEnum::maskBadGain
@ maskBadGain
Definition: LArBadFebEnum.h:33
LArBadFebEnum::maskBCID
@ maskBCID
Definition: LArBadFebEnum.h:21