52 if (_instance==0) _instance =
new RooTrace() ;
159 cout <<
"RooTrace::create: object " << obj <<
" of type " << obj->
ClassName()
160 <<
" created " << endl ;
174 cout <<
"RooTrace::destroy: object " << obj <<
" of type " << obj->
ClassName()
175 <<
" destroyed [" << obj->
GetTitle() <<
"]" << endl ;
247 os <<
"List of RooFit objects allocated while trace active:" << endl ;
250 Int_t i, nMarked(0) ;
258 if (sinceMarked) os << nMarked <<
" marked objects suppressed" << endl ;
275 Double_t tot= 1.0*(iter->first->Size()*iter->second)/(1024*1024) ;
276 cout <<
" class " << iter->first->GetName() <<
" count = " << iter->second <<
" sizeof = " << iter->first->Size() <<
" total memory = " <<
Form(
"%5.2f",tot) <<
" Mb" << endl ;
282 Double_t tot=1.0*(size*iter->second)/(1024*1024) ;
283 cout <<
" speeial " << iter->first <<
" count = " << iter->second <<
" sizeof = " << size <<
" total memory = " <<
Form(
"%5.2f",tot) <<
" Mb" << endl ;
286 cout <<
"Grand total memory = " <<
Form(
"%5.2f",total) <<
" Mb" << endl ;
Int_t IndexOf(const char *name) const
Return position of given object in list.
virtual Bool_t Remove(TObject *arg)
Remove object from collection.
static void callgrind_zero()
Utility function to trigger zeroing of callgrind counters.
static RooTrace & instance()
static RooTrace * _instance
std::map< std::string, int > _specialCount
static void active(Bool_t flag)
If flag is true, memory tracing is activated.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void printObjectCounts3()
Class RooTrace controls the memory tracing hooks in all RooFit objects.
void create3(const TObject *obj)
static void create(const TObject *obj)
Register creation of object 'obj'.
void createSpecial3(const char *name, int size)
virtual void Add(TObject *arg)
TObject * At(Int_t index) const
Return object stored in sequential position given by index.
static void mark()
Put marker in object list, that allows to dump contents of list relative to this marker.
void create2(const TObject *obj)
Back end function of create(), register creation of object 'obj'.
char * Form(const char *fmt,...)
void destroySpecial3(const char *name)
static void verbose(Bool_t flag)
If flag is true, a message will be printed at each object creation or deletion.
void dump3(std::ostream &, Bool_t sinceMarked)
Dump contents of object register to stream 'os'.
static unsigned int total
static void destroy(const TObject *obj)
Register deletion of object 'obj'.
void destroy3(const TObject *obj)
Back end function of destroy(), register deletion of object 'obj'.
std::map< std::string, int > _specialSize
static void destroySpecial(const char *name)
void destroy2(const TObject *obj)
Back end function of destroy(), register deletion of object 'obj'.
static void createSpecial(const char *name, int size)
Mother of all ROOT objects.
void mark3()
Put marker in object list, that allows to dump contents of list relative to this marker.
static void printObjectCounts()
static void dump()
Dump contents of object registry to stdout.
static void callgrind_dump()
Utility function to trigger dumping of callgrind counters.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual const char * GetName() const
Returns name of object.
virtual const char * GetTitle() const
Returns title of object.
std::map< TClass *, int > _objectCount