126 Printf(
"\nList of all objects");
127 Printf(
"object address class name");
128 Printf(
"================================================================================");
129 for (i = 0; i <
fSize; i++) {
136 Printf(
"================================================================================\n");
149 Error(
"Add",
"op is 0");
175 ::Error(
"TObjectTable::AddObj",
"op is 0");
196 for (
int i = 0; i <
fSize; i++) {
211 Error(
"Remove",
"remove 0 from TObjectTable");
221 for (
int j = 0; j <
fSize; j++) {
223 Error(
"Remove",
"0x%lx found at %d !!!", (
Long_t)op, j);
251 for (
int j = 0; j <
fSize; j++)
285 if ((slotOp =
fTable[slot]) == 0)
300 Int_t oldIndex, nextIndex;
303 for (oldIndex = index+1; ;oldIndex++) {
304 if (oldIndex >=
fSize)
306 nextObject =
fTable[oldIndex];
310 if (nextIndex != oldIndex) {
311 fTable[nextIndex] = nextObject;
329 for (
int i = 0; i < oldsize; i++)
330 if ((op = oldTable[i]))
340 int n,
h,
s, ncum = 0, hcum = 0, scum = 0, tcum = 0, thcum = 0;
347 Printf(
"\nObject statistics");
348 Printf(
"class cnt on heap size total size heap size");
349 Printf(
"================================================================================");
352 while ((cl = (
TClass*) next())) {
365 Printf(
"--------------------------------------------------------------------------------");
366 Printf(
"Total: %8d%11d%9d%14d%13d", ncum, hcum, scum, tcum, thcum);
367 Printf(
"================================================================================\n");
380 gROOT->GetListOfClasses()->R__FOR_EACH(
TClass,ResetInstanceCount)();
382 for (
int i = 0; i <
fSize; i++)
385 op->IsA()->AddInstance(op->
IsOnHeap());
387 Error(
"UpdateInstCount",
"oops 0x%lx\n", (
Long_t)op);
TObjectTable * gObjectTable
void Printf(const char *fmt,...)
TClass instances represent classes, structs and namespaces in the ROOT type system.
UInt_t GetInstanceCount() const
Int_t Size() const
Return size of object of this class.
UInt_t GetHeapInstanceCount() const
virtual const char * GetName() const
Returns name of object.
This class registers all instances of TObject and its derived classes in a hash table.
void InstanceStatistics() const
Print the object table.
void Delete(Option_t *opt="")
Delete all objects stored in the TObjectTable.
Int_t FindElement(TObject *obj)
Find an object in the object table.
void Print(Option_t *option="") const
Print the object table.
void Terminate()
Deletes the object table (this static class function calls the dtor).
~TObjectTable()
Delete TObjectTable.
void Remove(TObject *obj)
Remove an object from the object table.
void * CheckPtrAndWarn(const char *msg, void *vp)
Issue a warning in case an object still appears in the table while it should not.
void UpdateInstCount() const
Histogram all objects according to their classes.
void FixCollisions(Int_t index)
Rehash the object table in case an object has been removed.
void Add(TObject *obj)
Add an object to the object table.
TObjectTable(const TObjectTable &)
static void AddObj(TObject *obj)
Add an object to the global object table gObjectTable.
void Expand(Int_t newsize)
Expand the object table.
void RemoveQuietly(TObject *obj)
Remove an object from the object table.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
@ kNotDeleted
object has not been deleted
R__ALWAYS_INLINE Bool_t IsOnHeap() const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
void ToLower()
Change string to lower-case.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Long_t NextPrime(Long_t x)
TMath Base functions.
static constexpr double s