BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
TrkErrCode Class Reference

#include <TrkErrCode.h>

Public Types

enum  TrkSuccess {
  fail , succeed , fail , succeed ,
  fail , succeed
}
enum  TrkSuccess {
  fail , succeed , fail , succeed ,
  fail , succeed
}
enum  TrkSuccess {
  fail , succeed , fail , succeed ,
  fail , succeed
}

Public Member Functions

 TrkErrCode (TrkSuccess=succeed, int code=1, const char *str=0)
 ~TrkErrCode ()
 TrkErrCode (const TrkErrCode &)
TrkErrCodeoperator= (const TrkErrCode &)
int failure () const
int success () const
const std::string & message () const
void print (std::ostream &ostr) const
void setMessage (const char *str=0)
void setFailure (int i, const char *str=0)
void setSuccess (int i, const char *str=0)
 TrkErrCode (TrkSuccess=succeed, int code=1, const char *str=0)
 ~TrkErrCode ()
 TrkErrCode (const TrkErrCode &)
TrkErrCodeoperator= (const TrkErrCode &)
int failure () const
int success () const
const std::string & message () const
void print (std::ostream &ostr) const
void setMessage (const char *str=0)
void setFailure (int i, const char *str=0)
void setSuccess (int i, const char *str=0)
 TrkErrCode (TrkSuccess=succeed, int code=1, const char *str=0)
 ~TrkErrCode ()
 TrkErrCode (const TrkErrCode &)
TrkErrCodeoperator= (const TrkErrCode &)
int failure () const
int success () const
const std::string & message () const
void print (std::ostream &ostr) const
void setMessage (const char *str=0)
void setFailure (int i, const char *str=0)
void setSuccess (int i, const char *str=0)

Detailed Description

Member Enumeration Documentation

◆ TrkSuccess [1/3]

◆ TrkSuccess [2/3]

Enumerator
fail 
succeed 
fail 
succeed 
fail 
succeed 

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

50{ fail, succeed };

◆ TrkSuccess [3/3]

Enumerator
fail 
succeed 
fail 
succeed 
fail 
succeed 

Definition at line 50 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

50{ fail, succeed };

Constructor & Destructor Documentation

◆ TrkErrCode() [1/6]

TrkErrCode::TrkErrCode ( TrkSuccess succ = succeed,
int code = 1,
const char * str = 0 )

Definition at line 23 of file TrkErrCode.cxx.

23 : _string( 0 ) {
24 setMessage( str );
25 if ( succ )
26 {
27 _failure = 0;
28 _success = code;
29 }
30 else
31 {
32 _success = 0;
33 _failure = code;
34 }
35}

Referenced by operator=(), and TrkErrCode().

◆ ~TrkErrCode() [1/3]

TrkErrCode::~TrkErrCode ( )

Definition at line 43 of file TrkErrCode.cxx.

43 {
44 if ( _string != 0 )
45 {
46 delete _string;
47 _string = 0;
48 }
49}

◆ TrkErrCode() [2/6]

TrkErrCode::TrkErrCode ( const TrkErrCode & theCode)

Definition at line 37 of file TrkErrCode.cxx.

38 : _failure( theCode._failure ), _success( theCode._success ) {
39 if ( theCode._string != 0 ) { _string = new std::string( *theCode._string ); }
40 else { _string = 0; }
41}

◆ TrkErrCode() [3/6]

TrkErrCode::TrkErrCode ( TrkSuccess = succeed,
int code = 1,
const char * str = 0 )

◆ ~TrkErrCode() [2/3]

TrkErrCode::~TrkErrCode ( )

◆ TrkErrCode() [4/6]

TrkErrCode::TrkErrCode ( const TrkErrCode & )

◆ TrkErrCode() [5/6]

TrkErrCode::TrkErrCode ( TrkSuccess = succeed,
int code = 1,
const char * str = 0 )

◆ ~TrkErrCode() [3/3]

TrkErrCode::~TrkErrCode ( )

◆ TrkErrCode() [6/6]

TrkErrCode::TrkErrCode ( const TrkErrCode & )

Member Function Documentation

◆ failure() [1/3]

◆ failure() [2/3]

int TrkErrCode::failure ( ) const
inline

Definition at line 60 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

60{ return _failure; }

◆ failure() [3/3]

int TrkErrCode::failure ( ) const
inline

Definition at line 60 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

60{ return _failure; }

◆ message() [1/3]

const std::string & TrkErrCode::message ( ) const
inline

Definition at line 62 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/TrkErrCode.h.

62{ return ( _string != 0 ) ? *_string : _nullStr; }

◆ message() [2/3]

const std::string & TrkErrCode::message ( ) const
inline

Definition at line 62 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

62{ return ( _string != 0 ) ? *_string : _nullStr; }

◆ message() [3/3]

const std::string & TrkErrCode::message ( ) const
inline

Definition at line 62 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

62{ return ( _string != 0 ) ? *_string : _nullStr; }

◆ operator=() [1/3]

TrkErrCode & TrkErrCode::operator= ( const TrkErrCode & theCode)

Definition at line 51 of file TrkErrCode.cxx.

51 {
52 _failure = theCode._failure;
53 _success = theCode._success;
54
55 if ( theCode._string != 0 )
56 {
57 if ( _string != 0 ) { *_string = *theCode._string; }
58 else { _string = new std::string( *theCode._string ); }
59 }
60 else
61 {
62 if ( _string != 0 ) delete _string;
63 _string = 0;
64 }
65
66 return *this;
67}

◆ operator=() [2/3]

TrkErrCode & TrkErrCode::operator= ( const TrkErrCode & )

◆ operator=() [3/3]

TrkErrCode & TrkErrCode::operator= ( const TrkErrCode & )

◆ print() [1/3]

void TrkErrCode::print ( std::ostream & ostr) const

◆ print() [2/3]

void TrkErrCode::print ( std::ostream & ostr) const

◆ print() [3/3]

void TrkErrCode::print ( std::ostream & ostr) const

◆ setFailure() [1/3]

void TrkErrCode::setFailure ( int i,
const char * str = 0 )
inline

Definition at line 71 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/TrkErrCode.h.

71 {
72 setMessage( str );
73 _failure = ( i == 0 ? 1 : i );
74 _success = 0;
75 }

Referenced by TrkHelixFitter::fit().

◆ setFailure() [2/3]

void TrkErrCode::setFailure ( int i,
const char * str = 0 )
inline

Definition at line 71 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

71 {
72 setMessage( str );
73 _failure = ( i == 0 ? 1 : i );
74 _success = 0;
75 }

◆ setFailure() [3/3]

void TrkErrCode::setFailure ( int i,
const char * str = 0 )
inline

Definition at line 71 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

71 {
72 setMessage( str );
73 _failure = ( i == 0 ? 1 : i );
74 _success = 0;
75 }

◆ setMessage() [1/3]

void TrkErrCode::setMessage ( const char * str = 0)
inline

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/TrkErrCode.h.

66 {
67 if ( _string != 0 ) delete _string;
68 if ( str != 0 ) { _string = new std::string( str ); }
69 else { _string = 0; }
70 }

Referenced by setFailure(), setSuccess(), and TrkErrCode().

◆ setMessage() [2/3]

void TrkErrCode::setMessage ( const char * str = 0)
inline

Definition at line 66 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

66 {
67 if ( _string != 0 ) delete _string;
68 if ( str != 0 ) { _string = new std::string( str ); }
69 else { _string = 0; }
70 }

◆ setMessage() [3/3]

void TrkErrCode::setMessage ( const char * str = 0)
inline

Definition at line 66 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

66 {
67 if ( _string != 0 ) delete _string;
68 if ( str != 0 ) { _string = new std::string( str ); }
69 else { _string = 0; }
70 }

◆ setSuccess() [1/3]

void TrkErrCode::setSuccess ( int i,
const char * str = 0 )
inline

Definition at line 76 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkBase/TrkErrCode.h.

76 {
77 setMessage( str );
78 _success = ( i == 0 ? 1 : i );
79 _failure = 0;
80 }

Referenced by TrkHelixFitter::fit().

◆ setSuccess() [2/3]

void TrkErrCode::setSuccess ( int i,
const char * str = 0 )
inline

Definition at line 76 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

76 {
77 setMessage( str );
78 _success = ( i == 0 ? 1 : i );
79 _failure = 0;
80 }

◆ setSuccess() [3/3]

void TrkErrCode::setSuccess ( int i,
const char * str = 0 )
inline

Definition at line 76 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

76 {
77 setMessage( str );
78 _success = ( i == 0 ? 1 : i );
79 _failure = 0;
80 }

◆ success() [1/3]

◆ success() [2/3]

int TrkErrCode::success ( ) const
inline

Definition at line 61 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkBase/TrkErrCode.h.

61{ return _success; }

◆ success() [3/3]

int TrkErrCode::success ( ) const
inline

Definition at line 61 of file Reconstruction/MdcPatRec/TrkBase/include/TrkBase/TrkErrCode.h.

61{ return _success; }

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