StRoot
1
|
#include <StMuDebug.h>
Static Public Member Functions | |
static void | on () |
switch debug output on ( to last known level) | |
static void | setLevel (unsigned int level) |
sets the debug level | |
static void | off () |
switch of debug level, but remember last | |
static int | level () |
returns debug level | |
Static Protected Member Functions | |
static int | absolut (int i) |
returns the absolute of the debug level | |
Static Protected Attributes | |
static int | mDebug =0 |
debug level More... | |
Helper class used to control the amount of output. All datamembers and functions are static, so you can use them everywhere using 'StMuDebug::xxxxx()` So far I was using 3 debug levels: 1 : typical used for io that is generated once, e.g. in the constructor or init function 2 : typical used for io that is generated repeatedly, but in a moderate amount, e.g. printing the event number in an event loop 3 : typical used for io that is generated very frequently, e.g. printing pT when looping over all tracks 0 or negative debug levels means debug output switched off
You can use the debug level as: if ( StMuDebug::level()>2 ) { ... } However you will also find macros 'DEBUGMESSAGE(<string>)or
IFDEBUG(<cmd>)` which I frequently use to automatically print the name of actual scope
Definition at line 66 of file StMuDebug.h.
|
staticprotected |
debug level
default debug level is 0
Definition at line 83 of file StMuDebug.h.
Referenced by level(), off(), on(), and setLevel().