ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CaloBadChannel Class Reference

#include <CaloBadChannel.h>

Collaboration diagram for CaloBadChannel:

Public Types

enum  ProblemType { deadBit =0, noisyBit =1, affectedBit =2 }
 
typedef unsigned int PosType
 
typedef unsigned int BitWord
 

Public Member Functions

 CaloBadChannel (BitWord rawStatus)
 
 CaloBadChannel ()
 
 CaloBadChannel (const CaloBadChannel &rBad)=default
 
 CaloBadChannel (const CaloBadChannel *pBad)
 
CaloBadChanneloperator= (const CaloBadChannel &rBad)=default
 
bool statusOK (ProblemType pb) const
 
bool dead () const
 
bool noisy () const
 
bool affected () const
 
BitWord packedData () const
 

Static Public Member Functions

static void setBit (ProblemType pb, BitWord &word, bool value=true)
 Sets the bit corresponding to "pb" inside the word passed as second argument to "value". More...
 

Private Attributes

BitWord m_word
 

Detailed Description

Definition at line 8 of file CaloBadChannel.h.

Member Typedef Documentation

◆ BitWord

typedef unsigned int CaloBadChannel::BitWord

Definition at line 12 of file CaloBadChannel.h.

◆ PosType

typedef unsigned int CaloBadChannel::PosType

Definition at line 11 of file CaloBadChannel.h.

Member Enumeration Documentation

◆ ProblemType

Enumerator
deadBit 
noisyBit 
affectedBit 

Definition at line 14 of file CaloBadChannel.h.

14 {deadBit=0, noisyBit=1, affectedBit=2};

Constructor & Destructor Documentation

◆ CaloBadChannel() [1/4]

CaloBadChannel::CaloBadChannel ( BitWord  rawStatus)
inline

Definition at line 16 of file CaloBadChannel.h.

16 : m_word(rawStatus) {}

◆ CaloBadChannel() [2/4]

CaloBadChannel::CaloBadChannel ( )
inline

Definition at line 17 of file CaloBadChannel.h.

17 : m_word(0) {}

◆ CaloBadChannel() [3/4]

CaloBadChannel::CaloBadChannel ( const CaloBadChannel rBad)
default

◆ CaloBadChannel() [4/4]

CaloBadChannel::CaloBadChannel ( const CaloBadChannel pBad)
inline

Definition at line 20 of file CaloBadChannel.h.

20 {m_word=pBad->m_word;}

Member Function Documentation

◆ affected()

bool CaloBadChannel::affected ( ) const
inline

Definition at line 30 of file CaloBadChannel.h.

30 {return !statusOK( affectedBit);}

◆ dead()

bool CaloBadChannel::dead ( ) const
inline

Definition at line 28 of file CaloBadChannel.h.

28 {return !statusOK( deadBit);}

◆ noisy()

bool CaloBadChannel::noisy ( ) const
inline

Definition at line 29 of file CaloBadChannel.h.

29 {return !statusOK( noisyBit);}

◆ operator=()

CaloBadChannel& CaloBadChannel::operator= ( const CaloBadChannel rBad)
default

◆ packedData()

BitWord CaloBadChannel::packedData ( ) const
inline

Definition at line 32 of file CaloBadChannel.h.

32 {return m_word;}

◆ setBit()

static void CaloBadChannel::setBit ( ProblemType  pb,
BitWord word,
bool  value = true 
)
inlinestatic

Sets the bit corresponding to "pb" inside the word passed as second argument to "value".

This static method provides a convenient way of setting the bits of a CaloBadChannel, without compromizing the const interface of the class. The Bits should be set in a BitWord, and then the BitWord passed to the constructor of CaloBadChannel.

Definition at line 38 of file CaloBadChannel.h.

38  {
39  BitWord mask = 1 << static_cast<PosType>(pb); // all at 0 axcept pb bit
40  if (value) word |= mask;
41  else word &= ~mask;
42  }

◆ statusOK()

bool CaloBadChannel::statusOK ( ProblemType  pb) const
inline

Definition at line 23 of file CaloBadChannel.h.

23  {
24  BitWord mask = 1 << (PosType) pb;
25  return ((m_word & mask) == 0); // OK means bit is not set
26  }

Member Data Documentation

◆ m_word

BitWord CaloBadChannel::m_word
private

Definition at line 46 of file CaloBadChannel.h.


The documentation for this class was generated from the following file:
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
CaloBadChannel::deadBit
@ deadBit
Definition: CaloBadChannel.h:14
CaloBadChannel::affectedBit
@ affectedBit
Definition: CaloBadChannel.h:14
athena.value
value
Definition: athena.py:124
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
CaloBadChannel::m_word
BitWord m_word
Definition: CaloBadChannel.h:46
CaloBadChannel::statusOK
bool statusOK(ProblemType pb) const
Definition: CaloBadChannel.h:23
CaloBadChannel::BitWord
unsigned int BitWord
Definition: CaloBadChannel.h:12
CaloBadChannel::noisyBit
@ noisyBit
Definition: CaloBadChannel.h:14
CaloBadChannel::PosType
unsigned int PosType
Definition: CaloBadChannel.h:11