127 Printf(
"\nList of all objects");
128 Printf(
"object address class name");
129 Printf(
"================================================================================");
130 for (i = 0; i <
fSize; i++) {
134 printf(
"%-8d 0x%-16zx %-24s %s\n", num, (
size_t)obj, obj->
ClassName(),
137 Printf(
"================================================================================\n");
150 Error(
"Add",
"op is 0");
176 ::Error(
"TObjectTable::AddObj",
"op is 0");
197 for (
int i = 0; i <
fSize; i++) {
212 Error(
"Remove",
"remove 0 from TObjectTable");
221 Warning(
"Remove",
"0x%zx not found at %d", (
size_t)op, i);
222 for (
int j = 0; j <
fSize; j++) {
224 Error(
"Remove",
"0x%zx found at %d !!!", (
size_t)op, j);
252 for (
int j = 0; j <
fSize; j++)
287 if ((slotOp =
fTable[slot]) ==
nullptr)
302 Int_t oldIndex, nextIndex;
305 for (oldIndex =
index+1; ;oldIndex++) {
306 if (oldIndex >=
fSize)
308 nextObject =
fTable[oldIndex];
312 if (nextIndex != oldIndex) {
313 fTable[nextIndex] = nextObject;
314 fTable[oldIndex] =
nullptr;
331 for (
int i = 0; i < oldsize; i++)
332 if ((op = oldTable[i]))
342 int n,
h, s, ncum = 0, hcum = 0, scum = 0, tcum = 0, thcum = 0;
349 Printf(
"\nObject statistics");
350 Printf(
"class cnt on heap size total size heap size");
351 Printf(
"================================================================================");
354 while ((cl = (
TClass*) next())) {
367 Printf(
"--------------------------------------------------------------------------------");
368 Printf(
"Total: %8d%11d%9d%14d%13d", ncum, hcum, scum, tcum, thcum);
369 Printf(
"================================================================================\n");
382 gROOT->GetListOfClasses()->R__FOR_EACH(
TClass,ResetInstanceCount)();
384 for (
int i = 0; i <
fSize; i++)
389 Error(
"UpdateInstCount",
"oops 0x%zx\n", (
size_t)op);
401 Warning(
"CheckPtrAndWarn",
"%s (0x%zx)\n", msg, (
size_t)vp);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
TObjectTable * gObjectTable
R__EXTERN TObjectTable * gObjectTable
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void AddInstance(Bool_t heap=kFALSE)
UInt_t GetInstanceCount() const
Int_t Size() const
Return size of object of this class.
UInt_t GetHeapInstanceCount() const
const char * GetName() const override
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.
Int_t FindElement(TObject *obj)
Find an object in 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.
TObjectTable(const TObjectTable &)=delete
void Print(Option_t *option="") const override
Print the object table.
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.
void Delete(Option_t *opt="") override
Delete all objects stored in the 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 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.
virtual TClass * IsA() const
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
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
Long_t NextPrime(Long_t x)