00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ROOT_Minuit2_MnPrint
00011 #define ROOT_Minuit2_MnPrint
00012
00013 #include "Minuit2/MnConfig.h"
00014
00015
00016
00017
00018 #include <iostream>
00019
00020 #ifdef DEBUG
00021 #ifndef WARNINGMSG
00022 #define WARNINGMSG
00023 #endif
00024 #endif
00025
00026
00027
00028
00029 namespace ROOT {
00030
00031 namespace Minuit2 {
00032
00033
00034
00035
00036
00037
00038 class FunctionMinimum;
00039 std::ostream& operator<<(std::ostream&, const FunctionMinimum&);
00040
00041 class MinimumState;
00042 std::ostream& operator<<(std::ostream&, const MinimumState&);
00043
00044 class LAVector;
00045 std::ostream& operator<<(std::ostream&, const LAVector&);
00046
00047 class LASymMatrix;
00048 std::ostream& operator<<(std::ostream&, const LASymMatrix&);
00049
00050 class MnUserParameters;
00051 std::ostream& operator<<(std::ostream&, const MnUserParameters&);
00052
00053 class MnUserCovariance;
00054 std::ostream& operator<<(std::ostream&, const MnUserCovariance&);
00055
00056 class MnGlobalCorrelationCoeff;
00057 std::ostream& operator<<(std::ostream&, const MnGlobalCorrelationCoeff&);
00058
00059 class MnUserParameterState;
00060 std::ostream& operator<<(std::ostream&, const MnUserParameterState&);
00061
00062 class MnMachinePrecision;
00063 std::ostream& operator<<(std::ostream&, const MnMachinePrecision&);
00064
00065 class MinosError;
00066 std::ostream& operator<<(std::ostream&, const MinosError&);
00067
00068 class ContoursError;
00069 std::ostream& operator<<(std::ostream&, const ContoursError&);
00070
00071 }
00072
00073 }
00074
00075
00076
00077
00078 #ifndef USE_ROOT_ERROR
00079
00080 #ifndef MNLOG
00081 #define MN_OS std::cerr
00082 #else
00083 #define MN_OS MNLOG
00084 #endif
00085
00086 #define MN_INFO_MSG(str) \
00087 MN_OS << "Info: " << str \
00088 << std::endl;
00089 #define MN_ERROR_MSG(str) \
00090 MN_OS << "Error: " << str \
00091 << std::endl;
00092 # define MN_INFO_VAL(x) \
00093 MN_OS << "Info: " << #x << " = " << (x) << std::endl;
00094 # define MN_ERROR_VAL(x) \
00095 MN_OS << "Error: " << #x << " = " << (x) << std::endl;
00096
00097
00098
00099
00100 #define MN_INFO_MSG2(loc,str) \
00101 MN_OS << "Info in " << loc << " : " << str \
00102 << std::endl;
00103 #define MN_ERROR_MSG2(loc,str) \
00104 MN_OS << "Error in " << loc << " : " << str \
00105 << std::endl;
00106 # define MN_INFO_VAL2(loc,x) \
00107 MN_OS << "Info in " << loc << " : " << #x << " = " << (x) << std::endl;
00108 # define MN_ERROR_VAL2(loc,x) \
00109 MN_OS << "Error in " << loc << " : " << #x << " = " << (x) << std::endl;
00110
00111
00112
00113 #else
00114
00115 #include "TError.h"
00116 #include "Math/Util.h"
00117
00118
00119
00120 #define MN_INFO_MSG(str) \
00121 ::Info("Minuit2",str);
00122 #define MN_ERROR_MSG(str) \
00123 ::Error("Minuit2",str);
00124 # define MN_INFO_VAL(x) \
00125 {std::string str = std::string(#x) + std::string(" = ") + ROOT::Math::Util::ToString(x); \
00126 ::Info("Minuit2","%s",str.c_str() );}
00127 # define MN_ERROR_VAL(x) \
00128 {std::string str = std::string(#x) + std::string(" = ") + ROOT::Math::Util::ToString(x); \
00129 ::Error("Minuit2","%s",str.c_str() );}
00130
00131 # define MN_INFO_MSG2(loc,txt) \
00132 {std::string str = std::string(loc) + std::string(" : ") + std::string(txt); \
00133 ::Info("Minuit2","%s",str.c_str() );}
00134 # define MN_ERROR_MSG2(loc,txt) \
00135 {std::string str = std::string(loc) + std::string(" : ") + std::string(txt); \
00136 ::Error("Minuit2","%s",str.c_str() );}
00137
00138 # define MN_INFO_VAL2(loc,x) \
00139 {std::string str = std::string(loc) + std::string(" : ") + std::string(#x) + std::string(" = ") + ROOT::Math::Util::ToString(x); \
00140 ::Info("Minuit2","%s",str.c_str() );}
00141 # define MN_ERROR_VAL2(loc,x) \
00142 {std::string str = std::string(loc) + std::string(" : ") + std::string(#x) + std::string(" = ") + ROOT::Math::Util::ToString(x); \
00143 ::Error("Minuit2","%s",str.c_str() );}
00144
00145
00146
00147 #endif
00148
00149
00150 #endif // ROOT_Minuit2_MnPrint