C++ Interface to Tauola
Log Class Reference
Collaboration diagram for Log:
Collaboration graph

Data Structures

struct  Pointer

Static Public Member Functions

static void Summary ()
static void SummaryAtExit ()
static void AddDecay (int type)
static ostreamDebug (unsigned short int code=0, bool count=true)
static ostreamInfo (bool count=true)
static ostreamWarning (bool count=true)
static ostreamError (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 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 ostreamDebug (unsigned short int code=0, bool count=true)
static ostreamInfo (bool count=true)
static ostreamWarning (bool count=true)
static ostreamError (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 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 ostreamout =&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

Detailed Description

Definition at line 31 of file include/Tauola/Log.h.

Member Function Documentation

◆ AddDecay() [1/2]

void AddDecay ( int type)
static

Adds the decay to the counter. The type is: 0 - gun, 1 - no mothers & grandmothers, 2 - no mothers, 3 - ok.

Definition at line 25 of file Log.cxx.

◆ AddDecay() [2/2]

void AddDecay ( int type)
static

Adds the decay to the counter. The type is: 0 - gun, 1 - no mothers & grandmothers, 2 - no mothers, 3 - ok.

◆ Assert() [1/2]

void Assert ( bool check,
char * text = NULL )
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 73 of file Log.cxx.

◆ Assert() [2/2]

void Assert ( bool check,
char * text = NULL )
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();

◆ Debug() [1/2]

ostream & Debug ( unsigned short int code = 0,
bool count = true )
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.

◆ Debug() [2/2]

ostream & Debug ( unsigned short int code = 0,
bool count = true )
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.

◆ Error()

ostream & Error ( bool count = true)
static

Definition at line 66 of file Log.cxx.

◆ Fatal() [1/4]

void Fatal ( string text,
unsigned short int code = 0 )
static

Terminates the program with added default message or 'text'. It can be suppressed by Log::IgnoreFatal();

◆ Fatal() [2/4]

void Fatal ( string text,
unsigned short int code = 0 )
static

Terminates the program with added default message or 'text'. It can be suppressed by Log::IgnoreFatal();

◆ Fatal() [3/4]

void Fatal ( unsigned short int code = 0)
inlinestatic

Definition at line 72 of file include/Tauola/Log.h.

◆ Fatal() [4/4]

void Fatal ( unsigned short int code = 0)
inlinestatic

Definition at line 72 of file src/utilities/Log.h.

◆ IgnoreFailedAssert() [1/2]

void IgnoreFailedAssert ( bool flag = true)
inlinestatic

Do not exit when Log::Assert() check is false. The number of failed asserts will be listed in the summary.

Definition at line 89 of file include/Tauola/Log.h.

◆ IgnoreFailedAssert() [2/2]

void IgnoreFailedAssert ( bool flag = true)
inlinestatic

Do not exit when Log::Assert() check is false. The number of failed asserts will be listed in the summary.

Definition at line 89 of file src/utilities/Log.h.

◆ IgnoreFatal() [1/2]

void IgnoreFatal ( unsigned short s = 0,
unsigned short e = 65535 )
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 97 of file include/Tauola/Log.h.

◆ IgnoreFatal() [2/2]

void IgnoreFatal ( unsigned short s = 0,
unsigned short e = 65535 )
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 97 of file src/utilities/Log.h.

◆ IgnoreRedirection() [1/2]

void IgnoreRedirection ( bool flag = true)
inlinestatic

Ignores redirections of functions' output. The function will still be called in a normal way.

Definition at line 93 of file include/Tauola/Log.h.

◆ IgnoreRedirection() [2/2]

void IgnoreRedirection ( bool flag = true)
inlinestatic

Ignores redirections of functions' output. The function will still be called in a normal way.

Definition at line 93 of file src/utilities/Log.h.

◆ Info()

ostream & Info ( bool count = true)
static

Definition at line 38 of file Log.cxx.

◆ LogAll() [1/2]

void LogAll ( bool flag = true)
inlinestatic

Definition at line 58 of file include/Tauola/Log.h.

◆ LogAll() [2/2]

void LogAll ( bool flag = true)
inlinestatic

Definition at line 58 of file src/utilities/Log.h.

◆ LogDebug() [1/2]

void LogDebug ( unsigned short s = 0,
unsigned short e = 65535 )
inlinestatic

Sets the range of debug codes that will be printed. By default, the debug messages are turned off.

Definition at line 62 of file include/Tauola/Log.h.

◆ LogDebug() [2/2]

void LogDebug ( unsigned short s = 0,
unsigned short e = 65535 )
inlinestatic

Sets the range of debug codes that will be printed. By default, the debug messages are turned off.

Definition at line 62 of file src/utilities/Log.h.

◆ LogError() [1/2]

void LogError ( bool flag = true)
inlinestatic

Definition at line 56 of file include/Tauola/Log.h.

◆ LogError() [2/2]

void LogError ( bool flag = true)
inlinestatic

Definition at line 56 of file src/utilities/Log.h.

◆ LogInfo() [1/2]

void LogInfo ( bool flag = true)
inlinestatic

Turns off or on particular types of messages By default, only debugging messages are turned off.

Definition at line 54 of file include/Tauola/Log.h.

◆ LogInfo() [2/2]

void LogInfo ( bool flag = true)
inlinestatic

Turns off or on particular types of messages By default, only debugging messages are turned off.

Definition at line 54 of file src/utilities/Log.h.

◆ LogWarning() [1/2]

void LogWarning ( bool flag = true)
inlinestatic

Definition at line 55 of file include/Tauola/Log.h.

◆ LogWarning() [2/2]

void LogWarning ( bool flag = true)
inlinestatic

Definition at line 55 of file src/utilities/Log.h.

◆ RedirectOutput() [1/3]

void RedirectOutput ( ostream & where = *out)
static

Definition at line 105 of file Log.cxx.

◆ RedirectOutput() [2/3]

void RedirectOutput ( void(* func )(),
ostream & where = *out )
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 93 of file Log.cxx.

◆ RedirectOutput() [3/3]

void RedirectOutput ( void(* func )(),
ostream & where = *out )
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.

◆ RevertOutput() [1/2]

void RevertOutput ( )
inlinestatic

WARNING! If you're redirecting more than one function, do not forget to use RevertOutput() afterwards.

Definition at line 85 of file include/Tauola/Log.h.

◆ RevertOutput() [2/2]

void RevertOutput ( )
inlinestatic

WARNING! If you're redirecting more than one function, do not forget to use RevertOutput() afterwards.

Definition at line 85 of file src/utilities/Log.h.

◆ SetOutput() [1/4]

void SetOutput ( ostream & newOut)
inlinestatic

Definition at line 103 of file include/Tauola/Log.h.

◆ SetOutput() [2/4]

void SetOutput ( ostream & newOut)
inlinestatic

Definition at line 103 of file src/utilities/Log.h.

◆ SetOutput() [3/4]

void SetOutput ( ostream * newOut)
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 102 of file include/Tauola/Log.h.

◆ SetOutput() [4/4]

void SetOutput ( ostream * newOut)
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 102 of file src/utilities/Log.h.

◆ SetWarningLimit() [1/2]

void SetWarningLimit ( int x)
inlinestatic

Change the limit of warnings that will be displayed. Set to 0 for no limit.

Definition at line 106 of file include/Tauola/Log.h.

◆ SetWarningLimit() [2/2]

void SetWarningLimit ( int x)
inlinestatic

Change the limit of warnings that will be displayed. Set to 0 for no limit.

Definition at line 106 of file src/utilities/Log.h.

◆ Summary() [1/2]

void Summary ( )
static

Shows the summary of all messages.

Definition at line 113 of file Log.cxx.

◆ Summary() [2/2]

void Summary ( )
static

Shows the summary of all messages.

◆ SummaryAtExit() [1/2]

void SummaryAtExit ( )
inlinestatic

Shows the summary at the end of the program.

Definition at line 38 of file include/Tauola/Log.h.

References Summary().

◆ SummaryAtExit() [2/2]

void SummaryAtExit ( )
inlinestatic

Shows the summary at the end of the program.

Definition at line 38 of file src/utilities/Log.h.

References Summary().

◆ Warning()

ostream & Warning ( bool count = true)
static

Definition at line 46 of file Log.cxx.

Field Documentation

◆ asAction

bool asAction =1
staticprotected

Definition at line 116 of file include/Tauola/Log.h.

◆ asCount

int asCount =0
staticprotected

Definition at line 115 of file include/Tauola/Log.h.

◆ asFailedCount

int asFailedCount =0
staticprotected

Definition at line 115 of file include/Tauola/Log.h.

◆ bCerr

streambuf * bCerr =cerr.rdbuf()
staticprotected

Definition at line 109 of file include/Tauola/Log.h.

◆ bCout

streambuf * bCout =cout.rdbuf()
staticprotected

Definition at line 109 of file include/Tauola/Log.h.

◆ buf

stringstream buf
staticprotected

Definition at line 111 of file include/Tauola/Log.h.

◆ dCount

int dCount =0
staticprotected

Definition at line 114 of file include/Tauola/Log.h.

◆ decays

int decays = {0}
staticprotected

Definition at line 113 of file include/Tauola/Log.h.

◆ dRangeE

int dRangeE =65534
staticprotected

Definition at line 114 of file include/Tauola/Log.h.

◆ dRangeS

int dRangeS =65535
staticprotected

Definition at line 114 of file include/Tauola/Log.h.

◆ eAction

bool eAction =1
staticprotected

Definition at line 116 of file include/Tauola/Log.h.

◆ eCount

int eCount =0
staticprotected

Definition at line 115 of file include/Tauola/Log.h.

◆ faCount

int faCount =0
staticprotected

Definition at line 114 of file include/Tauola/Log.h.

◆ faRangeE

int faRangeE =65534
staticprotected

Definition at line 114 of file include/Tauola/Log.h.

◆ faRangeS

int faRangeS =65535
staticprotected

Definition at line 114 of file include/Tauola/Log.h.

◆ iAction

bool iAction =1
staticprotected

Definition at line 116 of file include/Tauola/Log.h.

◆ iCount

int iCount =0
staticprotected

Definition at line 115 of file include/Tauola/Log.h.

◆ out

ostream * out =&cout
staticprotected

Definition at line 110 of file include/Tauola/Log.h.

◆ PointerList

list< Pointer * > * PointerList = NULL
staticprotected

Definition at line 129 of file include/Tauola/Log.h.

◆ rAction

bool rAction =1
staticprotected

Definition at line 116 of file include/Tauola/Log.h.

◆ wAction

bool wAction =1
staticprotected

Definition at line 116 of file include/Tauola/Log.h.

◆ warnLimit

int warnLimit =100
staticprotected

Definition at line 112 of file include/Tauola/Log.h.

◆ wCount

int wCount =0
staticprotected

Definition at line 115 of file include/Tauola/Log.h.


The documentation for this class was generated from the following files: