217 TList removeDirectory;
227 auto obj = tlk->GetObject();
229 tlk->SetObject(
nullptr);
231 Error(
"Delete",
"A list is accessing an object (%p) already deleted (list name = %s)",
233 else if (obj && obj->IsOnHeap())
235 else if (obj && obj->IsA()->GetDirectoryAutoAdd())
236 removeDirectory.
Add(obj);
249 TIter iRemDir(&removeDirectory);
251 while ((dirRem = iRemDir())) {
252 (*dirRem->IsA()->GetDirectoryAutoAdd())(dirRem, 0);
351 next = lnk->NextSP();
352 TObject *ob = lnk->GetObject();
#define R__COLLECTION_READ_LOCKGUARD(mutex)
#define R__COLLECTION_WRITE_LOCKGUARD(mutex)
virtual const char * GetName() const
Return name of this collection.
virtual bool UseRWLock()
Set this collection to use a RW lock upon access, making it thread safe.
static void GarbageCollect(TObject *obj)
Add to the list of things to be cleaned up.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
TObject * FindObject(const char *name) const
Find object using its name.
void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
void Rehash(Int_t newCapacity)
Rehash the hashlist.
virtual ~THashList()
Delete a hashlist.
void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
bool UseRWLock()
Set this collection to use a RW lock upon access, making it thread safe.
void AddAt(TObject *obj, Int_t idx)
Insert object at location idx in the list.
TObject * Remove(TObject *obj)
Remove object from the list.
const TList * GetListForObject(const char *name) const
Return the THashTable's list (bucket) in which obj can be found based on its hash; see THashTable::Ge...
THashList(const THashList &)
void Clear(Option_t *option="")
Remove all objects from the list.
void AddFirst(TObject *obj)
Add object at the beginning of the list.
void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Float_t AverageCollisions() const
Return the average collision rate.
void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
void AddLast(TObject *obj)
Add object at the end of the list.
THashTable implements a hash table to store TObject's.
Float_t AverageCollisions() const
TObject * Remove(TObject *obj)
Remove object from the hashtable.
const TList * GetListForObject(const char *name) const
Return the TList corresponding to object's name based hash value.
void Add(TObject *obj)
Add object to the hash table.
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the hashtable.
TObject * RemoveSlow(TObject *obj)
Remove object from the hashtable without using the hash value.
void AddBefore(const TObject *before, TObject *obj)
Add object to the hash table.
TObject * FindObject(const char *name) const
Find object using its name.
void Clear(Option_t *option="")
Remove all objects from the table.
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void AddAt(TObject *obj, Int_t idx)
Insert object at position idx in the list.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
TObjLinkPtr_t fLast
pointer to first entry in linked list
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
TObjLinkWeakPtr_t fCache
pointer to last entry in linked list
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Mother of all ROOT objects.
Bool_t HasInconsistentHash() const
Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveR...
@ kNotDeleted
object has not been deleted
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void RecursiveRemove(TObject *obj)
Recursively remove this object from a list.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
R__EXTERN TVirtualRWMutex * gCoreMutex