/** @addtogroup genfit * @{ */ /** * @author Christian Höppner (Technische Universität München, original author) * @author Sebastian Neubert (Technische Universität München, original author) * */ #ifndef FITTEREXCEPTIONS_H #define FITTEREXCEPTIONS_H #include #include #include #include #include #include "TMatrixT.h" /** @brief Exception class - provides storage for diagnostic informations * * This 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. */ class FitterException : public std::exception { private: std::string excString; int line; std::string file; std::string numbersLabel; std::string matricesLabel; std::vector numbers; std::vector< TMatrixT > matrices; bool fatal; public: /** @brief Initializing constructor * * @param what error message * @param line line at which the exception is created. Can be set through * __LINE__ macro * @param file sorcefile in which the exception is created. * Can be set through __FILE__ macro */ FitterException(std::string, int, std::string); virtual ~FitterException() throw(); /** @brief set fatal flag. if this is true, the fit stops for this track */ void setFatal (bool b=true){fatal=b;} /** @brief get fatal flag. */ bool isFatal (){return fatal;} /** @brief set list of numbers with description */ void setNumbers (std::string, const std::vector&); /** @brief set list of matrices with description */ void setMatrices(std::string, const std::vector< TMatrixT >&); /** @brief print information in the exception object */ void info(); virtual const char* what() const throw(); std::string getExcString(){return excString;} }; #endif /** @} */