12 #ifndef ROOT_THashTable
13 #define ROOT_THashTable
27 #ifndef ROOT_TCollection
Int_t GetHashValue(const char *str) const
Int_t Collisions(const char *name) const
Returns the number of collisions for an object with a certain name (i.e.
Int_t GetHashValue(TString &s) const
UInt_t Hash(const TString &s)
virtual void AddAll(const TCollection *col)
Add all objects from collection col to this collection.
void AddBefore(const TObject *before, TObject *obj)
Add object to the hash table.
void Reset()
Reset the hashtable iterator.
const TList * GetListForObject(const char *name) const
Return the TList corresponding to object's name based hash value.
virtual ULong_t Hash() const
Return hash value for this object.
TObject * operator*() const
Return pointer to current object or nullptr.
void Rehash(Int_t newCapacity, Bool_t checkObjValidity=kTRUE)
Rehash the hashtable.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Returns a hash table iterator.
TObject * RemoveSlow(TObject *obj)
Remove object from the hashtable without using the hash value.
THashTable & operator=(const THashTable &)
Int_t GetHashValue(const TObject *obj) const
const THashTable * fTable
Iterator abstract base class.
Bool_t operator!=(const TIterator &aIter) const
This operator compares two TIterator objects.
THashTable(const THashTable &)
THashTable implements a hash table to store TObject's.
#define ClassDef(name, id)
void Clear(Option_t *option="")
Remove all objects from the table.
std::map< std::string, std::string >::const_iterator iter
void SetRehashLevel(Int_t rehash)
const Bool_t kIterForward
Int_t NextSlot()
Returns index of next slot in table containing list to be iterated.
~THashTableIter()
Delete hashtable iterator.
const TCollection * GetCollection() const
Collection abstract base class.
virtual ~THashTable()
Delete a hashtable.
Float_t AverageCollisions() const
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator.
TObject ** GetObjectRef(const TObject *obj) const
Return address of pointer to obj.
void Add(TObject *obj)
Add object to the hash table.
Mother of all ROOT objects.
void Delete(Option_t *option="")
Remove all objects from the table AND delete all heap based objects.
Int_t GetRehashLevel() const
TObject * FindObject(const char *name) const
Find object using its name.
TObject * Next()
Return next object in hashtable. Returns 0 when no more objects in table.
TObject * Remove(TObject *obj)
Remove object from the hashtable.
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.