125 fTable->AddBefore(before, obj);
147 fTable->AddBefore(before, obj);
235 return fTable->AverageCollisions();
246 fTable->Clear(
"nodelete");
267 fTable->Clear(
"nodelete");
270 TList removeDirectory;
277 fTable->Remove(tlk->GetObject());
280 auto obj = tlk->GetObject();
282 tlk->SetObject(
nullptr);
284 Error(
"Delete",
"A list is accessing an object (%p) already deleted (list name = %s)",
286 else if (obj && obj->IsOnHeap())
288 else if (obj && obj->IsA()->GetDirectoryAutoAdd())
289 removeDirectory.
Add(obj);
302 TIter iRemDir(&removeDirectory);
304 while ((dirRem = iRemDir())) {
305 (*dirRem->
IsA()->GetDirectoryAutoAdd())(dirRem,
nullptr);
329 return fTable->FindObject(obj);
351 return fTable->GetListForObject(obj);
365 if (!obj ||
fSize == 0)
382 fTable->RemoveSlow(
object);
384 }
else if (
fTable->FindObject(obj)) {
404 next = lnk->NextSP();
405 TObject *ob = lnk->GetObject();
425 fTable->Rehash(newCapacity);
434 if (!obj || !
fTable->FindObject(obj))
return nullptr;
438 return fTable->Remove(obj);
446 if (!lnk)
return nullptr;
452 return fTable->Remove(obj);
464 fTable->UseRWLock(enable);
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
#define R__COLLECTION_READ_LOCKGUARD(mutex)
#define R__COLLECTION_WRITE_LOCKGUARD(mutex)
virtual bool UseRWLock(Bool_t enable=true)
Set this collection to use a RW lock upon access, making it thread safe.
const char * GetName() const override
Return name of this collection.
static void GarbageCollect(TObject *obj)
Add to the list of things to be cleaned up.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
void Clear(Option_t *option="") override
Remove all objects from the list.
void AddFirst(TObject *obj) override
Add object at the beginning of the list.
void Rehash(Int_t newCapacity)
Rehash the hashlist.
virtual ~THashList()
Delete a hashlist.
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
void AddAt(TObject *obj, Int_t idx) override
Insert object at location idx in the list.
THashList(const THashList &)=delete
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...
bool UseRWLock(Bool_t enable=true) override
Set this collection to use a RW lock upon access, making it thread safe.
Float_t AverageCollisions() const
Return the average collision rate.
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * FindObject(const char *name) const override
Find object using its name.
void AddLast(TObject *obj) override
Add object at the end of the list.
THashTable implements a hash table to store TObject's.
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
void Clear(Option_t *option="") override
Remove all objects from the list.
TList(const TList &)=delete
void AddAt(TObject *obj, Int_t idx) override
Insert object at position idx in the list.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void AddLast(TObject *obj) override
Add object at the end of the list.
TObjLinkPtr_t fLast
! pointer to last entry in linked list
void AddBefore(const TObject *before, TObject *obj) override
Insert object before object before in the list.
TObjLinkPtr_t fFirst
! pointer to first entry in linked list
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
TObjLinkWeakPtr_t fCache
! cache to speedup sequential calling of Before() and After() functions
void AddFirst(TObject *obj) override
Add object at the beginning of 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...
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.
virtual TClass * IsA() const
bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
externTVirtualRWMutex * gCoreMutex