ATLAS Offline Software
Loading...
Searching...
No Matches
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)

Protected Member Functions

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{}
AbstractErrorCode(unsigned int errorCode)

◆ ChanFitErrorCode() [2/3]

ChanFitErrorCode::ChanFitErrorCode ( unsigned int errorCode)

Definition at line 11 of file ChanFitErrorCode.cxx.

11 :
13{}
unsigned int errorCode() const

◆ ChanFitErrorCode() [3/3]

ChanFitErrorCode::ChanFitErrorCode ( const ChanFitErrorCode & e)

Definition at line 15 of file ChanFitErrorCode.cxx.

Member Function Documentation

◆ badData() [1/2]

bool ChanFitErrorCode::badData ( ) const
inline

Definition at line 40 of file ChanFitErrorCode.h.

40{ return bitIsSet(BadDataBit); }
bool bitIsSet(unsigned int number) const

◆ badData() [2/2]

void ChanFitErrorCode::badData ( bool bad)
inline

Definition at line 41 of file ChanFitErrorCode.h.

void setBit(unsigned int number, bool value)

◆ 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}
unsigned int m_errorCode
std::string number(const double &d, const std::string &s)
Definition utils.cxx:186

◆ chanValid()

bool ChanFitErrorCode::chanValid ( ) const

Definition at line 30 of file ChanFitErrorCode.cxx.

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

◆ 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)
inline

Definition at line 26 of file AbstractErrorCode.h.

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