StMuDebug Class Reference

#include <StMuDebug.h>

List of all members.

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
 debug level


Detailed Description

Helper class used to control the amount of output. All datamembers and functions are static, so you can use them everywhere using 'StMuDebugxxxxx()` 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 61 of file StMuDebug.h.


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

Generated on Fri Feb 10 04:28:12 2012 for StRoot by  doxygen 1.5.9