#include <memory>
#include "MURE.hxx"
#include "NucleiTree.hxx"
Go to the source code of this file.
|
#define | LOG_LEVEL_DEBUG 0 |
|
#define | LOG_LEVEL_WARNING 2 |
| Importance level of warning message.
|
|
#define | LOG_LEVEL_IMPORTANT_WARNING 3 |
| Importance level of warning message.
|
|
#define | LOG_LEVEL_ALERT 4 |
| Importance level of alert message.
|
|
#define | LOG_LEVEL_ERROR 5 |
| Importance level of error message.
|
|
#define | __METHOD_NAME__ __macro_method_name__(__PRETTY_FUNCTION__) |
|
#define | LOG_DEBUG(msg) {if ((!NODEBUG)&&((DODEBUG)||(!gMURE->GetSilentDebug()))&&(gMURE->GetMessageLevel()<=LOG_LEVEL_DEBUG)) cout<<__METHOD_NAME__<<" : "<<msg<<endl;} |
|
#define | LOG_INFO(msg) { cout<<msg<<endl;} |
| Print info message (Now MURE is doing this ...)
|
|
#define | LOG_WARN(msg) {if ((!gMURE->GetSilentDebug())&&(gMURE->GetMessageLevel()<=LOG_LEVEL_WARNING)) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('*')<<("**** WARNING in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;}} |
| Print a warning (something happened, but MURE took care)
|
|
#define | LOG_IMP_WARN(msg) {if (gMURE->GetMessageLevel()<=LOG_LEVEL_IMPORTANT_WARNING) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('*')<<("**** WARNING in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;cout<<left<<setw(75)<<setfill('*')<<"*"<<endl;}} |
| Print a important warning (something happened, but MURE took care)
|
|
#define | LOG_ALERT(msg) {if (gMURE->GetMessageLevel()<=LOG_LEVEL_ALERT) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('!')<<("!!!! ALERT in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;cout<<setw(75)<<setfill('=')<<"!"<<endl;}} |
| Print an alert (something is wrong and the result won't probably be OK)
|
|
#define | LOG_ERROR(msg) {if (gMURE->GetMessageLevel()<=LOG_LEVEL_ERROR) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('=')<<("==== ERROR in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;cout<<setw(75)<<setfill('=')<<"= Exiting MURE ="<<endl;} exit(999);} |
| Print an error and terminate the program by calling exit(999).
|
|
◆ __METHOD_NAME__
Macros for printing messages. They check for level and do the printing. Macros are better than functions, because it is possible to treat the parameter as a stream, e.g. LOG_WARN("Value is "<<i);
◆ LOG_ALERT
#define LOG_ALERT |
( |
|
msg | ) |
{if (gMURE->GetMessageLevel()<=LOG_LEVEL_ALERT) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('!')<<("!!!! ALERT in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;cout<<setw(75)<<setfill('=')<<"!"<<endl;}} |
Print an alert (something is wrong and the result won't probably be OK)
◆ LOG_DEBUG
Print a debug message. It is possible to suppress debug msg printing in single procedure (or program block) by hiding global variable NODEBUG: int NODEBUG=1;
◆ LOG_ERROR
#define LOG_ERROR |
( |
|
msg | ) |
{if (gMURE->GetMessageLevel()<=LOG_LEVEL_ERROR) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('=')<<("==== ERROR in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;cout<<setw(75)<<setfill('=')<<"= Exiting MURE ="<<endl;} exit(999);} |
Print an error and terminate the program by calling exit(999).
◆ LOG_IMP_WARN
#define LOG_IMP_WARN |
( |
|
msg | ) |
{if (gMURE->GetMessageLevel()<=LOG_LEVEL_IMPORTANT_WARNING) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('*')<<("**** WARNING in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;cout<<left<<setw(75)<<setfill('*')<<"*"<<endl;}} |
Print a important warning (something happened, but MURE took care)
◆ LOG_INFO
#define LOG_INFO |
( |
|
msg | ) |
{ cout<<msg<<endl;} |
Print info message (Now MURE is doing this ...)
◆ LOG_LEVEL_ALERT
#define LOG_LEVEL_ALERT 4 |
Importance level of alert message.
◆ LOG_LEVEL_DEBUG
#define LOG_LEVEL_DEBUG 0 |
These are constants for importance levels of messages Importance level of debug message
◆ LOG_LEVEL_ERROR
#define LOG_LEVEL_ERROR 5 |
Importance level of error message.
◆ LOG_LEVEL_IMPORTANT_WARNING
#define LOG_LEVEL_IMPORTANT_WARNING 3 |
Importance level of warning message.
◆ LOG_LEVEL_WARNING
#define LOG_LEVEL_WARNING 2 |
Importance level of warning message.
◆ LOG_WARN
#define LOG_WARN |
( |
|
msg | ) |
{if ((!gMURE->GetSilentDebug())&&(gMURE->GetMessageLevel()<=LOG_LEVEL_WARNING)) {ostringstream s;s<<msg;cout<<left<<setw(75)<<setfill('*')<<("**** WARNING in "+__METHOD_NAME__+" ")<<endl;cout<<wordwrap(s.str(),75)<<endl;}} |
Print a warning (something happened, but MURE took care)
◆ DODEBUG
◆ gMURE
std::unique_ptr<MURE> gMURE |
|
extern |
Global (ugly) pointer to MURE object needed to write MCNP file, make evolution and so on.
- Author
- WEC
-
PTO
- Version
- 0.1
◆ gTREE
◆ NODEBUG