File indexing completed on 2025-01-30 10:22:03
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Math_Error
0011 #define ROOT_Math_Error
0012
0013 #ifdef DEBUG
0014 #ifndef WARNINGMSG
0015 #define WARNINGMSG
0016 #endif
0017 #endif
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifdef MATHCORE_STANDALONE
0028
0029
0030
0031 #include <iostream>
0032 #include <string>
0033
0034 #ifndef ROOT_MATH_LOG
0035 #define ROOT_MATH_OS std::cerr
0036 #else
0037 #define ROOT_MATH_LOG
0038 #endif
0039
0040
0041
0042 #define MATH_INFO_MSG(loc,str) \
0043 ROOT_MATH_OS << "Info in ROOT::Math::" << loc << ">: " << str \
0044 << std::endl;
0045 #define MATH_WARN_MSG(loc,str) \
0046 ROOT_MATH_OS << "Warning in ROOT::Math::" << loc << ">: " << str \
0047 << std::endl;
0048 #define MATH_ERROR_MSG(loc,str) \
0049 ROOT_MATH_OS << "Error in ROOT::Math::" << loc << ">: " << str \
0050 << std::endl;
0051
0052
0053
0054 # define MATH_INFO_VAL(loc,x) \
0055 ROOT_MATH_OS << "Info in <ROOT::Math::" << loc << ">: " << #x << " = " << (x) << std::endl;
0056 # define MATH_WARN_VAL(loc,x) \
0057 ROOT_MATH_OS << "Warning in ROOT::Math::" << loc << ">: " << #x << " = " << (x) << std::endl;
0058 # define MATH_ERROR_VAL(loc,x) \
0059 ROOT_MATH_OS << "Error in ROOT::Math::" << loc << ">: " << #x << " = " << (x) << std::endl;
0060
0061
0062
0063 # define MATH_INFO_MSGVAL(loc,str,x) \
0064 ROOT_MATH_OS << "Info in <ROOT::Math::" << loc << ">: " << str << "; " << #x << " = " << (x) << std::endl;
0065 # define MATH_WARN_MSGVAL(loc,str,x) \
0066 ROOT_MATH_OS << "Warning in ROOT::Math::" << loc << ">: " << str << "; " << #x << " = " << (x) << std::endl;
0067 # define MATH_ERROR_MSGVAL(loc,str,x) \
0068 ROOT_MATH_OS << "Error in ROOT::Math::" << loc << ">: " << str << "; " << #x << " = " << (x) << std::endl;
0069
0070
0071 #else
0072
0073
0074 #include "TError.h"
0075 #include "Math/Util.h"
0076
0077 #define MATH_INFO_MSG(loc,str) \
0078 {std::string sl = "ROOT::Math::" + std::string(loc); \
0079 ::Info(sl.c_str(),"%s",str);}
0080 #define MATH_WARN_MSG(loc,str) \
0081 {std::string sl = "ROOT::Math::" + std::string(loc); \
0082 ::Warning(sl.c_str(),"%s",str);}
0083 #define MATH_ERROR_MSG(loc,str) \
0084 {std::string sl = "ROOT::Math::" + std::string(loc); \
0085 ::Error(sl.c_str(),"%s",str);}
0086
0087 # define MATH_INFO_VAL(loc,x) \
0088 {std::string sl = "ROOT::Math::" + std::string(loc); \
0089 std::string str = std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
0090 ::Info(sl.c_str(),"%s",str.c_str() );}
0091 # define MATH_WARN_VAL(loc,x) \
0092 {std::string sl = "ROOT::Math::" + std::string(loc); \
0093 std::string str = std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
0094 ::Warning(sl.c_str(),"%s",str.c_str() );}
0095 # define MATH_ERROR_VAL(loc,x) \
0096 {std::string sl = "ROOT::Math::" + std::string(loc); \
0097 std::string str = std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
0098 ::Error(sl.c_str(),"%s",str.c_str() );}
0099
0100
0101 # define MATH_INFO_MSGVAL(loc,txt,x) \
0102 {std::string sl = "ROOT::Math::" + std::string(loc); \
0103 std::string str = std::string(txt) + std::string("; ") + std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
0104 ::Info(sl.c_str(),"%s",str.c_str() );}
0105 # define MATH_WARN_MSGVAL(loc,txt,x) \
0106 {std::string sl = "ROOT::Math::" + std::string(loc); \
0107 std::string str = std::string(txt) + std::string("; ") + std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
0108 ::Warning(sl.c_str(),"%s",str.c_str() );}
0109 # define MATH_ERROR_MSGVAL(loc,txt,x) \
0110 {std::string sl = "ROOT::Math::" + std::string(loc); \
0111 std::string str = std::string(txt) + std::string("; ") + std::string(#x) + std::string(" = ") + ::ROOT::Math::Util::ToString(x); \
0112 ::Error(sl.c_str(),"%s",str.c_str() );}
0113
0114
0115
0116 #endif
0117
0118
0119 #endif