ROOT
Version master
master
v6.34
v6.32
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
v6.04
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
io
►
main
►
master
▼
math
doc
►
fftw
►
foam
►
fumili
►
genetic
►
genvector
▼
mathcore
doc
▼
inc
►
Fit
▼
Math
AdaptiveIntegratorMultiDim.h
►
AllIntegrationTypes.h
BasicMinimizer.h
►
BrentMethods.h
BrentMinimizer1D.h
BrentRootFinder.h
►
ChebyshevPol.h
►
CladDerivator.h
►
Delaunay2D.h
DistFunc.h
DistFuncMathCore.h
DistSampler.h
DistSamplerOptions.h
►
Error.h
►
Factory.h
FitMethodFunction.h
Functor.h
►
GaussIntegrator.h
GaussLegendreIntegrator.h
GenAlgoOptions.h
GoFTest.h
IFunction.h
►
IFunctionfwd.h
IMinimizer1D.h
►
Integrator.h
IntegratorMultiDim.h
IntegratorOptions.h
IOptions.h
IParamFunction.h
►
IParamFunctionfwd.h
IRootFinderMethod.h
►
KDTree.h
►
KDTree.icc
►
LCGEngine.h
►
Math.h
MersenneTwisterEngine.h
Minimizer.h
MinimizerOptions.h
MinimizerVariableTransformation.h
MinimTransformFunction.h
►
MinimTransformVariable.h
►
MixMaxEngine.h
►
MixMaxEngine.icc
MultiDimParamFunctionAdapter.h
►
OneDimFunctionAdapter.h
►
ParamFunctor.h
PdfFunc.h
►
PdfFuncMathCore.h
ProbFunc.h
►
ProbFuncMathCore.h
QuantFunc.h
►
QuantFuncMathCore.h
►
Random.h
►
RandomFunctions.h
►
RanluxppEngine.h
RichardsonDerivator.h
RootFinder.h
SpecFunc.h
►
SpecFuncMathCore.h
►
StdEngine.h
►
TDataPoint.h
►
TDataPoint.icc
►
TDataPointN.h
►
TDataPointN.icc
►
TRandomEngine.h
►
Types.h
►
Util.h
VirtualIntegrator.h
►
WrappedFunction.h
►
WrappedParamFunction.h
►
TComplex.h
►
TKDTree.h
TKDTreeBinning.h
►
TMath.h
►
TRandom.h
►
TRandom1.h
►
TRandom2.h
►
TRandom3.h
►
TRandomGen.h
TStatistic.h
VectorizedTMath.h
►
src
►
v7
►
mathmore
►
matrix
►
minuit
►
minuit2
►
mlp
►
physics
►
quadp
►
rtools
►
smatrix
►
splot
►
unuran
►
vecops
►
montecarlo
►
net
►
proof
►
roofit
►
sql
►
tmva
►
tree
►
tutorials
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
Error.h
Go to the documentation of this file.
1
// @(#)root/mathcore:$Id$
2
// Authors: L. Moneta
3
4
/**********************************************************************
5
* *
6
* Copyright (c) 2007 LCG ROOT Math team, CERN/PH-SFT *
7
* *
8
**********************************************************************/
9
10
#ifndef ROOT_Math_Error
11
#define ROOT_Math_Error
12
13
#ifdef DEBUG
14
#ifndef WARNINGMSG
15
#define WARNINGMSG
16
#endif
17
#endif
18
19
20
21
/**
22
Pre-processor macro to report messages
23
which can be configured to use ROOT error or
24
simply an std::iostream in case of stan-alone builds
25
*/
26
27
#ifdef MATHCORE_STANDALONE
28
29
// use std::iostream instead of ROOT
30
31
#include <iostream>
32
#include <string>
33
34
#ifndef ROOT_MATH_LOG
35
#define ROOT_MATH_OS std::cerr
36
#else
37
#define ROOT_MATH_LOG
38
#endif
39
40
// giving a location + string
41
42
#define MATH_INFO_MSG(loc,str) \
43
ROOT_MATH_OS << "Info in ROOT::Math::" << loc << ">: " << str \
44
<< std::endl;
45
#define MATH_WARN_MSG(loc,str) \
46
ROOT_MATH_OS << "Warning in ROOT::Math::" << loc << ">: " << str \
47
<< std::endl;
48
#define MATH_ERROR_MSG(loc,str) \
49
ROOT_MATH_OS << "Error in ROOT::Math::" << loc << ">: " << str \
50
<< std::endl;
51
52
// giving location + a value
53
54
# define MATH_INFO_VAL(loc,x) \
55
ROOT_MATH_OS << "Info in <ROOT::Math::" << loc << ">: " << #x << " = " << (x) << std::endl;
56
# define MATH_WARN_VAL(loc,x) \
57
ROOT_MATH_OS << "Warning in ROOT::Math::" << loc << ">: " << #x << " = " << (x) << std::endl;
58
# define MATH_ERROR_VAL(loc,x) \
59
ROOT_MATH_OS << "Error in ROOT::Math::" << loc << ">: " << #x << " = " << (x) << std::endl;
60
61
// giving a location + string + value
62
63
# define MATH_INFO_MSGVAL(loc,str,x) \
64
ROOT_MATH_OS << "Info in <ROOT::Math::" << loc << ">: " << str << "; " << #x << " = " << (x) << std::endl;
65
# define MATH_WARN_MSGVAL(loc,str,x) \
66
ROOT_MATH_OS << "Warning in ROOT::Math::" << loc << ">: " << str << "; " << #x << " = " << (x) << std::endl;
67
# define MATH_ERROR_MSGVAL(loc,str,x) \
68
ROOT_MATH_OS << "Error in ROOT::Math::" << loc << ">: " << str << "; " << #x << " = " << (x) << std::endl;
69
70
71
#else
72
// use ROOT error reporting system
73
74
#include "
TError.h
"
75
#include "
Math/Util.h
"
76
77
#define MATH_INFO_MSG(loc,str) \
78
{std::string sl = "ROOT::Math::" + std::string(loc); \
79
::Info(sl.c_str(),"%s",str);}
80
#define MATH_WARN_MSG(loc,str) \
81
{std::string sl = "ROOT::Math::" + std::string(loc); \
82
::Warning(sl.c_str(),"%s",str);}
83
#define MATH_ERROR_MSG(loc,str) \
84
{std::string sl = "ROOT::Math::" + std::string(loc); \
85
::Error(sl.c_str(),"%s",str);}
86
87
# define MATH_INFO_VAL(loc,x) \
88
{std::string sl = "ROOT::Math::" + std::string(loc); \
89
std::string str = std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
90
::Info(sl.c_str(),"%s",str.c_str() );}
91
# define MATH_WARN_VAL(loc,x) \
92
{std::string sl = "ROOT::Math::" + std::string(loc); \
93
std::string str = std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
94
::Warning(sl.c_str(),"%s",str.c_str() );}
95
# define MATH_ERROR_VAL(loc,x) \
96
{std::string sl = "ROOT::Math::" + std::string(loc); \
97
std::string str = std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
98
::Error(sl.c_str(),"%s",str.c_str() );}
99
100
101
# define MATH_INFO_MSGVAL(loc,txt,x) \
102
{std::string sl = "ROOT::Math::" + std::string(loc); \
103
std::string str = std::string(txt) + std::string("; ") + std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
104
::Info(sl.c_str(),"%s",str.c_str() );}
105
# define MATH_WARN_MSGVAL(loc,txt,x) \
106
{std::string sl = "ROOT::Math::" + std::string(loc); \
107
std::string str = std::string(txt) + std::string("; ") + std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
108
::Warning(sl.c_str(),"%s",str.c_str() );}
109
# define MATH_ERROR_MSGVAL(loc,txt,x) \
110
{std::string sl = "ROOT::Math::" + std::string(loc); \
111
std::string str = std::string(txt) + std::string("; ") + std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
112
::Error(sl.c_str(),"%s",str.c_str() );}
113
114
115
116
#endif
117
118
119
#endif
// ROOT_MATH_Error
TError.h
Util.h
math
mathcore
inc
Math
Error.h
ROOT master - Reference Guide Generated on Thu Feb 13 2025 15:58:56 (GVA Time) using Doxygen 1.10.0