StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
StMuDebug Class Reference

#include <StMuDebug.h>

Inheritance diagram for StMuDebug:

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...
 

Detailed Description

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.

Member Data Documentation

int StMuDebug::mDebug =0
staticprotected

debug level

default debug level is 0

Definition at line 83 of file StMuDebug.h.

Referenced by level(), off(), on(), and setLevel().


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