|
ROOT
Reference Guide |
|
Go to the documentation of this file.
12 #ifndef ROOT_THashTable
13 #define ROOT_THashTable
void SetRehashLevel(Int_t rehash)
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
Int_t GetCheckedHashValue(TObject *obj) const
Int_t GetSize() const
Return the capacity of the collection, i.e.
UInt_t Hash(const TString &s)
Int_t GetHashValue(const TObject *obj) const
void Add(TObject *obj)
Add object to the hash table.
Int_t Collisions(const char *name) const
Returns the number of collisions for an object with a certain name (i.e.
virtual ~THashTable()
Delete a hashtable.
void Clear(Option_t *option="")
Remove all objects from the table.
void Reset()
Reset the hashtable iterator.
static constexpr double s
ULong_t CheckedHash()
Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return t...
virtual ULong_t Hash() const
Return hash value for this object.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Returns a hash table iterator.
Int_t GetRehashLevel() const
void Delete(Option_t *option="")
Remove all objects from the table AND delete all heap based objects.
const THashTable * fTable
Iterator abstract base class.
const Bool_t kIterForward
Float_t AverageCollisions() const
TObject * RemoveSlow(TObject *obj)
Remove object from the hashtable without using the hash value.
THashTable implements a hash table to store TObject's.
~THashTableIter()
Delete hashtable iterator.
TObject * FindObject(const char *name) const
Find object using its name.
void AddBefore(const TObject *before, TObject *obj)
Add object to the hash table.
TObject ** GetObjectRef(const TObject *obj) const
Return address of pointer to obj.
TObject * operator*() const
Return pointer to current object or nullptr.
THashTable & operator=(const THashTable &)=delete
Int_t NextSlot()
Returns index of next slot in table containing list to be iterated.
void AddImpl(Int_t slot, TObject *object)
Helper function doing the actual add to the table give a slot and object.
TObject * Remove(TObject *obj)
Remove object from the hashtable.
virtual void Print(Option_t *option="") const
Default print for collections, calls Print(option, 1).
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the hashtable.
const TList * GetListForObject(const char *name) const
Return the TList corresponding to object's name based hash value.
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator.
Mother of all ROOT objects.
#define ClassDef(name, id)
const TCollection * GetCollection() const
Collection abstract base class.
TObject * Next()
Return next object in hashtable. Returns 0 when no more objects in table.
Int_t GetHashValue(const char *str) const
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
THashTable(const THashTable &)=delete
Bool_t operator!=(const TIterator &aIter) const
This operator compares two TIterator objects.
Int_t GetHashValue(TString &s) const