FairRoot/PandaRoot
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
genfit::Exception Class Reference

Exception class for error handling in GENFIT (provides storage for diagnostic information) More...

#include <Exception.h>

Inheritance diagram for genfit::Exception:

Public Member Functions

 Exception (std::string excString, int line, std::string file)
 Initializing constructor. More...
 
virtual ~Exception () throw ()
 
void setFatal (bool b=true)
 Set fatal flag. More...
 
bool isFatal ()
 Get fatal flag. More...
 
void setNumbers (std::string, const std::vector< double > &)
 Set list of numbers with description. More...
 
void setMatrices (std::string, const std::vector< TMatrixD > &)
 Set list of matrices with description. More...
 
void info ()
 Print information in the exception object. More...
 
virtual const char * what () const throw ()
 Standard error message handling for exceptions. use like "std::cerr << e.what();". More...
 
std::string getExcString ()
 

Static Public Member Functions

static void quiet (bool b=true)
 "std::cerr << e.what();" will not write anything. More...
 

Private Attributes

std::string excString_
 
int line_
 
std::string file_
 
std::string errorMessage_
 
std::string numbersLabel_
 
std::string matricesLabel_
 
std::vector< double > numbers_
 
std::vector< TMatrixDmatrices_
 
bool fatal_
 

Static Private Attributes

static bool quiet_
 

Detailed Description

Exception class for error handling in GENFIT (provides storage for diagnostic information)

Author
Christian Höppner (Technische Universität München, original author)
Sebastian Neubert (Technische Universität München, original author)

This is the class that is used for all error handling in GENFIT. It is a utility class that allows to store numbers and matrices together with an error string. The exception class can then be thrown when an error is detected and the C++ exception handling facilities can be used to catch and process the exception.

Definition at line 48 of file Exception.h.

Constructor & Destructor Documentation

genfit::Exception::Exception ( std::string  excString,
int  line,
std::string  file 
)

Initializing constructor.

Parameters
excStringerror message.
lineline at which the exception is created. Can be set through LINE macro.
filesourcefile in which the exception is created. Can be set through FILE macro.
virtual genfit::Exception::~Exception ( )
throw (
)
virtual

Member Function Documentation

std::string genfit::Exception::getExcString ( )
inline

Definition at line 75 of file Exception.h.

References excString_.

75 {return excString_;}
std::string excString_
Definition: Exception.h:84
void genfit::Exception::info ( )

Print information in the exception object.

bool genfit::Exception::isFatal ( )
inline

Get fatal flag.

Definition at line 63 of file Exception.h.

References fatal_.

63 {return fatal_;}
static void genfit::Exception::quiet ( bool  b = true)
inlinestatic

"std::cerr << e.what();" will not write anything.

Definition at line 78 of file Exception.h.

References b, and quiet_.

Referenced by PndRecoDafFit2::Init(), and PndRecoKalmanFit2::Init().

78 {quiet_=b;}
TTree * b
static bool quiet_
Definition: Exception.h:82
void genfit::Exception::setFatal ( bool  b = true)
inline
void genfit::Exception::setMatrices ( std::string  ,
const std::vector< TMatrixD > &   
)

Set list of matrices with description.

void genfit::Exception::setNumbers ( std::string  ,
const std::vector< double > &   
)
virtual const char* genfit::Exception::what ( ) const
throw (
)
virtual

Standard error message handling for exceptions. use like "std::cerr << e.what();".

Referenced by PndRecoDafFit2::Fit(), and PndRecoKalmanFit2::Fit().

Member Data Documentation

std::string genfit::Exception::errorMessage_
private

Definition at line 88 of file Exception.h.

std::string genfit::Exception::excString_
private

Definition at line 84 of file Exception.h.

Referenced by getExcString().

bool genfit::Exception::fatal_
private

Definition at line 95 of file Exception.h.

Referenced by isFatal(), and setFatal().

std::string genfit::Exception::file_
private

Definition at line 86 of file Exception.h.

int genfit::Exception::line_
private

Definition at line 85 of file Exception.h.

std::vector<TMatrixD> genfit::Exception::matrices_
private

Definition at line 93 of file Exception.h.

std::string genfit::Exception::matricesLabel_
private

Definition at line 91 of file Exception.h.

std::vector<double> genfit::Exception::numbers_
private

Definition at line 92 of file Exception.h.

std::string genfit::Exception::numbersLabel_
private

Definition at line 90 of file Exception.h.

bool genfit::Exception::quiet_
staticprivate

Definition at line 82 of file Exception.h.

Referenced by quiet().


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