Logo ROOT  
Reference Guide
RooTrace Class Reference

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

Definition at line 25 of file RooTrace.h.

Public Member Functions

 RooTrace ()
 
virtual ~RooTrace ()
 

Static Public Member Functions

static void active (Bool_t flag)
 If flag is true, memory tracing is activated. More...
 
static void callgrind_dump ()
 Utility function to trigger dumping of callgrind counters. More...
 
static void callgrind_zero ()
 Utility function to trigger zeroing of callgrind counters. More...
 
static void create (const TObject *obj)
 Register creation of object 'obj'. More...
 
static void createSpecial (const char *name, int size)
 
static void destroy (const TObject *obj)
 Register deletion of object 'obj'. More...
 
static void destroySpecial (const char *name)
 
static void dump ()
 Dump contents of object registry to stdout. More...
 
static void dump (std::ostream &os, Bool_t sinceMarked=kFALSE)
 
static RooTraceinstance ()
 
static void mark ()
 Put marker in object list, that allows to dump contents of list relative to this marker. More...
 
static void printObjectCounts ()
 
static void verbose (Bool_t flag)
 If flag is true, a message will be printed at each object creation or deletion. More...
 

Protected Member Functions

void addPad (const TObject *ref, Bool_t doPad)
 
void create2 (const TObject *obj)
 Back end function of create(), register creation of object 'obj'. More...
 
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'. More...
 
void destroy3 (const TObject *obj)
 Back end function of destroy(), register deletion of object 'obj'. More...
 
void destroySpecial3 (const char *name)
 
void dump3 (std::ostream &, Bool_t sinceMarked)
 Dump contents of object register to stream 'os'. More...
 
void mark3 ()
 Put marker in object list, that allows to dump contents of list relative to this marker. More...
 
void printObjectCounts3 ()
 
Bool_t removePad (const TObject *ref)
 

Protected Attributes

Bool_t _active
 
RooLinkedList _list
 
RooLinkedList _markList
 
std::map< TClass *, int > _objectCount
 
std::map< std::string, int > _specialCount
 
std::map< std::string, int > _specialSize
 
Bool_t _verbose
 

Static Protected Attributes

static RooTrace_instance =0
 

#include <RooTrace.h>

Constructor & Destructor Documentation

◆ RooTrace()

RooTrace::RooTrace ( )

Definition at line 59 of file RooTrace.cxx.

◆ ~RooTrace()

virtual RooTrace::~RooTrace ( )
inlinevirtual

Definition at line 28 of file RooTrace.h.

Member Function Documentation

◆ active()

void RooTrace::active ( Bool_t  flag)
static

If flag is true, memory tracing is activated.

Definition at line 133 of file RooTrace.cxx.

◆ addPad()

void RooTrace::addPad ( const TObject ref,
Bool_t  doPad 
)
protected

◆ callgrind_dump()

void RooTrace::callgrind_dump ( )
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 310 of file RooTrace.cxx.

◆ callgrind_zero()

void RooTrace::callgrind_zero ( )
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 298 of file RooTrace.cxx.

◆ create()

void RooTrace::create ( const TObject obj)
static

Register creation of object 'obj'.

Definition at line 68 of file RooTrace.cxx.

◆ create2()

void RooTrace::create2 ( const TObject obj)
protected

Back end function of create(), register creation of object 'obj'.

Definition at line 155 of file RooTrace.cxx.

◆ create3()

void RooTrace::create3 ( const TObject obj)
protected

Definition at line 183 of file RooTrace.cxx.

◆ createSpecial()

void RooTrace::createSpecial ( const char *  name,
int  size 
)
static

Definition at line 92 of file RooTrace.cxx.

◆ createSpecial3()

void RooTrace::createSpecial3 ( const char *  name,
int  size 
)
protected

Definition at line 114 of file RooTrace.cxx.

◆ destroy()

void RooTrace::destroy ( const TObject obj)
static

Register deletion of object 'obj'.

Definition at line 81 of file RooTrace.cxx.

◆ destroy2()

void RooTrace::destroy2 ( const TObject obj)
protected

Back end function of destroy(), register deletion of object 'obj'.

Definition at line 170 of file RooTrace.cxx.

◆ destroy3()

void RooTrace::destroy3 ( const TObject obj)
protected

Back end function of destroy(), register deletion of object 'obj'.

Definition at line 195 of file RooTrace.cxx.

◆ destroySpecial()

void RooTrace::destroySpecial ( const char *  name)
static

Definition at line 103 of file RooTrace.cxx.

◆ destroySpecial3()

void RooTrace::destroySpecial3 ( const char *  name)
protected

Definition at line 123 of file RooTrace.cxx.

◆ dump() [1/2]

void RooTrace::dump ( )
static

Dump contents of object registry to stdout.

Definition at line 227 of file RooTrace.cxx.

◆ dump() [2/2]

void RooTrace::dump ( std::ostream &  os,
Bool_t  sinceMarked = kFALSE 
)
static

Definition at line 235 of file RooTrace.cxx.

◆ dump3()

void RooTrace::dump3 ( std::ostream &  os,
Bool_t  sinceMarked 
)
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 245 of file RooTrace.cxx.

◆ instance()

RooTrace & RooTrace::instance ( )
static

Definition at line 50 of file RooTrace.cxx.

◆ mark()

void RooTrace::mark ( )
static

Put marker in object list, that allows to dump contents of list relative to this marker.

Definition at line 206 of file RooTrace.cxx.

◆ mark3()

void RooTrace::mark3 ( )
protected

Put marker in object list, that allows to dump contents of list relative to this marker.

Definition at line 217 of file RooTrace.cxx.

◆ printObjectCounts()

void RooTrace::printObjectCounts ( )
static

Definition at line 264 of file RooTrace.cxx.

◆ printObjectCounts3()

void RooTrace::printObjectCounts3 ( )
protected

Definition at line 271 of file RooTrace.cxx.

◆ removePad()

Bool_t RooTrace::removePad ( const TObject ref)
protected

◆ verbose()

void RooTrace::verbose ( Bool_t  flag)
static

If flag is true, a message will be printed at each object creation or deletion.

Definition at line 143 of file RooTrace.cxx.

Member Data Documentation

◆ _active

Bool_t RooTrace::_active
protected

Definition at line 75 of file RooTrace.h.

◆ _instance

RooTrace * RooTrace::_instance =0
staticprotected

Definition at line 56 of file RooTrace.h.

◆ _list

RooLinkedList RooTrace::_list
protected

Definition at line 77 of file RooTrace.h.

◆ _markList

RooLinkedList RooTrace::_markList
protected

Definition at line 78 of file RooTrace.h.

◆ _objectCount

std::map<TClass*,int> RooTrace::_objectCount
protected

Definition at line 79 of file RooTrace.h.

◆ _specialCount

std::map<std::string,int> RooTrace::_specialCount
protected

Definition at line 80 of file RooTrace.h.

◆ _specialSize

std::map<std::string,int> RooTrace::_specialSize
protected

Definition at line 81 of file RooTrace.h.

◆ _verbose

Bool_t RooTrace::_verbose
protected

Definition at line 76 of file RooTrace.h.

Libraries for RooTrace:
[legend]

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