Belle II Software light-2406-ragdoll
ErrCode Class Reference

abstract errorocode be aware that the default is success More...

#include <ErrCode.h>

Public Types

enum  Status {
  success = 0 ,
  pocafailure = 1 ,
  baddistance = 2 ,
  inversionerror = 4 ,
  badsetup = 8 ,
  divergingconstraint = 16 ,
  slowdivergingfit = 32 ,
  fastdivergingfit = 64 ,
  filtererror = 128 ,
  photondimerror = 256 ,
  klongdimerror = 512
}
 some enums to store errors More...
 

Public Member Functions

 ErrCode ()
 default constructor
 
 ErrCode (Status flag)
 constructor
 
const ErrCodeoperator|= (const ErrCode &rhs)
 operator
 
bool operator== (const ErrCode &rhs) const
 operator
 
bool operator== (const ErrCode::Status &rhs) const
 operator
 
void reset ()
 reset the errorcode to default (success!)
 
bool failure () const
 returns true if errorcode is error
 
unsigned int flag () const
 get errorcode
 

Private Attributes

unsigned int m_flag
 storing the errorcode
 

Detailed Description

abstract errorocode be aware that the default is success

Definition at line 14 of file ErrCode.h.

Member Enumeration Documentation

◆ Status

enum Status

some enums to store errors

Definition at line 17 of file ErrCode.h.

17 {success = 0,
18 pocafailure = 1,
19 baddistance = 2,
20 inversionerror = 4,
21 badsetup = 8,
22 divergingconstraint = 16,
23 slowdivergingfit = 32,
24 fastdivergingfit = 64,
25 filtererror = 128,
26 photondimerror = 256,
27 klongdimerror = 512
28 } ;

Constructor & Destructor Documentation

◆ ErrCode() [1/2]

ErrCode ( )
inline

default constructor

Definition at line 31 of file ErrCode.h.

31: m_flag(success) {}
unsigned int m_flag
storing the errorcode
Definition: ErrCode.h:65

◆ ErrCode() [2/2]

ErrCode ( Status  flag)
inlineexplicit

constructor

Definition at line 34 of file ErrCode.h.

34: m_flag(flag) {}
unsigned int flag() const
get errorcode
Definition: ErrCode.h:61

Member Function Documentation

◆ failure()

bool failure ( ) const
inline

returns true if errorcode is error

Definition at line 58 of file ErrCode.h.

58{ return m_flag != success ; }

◆ flag()

unsigned int flag ( ) const
inline

get errorcode

Definition at line 61 of file ErrCode.h.

61{ return m_flag ; }

◆ operator==() [1/2]

bool operator== ( const ErrCode rhs) const
inline

operator

Definition at line 43 of file ErrCode.h.

44 {
45 return m_flag == rhs.m_flag ;
46 }

◆ operator==() [2/2]

bool operator== ( const ErrCode::Status rhs) const
inline

operator

Definition at line 49 of file ErrCode.h.

50 {
51 return *this == ErrCode(rhs) ;
52 }
ErrCode()
default constructor
Definition: ErrCode.h:31

◆ operator|=()

const ErrCode & operator|= ( const ErrCode rhs)
inline

operator

Definition at line 37 of file ErrCode.h.

38 {
39 m_flag |= rhs.m_flag ; return *this ;
40 }

◆ reset()

void reset ( )
inline

reset the errorcode to default (success!)

Definition at line 55 of file ErrCode.h.

55{ m_flag = success ; }

Member Data Documentation

◆ m_flag

unsigned int m_flag
private

storing the errorcode

Definition at line 65 of file ErrCode.h.


The documentation for this class was generated from the following file: