46 _hashMethod(hashMethod)
66 _hashMethod(other._hashMethod),
67 _usedSlots(other._usedSlots),
68 _entries(other._entries),
74 for (i=0 ; i<
_size ; i++) {
109 if (
_arr[slot]->Remove(arg)) {
111 if (
_arr[slot]->GetSize()==0) {
129 for (i=0 ; i<
_size ; i++) {
130 if (i != slot &&
_arr[i] &&
_arr[i]->Remove(arg)) {
132 if (
_arr[i]->GetSize()==0) {
152 for (i=0 ; i<20 ; i++) h[i]=0 ;
154 for (i=0 ; i<
_size ; i++) {
181 if (newSlot == slot) {
229 return elem ? elem->
_arg : 0 ;
246 while ((obj=it.
next())) {
248 if (elem->
_arg == hashArg)
return elem ;
286 for (i=0 ; i<
_size ; i++) {
Double_t avgCollisions() const
Calculate the average number of collisions (table slots with >1 filled entry)
TObject * find(const char *name) const
Return the object with given name from the table.
RooAbsArg * findArg(const RooAbsArg *) const
Return pointer to object with given name in collection.
RooHashTable(Int_t initSize=17, HashMethod hashMethod=Name)
Construct a hash table with given capacity and hash method.
Bool_t replace(const TObject *oldArg, const TObject *newArg, const TObject *oldHashArg=0)
Replace oldArg with newArg in the table.
Bool_t Replace(const TObject *oldArg, const TObject *newArg)
Replace object 'oldArg' in collection with new object 'newArg'.
const TNamed * namePtr() const
virtual ULong_t Hash() const
Return hash value for this object.
void useNptr(Bool_t flag)
virtual void Add(TObject *arg)
void add(TObject *arg, TObject *hashArg=0)
Add given object to table.
Bool_t TestBit(UInt_t f) const
virtual const char * GetName() const
Returns name of object.
Bool_t remove(TObject *arg, TObject *hashArg=0)
Remove given object from table.
ULong_t Hash(const void *txt, Int_t ntxt)
Calculates hash index from any char string.
virtual ~RooHashTable()
Destructor.
Long_t NextPrime(Long_t x)
TMath Base functions.
RooFIter fwdIterator() const
TObject * find(const char *name) const
Return pointer to object with given name in collection.
Mother of all ROOT objects.
Short_t Max(Short_t a, Short_t b)
RooAbsArg * findArg(const RooAbsArg *arg) const
RooSetPair * findSetPair(const RooArgSet *set1, const RooArgSet *set2) const
Return RooSetPair with given pointers in table.
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
RooLinkedListElem * findLinkTo(const TObject *arg) const
Return RooLinkedList element link to object 'hashArg'.
ULong_t hash(const TObject *arg) const