FairRoot/PandaRoot
|
#include <Log.h>
Classes | |
struct | Pointer |
Static Public Member Functions | |
static void | Summary () |
static void | SummaryAtExit () |
static void | AddDecay (int type) |
static ostream & | Debug (unsigned short int code=0, bool count=true) |
static ostream & | Info (bool count=true) |
static ostream & | Warning (bool count=true) |
static ostream & | Error (bool count=true) |
static void | LogInfo (bool flag=true) |
static void | LogWarning (bool flag=true) |
static void | LogError (bool flag=true) |
static void | LogAll (bool flag=true) |
static void | LogPhlupa (int from, int to) |
static void | LogDebug (unsigned short s=0, unsigned short e=65535) |
static void | Assert (bool check, char *text=NULL) |
static void | Fatal (string text, unsigned short int code=0) |
static void | Fatal (unsigned short int code=0) |
static void | RedirectOutput (void(*func)(), ostream &where=*out) |
static void | RedirectOutput (ostream &where=*out) |
static void | RevertOutput () |
static void | IgnoreFailedAssert (bool flag=true) |
static void | IgnoreRedirection (bool flag=true) |
static void | IgnoreFatal (unsigned short s=0, unsigned short e=65535) |
static void | SetOutput (ostream *newOut) |
static void | SetOutput (ostream &newOut) |
static void | SetWarningLimit (int x) |
static void | Summary () |
static void | SummaryAtExit () |
static void | AddDecay (int type) |
static ostream & | Debug (unsigned short int code=0, bool count=true) |
static ostream & | Info (bool count=true) |
static ostream & | Warning (bool count=true) |
static ostream & | Error (bool count=true) |
static void | LogInfo (bool flag=true) |
static void | LogWarning (bool flag=true) |
static void | LogError (bool flag=true) |
static void | LogAll (bool flag=true) |
static void | LogPhlupa (int from, int to) |
static void | LogDebug (unsigned short s=0, unsigned short e=65535) |
static void | Assert (bool check, char *text=NULL) |
static void | Fatal (string text, unsigned short int code=0) |
static void | Fatal (unsigned short int code=0) |
static void | RedirectOutput (void(*func)(), ostream &where=*out) |
static void | RedirectOutput (ostream &where=*out) |
static void | RevertOutput () |
static void | IgnoreFailedAssert (bool flag=true) |
static void | IgnoreRedirection (bool flag=true) |
static void | IgnoreFatal (unsigned short s=0, unsigned short e=65535) |
static void | SetOutput (ostream *newOut) |
static void | SetOutput (ostream &newOut) |
static void | SetWarningLimit (int x) |
Static Protected Attributes | |
static streambuf * | bCout =cout.rdbuf() |
static streambuf * | bCerr =cerr.rdbuf() |
static ostream * | out =&cout |
static stringstream | buf |
static int | warnLimit =100 |
static int | decays [4] = {0} |
static int | dCount =0 |
static int | dRangeS =65535 |
static int | dRangeE =65534 |
static int | faCount =0 |
static int | faRangeS =65535 |
static int | faRangeE =65534 |
static int | iCount =0 |
static int | wCount =0 |
static int | eCount =0 |
static int | asCount =0 |
static int | asFailedCount =0 |
static bool | iAction =1 |
static bool | wAction =1 |
static bool | eAction =1 |
static bool | asAction =1 |
static bool | rAction =1 |
static list< Pointer * > * | PointerList = NULL |
|
static |
|
static |
Adds the decay to the counter. The type is: 0 - gun, 1 - no mothers & grandmothers, 2 - no mothers, 3 - ok.
|
static |
Asserts logical value. If the assertion fails, the default message or 'text' will be printed and the program will terminate. Program termination can be suppressed by Log::IgnoreFailedAsserts();
|
static |
Asserts logical value. If the assertion fails, the default message or 'text' will be printed and the program will terminate. Program termination can be suppressed by Log::IgnoreFailedAsserts();
Definition at line 72 of file Log.cxx.
References asAction, asCount, asFailedCount, exit(), and out.
|
static |
Four logging entries. Usage: Log::Info()<<"Logging some info: "<<8<<" > "<<7.9<<endl; Use Log::Info(false) if You don't want the message to be counted.
Definition at line 30 of file Log.cxx.
References buf, dCount, dRangeE, dRangeS, and out.
Referenced by Photospp::PhotosBranch::createBranches(), Photospp::PhotosEvent::filterParticles(), Photospp::PhotosRandom::initialize(), Photospp::PhotosBranch::PhotosBranch(), and Photospp::PhotosBranch::process().
|
static |
Four logging entries. Usage: Log::Info()<<"Logging some info: "<<8<<" > "<<7.9<<endl; Use Log::Info(false) if You don't want the message to be counted.
|
static |
|
static |
|
static |
Terminates the program with added default message or 'text'. It can be suppressed by Log::IgnoreFatal();
|
static |
Terminates the program with added default message or 'text'. It can be suppressed by Log::IgnoreFatal();
Referenced by Photospp::PhotosHEPEVTParticle::addDaughter(), Photospp::PhotosHepMCParticle::addDaughter(), Photospp::PhotosRandom::randomReal(), Photospp::PhotosHEPEVTParticle::setDaughters(), Photospp::PhotosHepMCParticle::setDaughters(), Photospp::PhotosHEPEVTParticle::setMothers(), Photospp::PhotosHepMCParticle::setMothers(), and Photospp::PhotosRandom::setSeed().
|
inlinestatic |
|
inlinestatic |
Definition at line 77 of file 3.52/src/utilities/Log.h.
References Fatal().
Referenced by Fatal().
|
inlinestatic |
Do not exit when Log::Assert() check is false. The number of failed asserts will be listed in the summary.
Definition at line 94 of file Log.h.
References asAction.
|
inlinestatic |
Do not exit when Log::Assert() check is false. The number of failed asserts will be listed in the summary.
Definition at line 94 of file 3.52/src/utilities/Log.h.
References asAction.
|
inlinestatic |
|
inlinestatic |
Do not exit when Log::Fatal() with the code within the provided range is called. The number of ignored fatal errors will be listed in the summary.
Definition at line 102 of file 3.52/src/utilities/Log.h.
References faRangeE, faRangeS, and s.
|
inlinestatic |
Ignores redirections of functions' output. The function will still be called in a normal way.
Definition at line 98 of file 3.52/src/utilities/Log.h.
References rAction.
|
inlinestatic |
|
static |
Definition at line 38 of file Log.cxx.
References buf, iAction, iCount, and out.
Referenced by Photospp::PhotosDebugRandom::print(), Photospp::PhotosHEPEVTEvent::print(), and Photospp::Photos::setStopAtCriticalError().
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Sets the range of debug codes that will be printed. By default, the debug messages are turned off.
Definition at line 67 of file 3.52/src/utilities/Log.h.
References dRangeE, dRangeS, and s.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Turns off or on particular types of messages By default, only debugging messages are turned off.
Definition at line 56 of file 3.52/src/utilities/Log.h.
References iAction.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
Redirects output to log. Redirection can be done for a block of code or for one function only. Redirection can be turned off by using Log::IgnoreRedirection(); If the target is one of the log streams (for example): Log::RedirectOutput( someFunction, Log::Info() ); You can turn the function's messages off by turning the apropriate log entries off. The redirected code will still be executed, only messages are redirected.
Definition at line 90 of file Log.cxx.
References bCerr, bCout, func, and rAction.
Referenced by Photospp::PhotosHEPEVTParticle::checkMomentumConservation(), Photospp::PhotosHepMCParticle::checkMomentumConservation(), and Photospp::PhotosDebugRandom::print().
|
static |
Redirects output to log. Redirection can be done for a block of code or for one function only. Redirection can be turned off by using Log::IgnoreRedirection(); If the target is one of the log streams (for example): Log::RedirectOutput( someFunction, Log::Info() ); You can turn the function's messages off by turning the apropriate log entries off. The redirected code will still be executed, only messages are redirected.
|
static |
|
static |
|
inlinestatic |
WARNING! If You're redirecting more than one function, do not forget to use RevertOutput() afterwards.
Definition at line 90 of file Log.h.
Referenced by Photospp::PhotosHEPEVTParticle::checkMomentumConservation(), Photospp::PhotosHepMCParticle::checkMomentumConservation(), and Photospp::PhotosDebugRandom::print().
|
inlinestatic |
WARNING! If You're redirecting more than one function, do not forget to use RevertOutput() afterwards.
Definition at line 90 of file 3.52/src/utilities/Log.h.
|
inlinestatic |
Change the output of the logged messages. Log::SetOutput(cerr); //changes the output to cerr Log::SetOutput(new ofstream("log.txt")); //changes the output to a file "log.txt"
Definition at line 107 of file Log.h.
References out.
|
inlinestatic |
Change the output of the logged messages. Log::SetOutput(cerr); //changes the output to cerr Log::SetOutput(new ofstream("log.txt")); //changes the output to a file "log.txt"
Definition at line 107 of file 3.52/src/utilities/Log.h.
References out.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Change the limit of warnings that will be displayed. Set to 0 for no limit.
Definition at line 111 of file 3.52/src/utilities/Log.h.
|
static |
Shows the summary of all messages.
|
static |
Shows the summary of all messages.
Definition at line 110 of file Log.cxx.
References asAction, asCount, asFailedCount, dCount, decays, dRangeE, dRangeS, eAction, eCount, faCount, faRangeE, faRangeS, iAction, iCount, out, wAction, warnLimit, and wCount.
Referenced by SummaryAtExit().
|
inlinestatic |
Shows the summary at the end of the program.
Definition at line 40 of file 3.52/src/utilities/Log.h.
References Summary().
|
inlinestatic |
|
static |
|
static |
Definition at line 46 of file Log.cxx.
References buf, out, wAction, warnLimit, and wCount.
Referenced by Photospp::PhotosHEPEVTParticle::checkMomentumConservation(), Photospp::PhotosHepMCParticle::checkMomentumConservation(), Photospp::Photos::createHistoryEntries(), Photospp::PhotosHEPEVTParticle::createHistoryEntry(), Photospp::PhotosHepMCParticle::createHistoryEntry(), Photospp::PhotosHEPEVTParticle::createSelfDecayVertex(), Photospp::Photos::forceMass(), Photospp::PhotosHEPEVTParticle::getDaughters(), Photospp::Photos::ignoreParticlesOfStatus(), and Photospp::PhotosBranch::PhotosBranch().
|
staticprotected |
Definition at line 121 of file Log.h.
Referenced by Assert(), IgnoreFailedAssert(), and Summary().
|
staticprotected |
|
staticprotected |
|
staticprotected |
Definition at line 114 of file Log.h.
Referenced by RedirectOutput(), and RevertOutput().
|
staticprotected |
Definition at line 114 of file Log.h.
Referenced by RedirectOutput(), and RevertOutput().
|
staticprotected |
|
staticprotected |
|
staticprotected |
Definition at line 118 of file Log.h.
Referenced by AddDecay(), and Summary().
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Definition at line 119 of file Log.h.
Referenced by IgnoreFatal(), and Summary().
|
staticprotected |
Definition at line 119 of file Log.h.
Referenced by IgnoreFatal(), and Summary().
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Definition at line 121 of file Log.h.
Referenced by IgnoreRedirection(), and RedirectOutput().
|
staticprotected |
|
staticprotected |
Definition at line 117 of file Log.h.
Referenced by SetWarningLimit(), Summary(), and Warning().
|
staticprotected |