Controls the memory tracing hooks in all RooFit objects.
When tracing is active, a table of live RooFit objects is kept that can be queried at any time. In verbose mode, messages are printed in addition at the construction and destruction of each object.
Usage example:
TRACE_CREATE
and TRACE_DESTROY
macros in RooTrace.h to call the RooTrace functions:However, as ROOT is not build with this by default, the RooTrace is not tested and there is no guarantee that this works.
Definition at line 26 of file RooTrace.h.
Public Member Functions | |
RooTrace () | |
virtual | ~RooTrace () |
virtual TClass * | IsA () const |
virtual void | Streamer (TBuffer &) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static void | active (bool flag) |
If flag is true, memory tracing is activated. | |
static void | callgrind_dump () |
Utility function to trigger dumping of callgrind counters. | |
static void | callgrind_zero () |
Utility function to trigger zeroing of callgrind counters. | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static void | create (const TObject *obj) |
Register creation of object 'obj'. | |
static void | createSpecial (const char *name, int size) |
static const char * | DeclFileName () |
static void | destroy (const TObject *obj) |
Register deletion of object 'obj'. | |
static void | destroySpecial (const char *name) |
static void | dump () |
Dump contents of object registry to stdout. | |
static void | dump (std::ostream &os, bool sinceMarked=false) |
static RooTrace & | instance () |
static void | mark () |
Put marker in object list, that allows to dump contents of list relative to this marker. | |
static void | printObjectCounts () |
static void | verbose (bool flag) |
If flag is true, a message will be printed at each object creation or deletion. | |
Protected Member Functions | |
void | addPad (const TObject *ref, bool doPad) |
void | create2 (const TObject *obj) |
Back end function of create(), register creation of object 'obj'. | |
void | create3 (const TObject *obj) |
void | createSpecial3 (const char *name, int size) |
void | destroy2 (const TObject *obj) |
Back end function of destroy(), register deletion of object 'obj'. | |
void | destroy3 (const TObject *obj) |
Back end function of destroy(), register deletion of object 'obj'. | |
void | destroySpecial3 (const char *name) |
void | dump3 (std::ostream &, bool sinceMarked) |
Dump contents of object register to stream 'os'. | |
void | mark3 () |
Put marker in object list, that allows to dump contents of list relative to this marker. | |
void | printObjectCounts3 () |
bool | removePad (const TObject *ref) |
Protected Attributes | |
bool | _active |
RooLinkedList | _list |
RooLinkedList | _markList |
std::map< TClass *, int > | _objectCount |
std::map< std::string, int > | _specialCount |
std::map< std::string, int > | _specialSize |
bool | _verbose |
Static Protected Attributes | |
static RooTrace * | _instance =nullptr |
#include <RooTrace.h>
RooTrace::RooTrace | ( | ) |
Definition at line 114 of file RooTrace.cxx.
|
inlinevirtual |
Definition at line 29 of file RooTrace.h.
|
static |
If flag is true, memory tracing is activated.
Definition at line 188 of file RooTrace.cxx.
|
static |
Utility function to trigger dumping of callgrind counters.
Note that this function does not do anything, other than optionally printing this message To trigger callgrind dumping action, run callgrind with argument '–dump-before=RooTrace::callgrind_dump()' (include single quotes in cmdline)
Definition at line 365 of file RooTrace.cxx.
|
static |
Utility function to trigger zeroing of callgrind counters.
Note that this function does not do anything, other than optionally printing this message To trigger callgrind zero counter action, run callgrind with argument '–zero-before=RooTrace::callgrind_zero()' (include single quotes in cmdline)
Definition at line 353 of file RooTrace.cxx.
|
static |
|
inlinestaticconstexpr |
Definition at line 84 of file RooTrace.h.
|
static |
Register creation of object 'obj'.
Definition at line 123 of file RooTrace.cxx.
|
protected |
Back end function of create(), register creation of object 'obj'.
Definition at line 210 of file RooTrace.cxx.
|
protected |
Definition at line 238 of file RooTrace.cxx.
|
static |
Definition at line 147 of file RooTrace.cxx.
|
protected |
Definition at line 169 of file RooTrace.cxx.
|
inlinestatic |
Definition at line 84 of file RooTrace.h.
|
static |
Register deletion of object 'obj'.
Definition at line 136 of file RooTrace.cxx.
|
protected |
Back end function of destroy(), register deletion of object 'obj'.
Definition at line 225 of file RooTrace.cxx.
|
protected |
Back end function of destroy(), register deletion of object 'obj'.
Definition at line 250 of file RooTrace.cxx.
|
static |
Definition at line 158 of file RooTrace.cxx.
|
protected |
Definition at line 178 of file RooTrace.cxx.
|
static |
Dump contents of object registry to stdout.
Definition at line 282 of file RooTrace.cxx.
|
static |
Definition at line 290 of file RooTrace.cxx.
|
protected |
Dump contents of object register to stream 'os'.
If sinceMarked is true, only object created after the last call to mark() are shown.
Definition at line 300 of file RooTrace.cxx.
|
static |
Definition at line 105 of file RooTrace.cxx.
|
inlinevirtual |
Definition at line 84 of file RooTrace.h.
|
static |
Put marker in object list, that allows to dump contents of list relative to this marker.
Definition at line 261 of file RooTrace.cxx.
|
protected |
Put marker in object list, that allows to dump contents of list relative to this marker.
Definition at line 272 of file RooTrace.cxx.
|
static |
Definition at line 319 of file RooTrace.cxx.
|
protected |
Definition at line 326 of file RooTrace.cxx.
|
virtual |
|
inline |
Definition at line 84 of file RooTrace.h.
|
static |
If flag is true, a message will be printed at each object creation or deletion.
Definition at line 198 of file RooTrace.cxx.
|
protected |
Definition at line 76 of file RooTrace.h.
|
staticprotected |
Definition at line 57 of file RooTrace.h.
|
protected |
Definition at line 78 of file RooTrace.h.
|
protected |
Definition at line 79 of file RooTrace.h.
Definition at line 80 of file RooTrace.h.
|
protected |
Definition at line 81 of file RooTrace.h.
|
protected |
Definition at line 82 of file RooTrace.h.
|
protected |
Definition at line 77 of file RooTrace.h.