Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
genfit::Exception Class Reference

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

#include <GenFit/blob/master/core/include/Exception.h>

+ Inheritance diagram for genfit::Exception:
+ Collaboration diagram for genfit::Exception:

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

std::string excString_
 
int line_
 
std::string file_
 
std::string errorMessage_
 
std::string numbersLabel_
 
std::string matricesLabel_
 
std::vector< doublenumbers_
 
std::vector< TMatrixD > matrices_
 
bool fatal_
 

Static Private Attributes

static bool quiet_ = false
 

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.

View newest version in sPHENIX GitHub at line 48 of file Exception.h

Constructor & Destructor Documentation

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.

Definition at line 27 of file Exception.cc.

View newest version in sPHENIX GitHub at line 27 of file Exception.cc

References errorMessage_, excString_, fatal_, file_, and line_.

Exception::~Exception ( )
virtualnoexcept

Definition at line 37 of file Exception.cc.

View newest version in sPHENIX GitHub at line 37 of file Exception.cc

Member Function Documentation

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

Definition at line 75 of file Exception.h.

View newest version in sPHENIX GitHub at line 75 of file Exception.h

References excString_.

Referenced by genfit::EventDisplay::drawEvent(), and main().

+ Here is the caller graph for this function:

void Exception::info ( )

Print information in the exception object.

Definition at line 56 of file Exception.cc.

View newest version in sPHENIX GitHub at line 56 of file Exception.cc

References genfit::debugOut, i, matrices_, matricesLabel_, numbers_, numbersLabel_, Print(), and quiet_.

Referenced by genfit::DAF::calcWeights(), and genfit::DAF::processTrackWithRep().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool genfit::Exception::isFatal ( )
inline

Get fatal flag.

Definition at line 63 of file Exception.h.

View newest version in sPHENIX GitHub at line 63 of file Exception.h

References 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.

View newest version in sPHENIX GitHub at line 78 of file Exception.h

References KFPMath::b, and quiet_.

Referenced by PHGenFit::Fitter::Fitter(), and PHGenFit::Fitter::set_verbosity().

+ Here is the caller graph for this function:

void genfit::Exception::setFatal ( bool  b = true)
inline

Set fatal flag.

Definition at line 61 of file Exception.h.

View newest version in sPHENIX GitHub at line 61 of file Exception.h

References KFPMath::b, and fatal_.

Referenced by genfit::DAF::addProbCut(), genfit::MeasurementFactory< measurement_T >::addProducer(), genfit::AbsKalmanFitter::canIgnoreWeights(), genfit::RKTrackRep::checkCache(), genfit::Track::createMeasurements(), genfit::MeasurementFactory< measurement_T >::createOne(), genfit::MaterialEffects::dEdxBetheBloch(), genfit::MaterialEffects::effects(), genfit::RKTrackRep::Extrap(), genfit::RKTrackRep::extrapolateBy(), genfit::RKTrackRep::extrapolateToCone(), genfit::RKTrackRep::extrapolateToCylinder(), genfit::RKTrackRep::extrapolateToLine(), genfit::RKTrackRep::extrapolateToSphere(), genfit::RKTrackRep::extrapToPoint(), genfit::TGeoMaterialInterface::findNextBoundary(), genfit::KalmanFitter::fitTrack(), genfit::RKTrackRep::getBackwardJacobianAndNoise(), genfit::MplTrackRep::getCharge(), genfit::RKTrackRep::getCharge(), genfit::KalmanFitterInfo::getClosestMeasurementOnPlane(), genfit::KalmanFitterInfo::getFittedState(), genfit::Track::getFittedState(), genfit::Track::getIdForRep(), genfit::AbsKalmanFitter::getMeasurements(), genfit::MaterialEffects::getMomGammaBeta(), genfit::RKTrackRep::getMomVar(), genfit::RKTrackRep::getSpu(), genfit::RKTrackRep::getState7(), genfit::tools::invertMatrix(), genfit::Track::mergeTrack(), genfit::KalmanFitterRefTrack::prepareTrack(), genfit::MeasurementProducer< hit_T, measurement_T >::produce(), genfit::RKTrackRep::RKutta(), genfit::RKTrackRep::setChargeSign(), genfit::MaterialEffects::setMscModel(), genfit::RKTrackRep::setPosMom(), and genfit::MaterialEffects::stepper().

+ Here is the caller graph for this function:

void Exception::setMatrices ( std::string  _matricesLabel,
const std::vector< TMatrixD > &  _matrices 
)

Set list of matrices with description.

Definition at line 46 of file Exception.cc.

View newest version in sPHENIX GitHub at line 46 of file Exception.cc

References matrices_, and matricesLabel_.

void Exception::setNumbers ( std::string  _numbersLabel,
const std::vector< double > &  _numbers 
)

Set list of numbers with description.

Definition at line 40 of file Exception.cc.

View newest version in sPHENIX GitHub at line 40 of file Exception.cc

References numbers_, and numbersLabel_.

Referenced by genfit::MeasurementFactory< measurement_T >::addProducer(), and genfit::MeasurementFactory< measurement_T >::createOne().

+ Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 88 of file Exception.h.

View newest version in sPHENIX GitHub at line 88 of file Exception.h

Referenced by Exception(), and what().

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

Definition at line 84 of file Exception.h.

View newest version in sPHENIX GitHub at line 84 of file Exception.h

Referenced by Exception(), and getExcString().

bool genfit::Exception::fatal_
private

Definition at line 95 of file Exception.h.

View newest version in sPHENIX GitHub at line 95 of file Exception.h

Referenced by Exception(), isFatal(), and setFatal().

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

Definition at line 86 of file Exception.h.

View newest version in sPHENIX GitHub at line 86 of file Exception.h

Referenced by Exception().

int genfit::Exception::line_
private

Definition at line 85 of file Exception.h.

View newest version in sPHENIX GitHub at line 85 of file Exception.h

Referenced by Exception().

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

Definition at line 93 of file Exception.h.

View newest version in sPHENIX GitHub at line 93 of file Exception.h

Referenced by info(), and setMatrices().

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

Definition at line 91 of file Exception.h.

View newest version in sPHENIX GitHub at line 91 of file Exception.h

Referenced by info(), and setMatrices().

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

Definition at line 92 of file Exception.h.

View newest version in sPHENIX GitHub at line 92 of file Exception.h

Referenced by info(), and setNumbers().

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

Definition at line 90 of file Exception.h.

View newest version in sPHENIX GitHub at line 90 of file Exception.h

Referenced by info(), and setNumbers().

bool Exception::quiet_ = false
staticprivate

Definition at line 82 of file Exception.h.

View newest version in sPHENIX GitHub at line 82 of file Exception.h

Referenced by info(), and quiet().


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