32 #include "RtypesCore.h" 91 const char*
what()
const noexcept
override;
95 static void quiet(
bool b =
true) { fQuiet = b; }
101 template <
class ROOTOBJ>
108 template <
typename T>
113 template <
class ROOTOBJ>
116 std::ostringstream sstr;
126 template <
class ROOTOBJ>
132 template <
typename T>
136 constexpr std::streamsize fw = 11;
137 constexpr std::streamsize ifw = 4 + (fw & 1);
138 const Int_t rb = m.GetRowLwb(), cb = m.GetColLwb();
140 const Int_t R = m.GetNrows(), C = m.GetNcols();
141 out << R <<
"x" << C <<
" matrix is as follows";
143 std::streamsize swidth = out.width(4);
144 std::ios::fmtflags sflags = out.flags();
145 out.unsetf(std::ios_base::floatfield);
148 std::string index_pad((fw - ifw) / 2,
' ');
149 out <<
"\n" << std::string(ifw,
' ') <<
" |";
150 for (Int_t c = 0; c < C; ++c)
151 out << index_pad << std::setw(ifw) << (cb + c) << index_pad <<
"|";
154 out <<
"\n" << std::string((C + 1) * (fw + 1),
'-');
157 for (Int_t
r = 0;
r < R; ++
r) {
159 out <<
"\n" << std::setw(ifw) << (rb +
r) <<
" |";
160 for (Int_t c = 0; c < C; ++c)
161 out << std::setw(fw) << m(rb +
r, cb + c) <<
" ";
GFException & setNumbers(std::string, const std::vector< double > &)
set list of numbers with description
std::string fNumbersLabel
Generic Interface to magnetic fields in GENFIT.
void PrintROOTmatrix(std::ostream &out, const TMatrixT< T > &m)
Small utility functions which print some ROOT objects into an output stream.
std::string fMatricesLabel
static void quiet(bool b=true)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void PrintROOTobject(std::ostream &, const TVector3 &v)
Small utility functions which print some ROOT objects into an output stream.
bool isFatal()
get fatal flag.
std::string getExcString()
std::string ROOTobjectToString(const ROOTOBJ &obj)
Shortcut to write one ROOT object into a string.
void info()
print information in the exception object
const char * what() const noexcept override
standard error message handling for exceptions. use like "std::cerr << e.what();" ...
GFException & setMatrices(std::string, const std::vector< TMatrixT< Double_t >> &)
set list of matrices with description
Exception class for error handling in GENFIT (provides storage for diagnostic information) ...
GFException(std::string, int, std::string)
Initializing constructor.
std::vector< double > fNumbers
void PrintROOTobject(std::ostream &, const ROOTOBJ &)
Small utility functions which print some ROOT objects into an output stream.
GFException & setFatal(bool b=true)
set fatal flag. if this is true, the fit stops for this current track repr.
cet::coded_exception< error, detail::translate > exception
std::vector< TMatrixT< Double_t > > fMatrices