68
67
static std::ostream & mout(Squeal::exceptionLevel level);
70
69
/// Set the ostream for a given error level (Squeal)
71
static void setOutput(errorLevel level, std::ostream& out);
70
static void setAnOutput(errorLevel level, std::ostream& out);
72
/// Set the ostream for all items below "verboseLevel" to /dev/null
74
/// If verboseLevel is less than or equal to
75
/// - Squeak::debug then mout(Squeak::debug) redirects to std::cout
76
/// - Squeak::info then mout(Squeak::info) redirects to std::clog
77
/// - Squeak::warning then mout(Squeak::warning) redirects to std::cerr
78
/// - Squeak::error then mout(Squeak::error) redirects to std::cerr
79
/// - Squeak::fatal then mout(Squeak::fatal) redirects to std::cerr
80
/// Note that the redirection is independent of setStandardOutputs status
81
static void setOutputs(int verboseLevel);
73
83
/// Turn on/off std::cout, std::cerr, std::clog
75
85
/// Set standard outputs to /dev/null depending on verboseLevel:
76
/// * if verboseLevel > int(Squeak::debug), set std::cout to /dev/null
77
/// * if verboseLevel > int(Squeak::info), set std::clog to /dev/null
78
/// * if verboseLevel > int(Squeak::warning), set std::cerr to /dev/null
79
/// * if verboseLevel < 0, take default from int datacard "VerboseLevel"
86
/// - if verboseLevel > int(Squeak::debug), set std::cout to /dev/null
87
/// - if verboseLevel > int(Squeak::info), set std::clog to /dev/null
88
/// - if verboseLevel > int(Squeak::warning), set std::cerr to /dev/null
80
89
/// GEANT4 has very verbose output that hides important run control info, so
81
90
/// we can just turn it off by redirecting std::cout here.
82
static void setStandardOutputs(int verboseLevel=-1);
91
static void setStandardOutputs(int verboseLevel);
84
93
/// Activate std::cout
125
133
static std::ostream* stdout;
126
134
static std::ostream* stdlog;
127
135
static std::ostream* stderr;
136
static const errorLevel default_error_level;
128
137
// pointer to the singleton instance of the class
129
138
static Squeak * instance;
130
139
// called automagically by mout
131
140
static Squeak * getInstance();
132
// mout tries to find the datacards in the MICERun, otherwise it operates
134
static Json::Value* datacards;
136
142
static void initialiseOutputs();