ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
AbstractErrorCode Class Reference

AbstractErrorCode abstract base class for L1Calo error codes. More...

#include <AbstractErrorCode.h>

Inheritance diagram for AbstractErrorCode:
Collaboration diagram for AbstractErrorCode:

Public Member Functions

virtual ~AbstractErrorCode ()
 
unsigned int errorCode () const
 

Protected Member Functions

 AbstractErrorCode (unsigned int errorCode)
 
void errorCode (unsigned int code)
 
bool bitIsSet (unsigned int number) const
 
void setBit (unsigned int number, bool value)
 

Private Attributes

unsigned int m_errorCode
 

Detailed Description

AbstractErrorCode abstract base class for L1Calo error codes.

Author
Damien Prieur damie.nosp@m.n.pr.nosp@m.ieur@.nosp@m.cern.nosp@m..ch

Definition at line 16 of file AbstractErrorCode.h.

Constructor & Destructor Documentation

◆ ~AbstractErrorCode()

virtual AbstractErrorCode::~AbstractErrorCode ( )
inlinevirtual

Definition at line 19 of file AbstractErrorCode.h.

19 {};

◆ AbstractErrorCode()

AbstractErrorCode::AbstractErrorCode ( unsigned int  errorCode)
inlineprotected

Definition at line 24 of file AbstractErrorCode.h.

24 { m_errorCode = errorCode; };

Member Function Documentation

◆ bitIsSet()

bool AbstractErrorCode::bitIsSet ( unsigned int  number) const
protected

Definition at line 7 of file AbstractErrorCode.cxx.

7  {
8  unsigned int correspondingNumber = (unsigned int) (1<<number);
9 
10  bool isSet( ( m_errorCode & correspondingNumber) > 0);
11 
12  return isSet;
13 }

◆ errorCode() [1/2]

unsigned int AbstractErrorCode::errorCode ( ) const
inline

Definition at line 21 of file AbstractErrorCode.h.

21 {return m_errorCode;}

◆ errorCode() [2/2]

void AbstractErrorCode::errorCode ( unsigned int  code)
inlineprotected

Definition at line 26 of file AbstractErrorCode.h.

26 {m_errorCode = code;}

◆ setBit()

void AbstractErrorCode::setBit ( unsigned int  number,
bool  value 
)
protected

Definition at line 15 of file AbstractErrorCode.cxx.

15  {
16  bool isSet(bitIsSet(number));
17  unsigned int correspondingNumber = (unsigned int) (1<<number);
18 
19  // set bit if not set yet
20  if ((value) && (!isSet)) m_errorCode |= correspondingNumber;
21  // remove bit if bit is set
22  if ((!value) && (isSet)) m_errorCode &= ~correspondingNumber;
23 }

Member Data Documentation

◆ m_errorCode

unsigned int AbstractErrorCode::m_errorCode
private

Definition at line 32 of file AbstractErrorCode.h.


The documentation for this class was generated from the following files:
AbstractErrorCode::errorCode
unsigned int errorCode() const
Definition: AbstractErrorCode.h:21
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
athena.value
value
Definition: athena.py:124
AbstractErrorCode::m_errorCode
unsigned int m_errorCode
Definition: AbstractErrorCode.h:32
histSizes.code
code
Definition: histSizes.py:129
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
python.selection.number
number
Definition: selection.py:20