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

ChanFitErrorCode stores information about the calibration fit quality. More...

#include <ChanFitErrorCode.h>

Inheritance diagram for ChanFitErrorCode:
Collaboration diagram for ChanFitErrorCode:

Public Types

enum  ChanFitErrorCodeBits { NoDataBit = 0, BadDataBit = 1 }
 

Public Member Functions

 ChanFitErrorCode ()
 
 ChanFitErrorCode (unsigned int errorCode)
 
 ChanFitErrorCode (const ChanFitErrorCode &e)
 
ChanFitErrorCodeoperator= (const ChanFitErrorCode &rhs)
 
ChanFitErrorCodeoperator|= (const ChanFitErrorCode &rhs)
 
bool chanValid () const
 
bool noData () const
 
void noData (bool bad)
 
bool badData () const
 
void badData (bool bad)
 
unsigned int errorCode () const
 
void errorCode (unsigned int code)
 
unsigned int errorCode () const
 

Protected Member Functions

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

ChanFitErrorCode stores information about the calibration fit quality.

Author
Veit Scharf veit..nosp@m.scha.nosp@m.rf@ki.nosp@m.p.un.nosp@m.i-hei.nosp@m.delb.nosp@m.erg.d.nosp@m.e

Definition at line 16 of file ChanFitErrorCode.h.

Member Enumeration Documentation

◆ ChanFitErrorCodeBits

Enumerator
NoDataBit 
BadDataBit 

Definition at line 19 of file ChanFitErrorCode.h.

20  {
21  // to be extended
22  NoDataBit = 0,
23  BadDataBit = 1
24  };

Constructor & Destructor Documentation

◆ ChanFitErrorCode() [1/3]

ChanFitErrorCode::ChanFitErrorCode ( )

Definition at line 7 of file ChanFitErrorCode.cxx.

7  :
9 {}

◆ ChanFitErrorCode() [2/3]

ChanFitErrorCode::ChanFitErrorCode ( unsigned int  errorCode)

Definition at line 11 of file ChanFitErrorCode.cxx.

11  :
13 {}

◆ ChanFitErrorCode() [3/3]

ChanFitErrorCode::ChanFitErrorCode ( const ChanFitErrorCode e)

Definition at line 15 of file ChanFitErrorCode.cxx.

15  :
16  AbstractErrorCode(e.errorCode())
17 {}

Member Function Documentation

◆ badData() [1/2]

bool ChanFitErrorCode::badData ( ) const
inline

Definition at line 40 of file ChanFitErrorCode.h.

40 { return bitIsSet(BadDataBit); }

◆ badData() [2/2]

void ChanFitErrorCode::badData ( bool  bad)
inline

Definition at line 41 of file ChanFitErrorCode.h.

41 { setBit(BadDataBit, bad); }

◆ bitIsSet()

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

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 }

◆ chanValid()

bool ChanFitErrorCode::chanValid ( ) const

Definition at line 30 of file ChanFitErrorCode.cxx.

30  {
31  return (this->errorCode() == 0);
32 }

◆ errorCode() [1/4]

unsigned int AbstractErrorCode::errorCode ( ) const
inlineinherited

Definition at line 21 of file AbstractErrorCode.h.

21 {return m_errorCode;}

◆ errorCode() [2/4]

unsigned int AbstractErrorCode::errorCode
inline

Definition at line 21 of file AbstractErrorCode.h.

21 {return m_errorCode;}

◆ errorCode() [3/4]

void AbstractErrorCode::errorCode ( unsigned int  code)
inlineprotectedinherited

Definition at line 26 of file AbstractErrorCode.h.

26 {m_errorCode = code;}

◆ errorCode() [4/4]

void AbstractErrorCode::errorCode
inline

Definition at line 26 of file AbstractErrorCode.h.

26 {m_errorCode = code;}

◆ noData() [1/2]

bool ChanFitErrorCode::noData ( ) const
inline

Definition at line 37 of file ChanFitErrorCode.h.

37 { return bitIsSet(NoDataBit); }

◆ noData() [2/2]

void ChanFitErrorCode::noData ( bool  bad)
inline

Definition at line 38 of file ChanFitErrorCode.h.

38 { setBit(NoDataBit, bad); }

◆ operator=()

ChanFitErrorCode & ChanFitErrorCode::operator= ( const ChanFitErrorCode rhs)

Definition at line 19 of file ChanFitErrorCode.cxx.

19  {
20  this->errorCode(rhs.errorCode());
21  return *this;
22 }

◆ operator|=()

ChanFitErrorCode & ChanFitErrorCode::operator|= ( const ChanFitErrorCode rhs)

Definition at line 24 of file ChanFitErrorCode.cxx.

24  {
25  this->errorCode(this->errorCode() | rhs.errorCode());
26  return *this;
27 }

◆ setBit()

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

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
privateinherited

Definition at line 32 of file AbstractErrorCode.h.


The documentation for this class was generated from the following files:
bad
@ bad
Definition: SUSYToolsTester.cxx:95
AbstractErrorCode::setBit
void setBit(unsigned int number, bool value)
Definition: AbstractErrorCode.cxx:15
AbstractErrorCode::errorCode
unsigned int errorCode() const
Definition: AbstractErrorCode.h:21
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
athena.value
value
Definition: athena.py:122
AbstractErrorCode::AbstractErrorCode
AbstractErrorCode(unsigned int errorCode)
Definition: AbstractErrorCode.h:24
AbstractErrorCode::m_errorCode
unsigned int m_errorCode
Definition: AbstractErrorCode.h:32
ChanFitErrorCode::BadDataBit
@ BadDataBit
Definition: ChanFitErrorCode.h:23
ChanFitErrorCode::NoDataBit
@ NoDataBit
Definition: ChanFitErrorCode.h:22
AbstractErrorCode::bitIsSet
bool bitIsSet(unsigned int number) const
Definition: AbstractErrorCode.cxx:7
ChanFitErrorCode::errorCode
unsigned int errorCode() const
Definition: AbstractErrorCode.h:21
pmontree.code
code
Definition: pmontree.py:443
python.selection.number
number
Definition: selection.py:20
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26