KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVHashList.h
Go to the documentation of this file.
1 
4 #ifndef __KVHASHLIST_H
5 #define __KVHASHLIST_H
6 
7 #include "KVSeqCollection.h"
8 #include "THashList.h"
9 #include "RVersion.h"
10 
28 class KVHashList : public KVSeqCollection {
29 
30 public:
32  virtual ~KVHashList();
33 
34  Float_t AverageCollisions() const;
35  void Rehash(Int_t newCapacity = 0);
36 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,5,0)
37  const TList* GetListForObject(const char* name) const;
38  const TList* GetListForObject(const TObject* obj) const;
39 #else
40  TList* GetListForObject(const char* name) const;
41  TList* GetListForObject(const TObject* obj) const;
42 #endif
43  void Sort(Bool_t order = kSortAscending)
44  {
45  ((THashList*)fCollection)->Sort(order);
46  };
47  template<typename T> Bool_t ContainsObjectWithName(const T& o)
48  {
51  return Contains(o.GetName());
52  }
53 
54  ClassDef(KVHashList, 1) //Extended version of ROOT THashList
55 };
56 
57 #endif
int Int_t
bool Bool_t
float Float_t
#define ClassDef(name, id)
Extended version of ROOT THashList.
Definition: KVHashList.h:28
Bool_t ContainsObjectWithName(const T &o)
Definition: KVHashList.h:47
void Sort(Bool_t order=kSortAscending)
Definition: KVHashList.h:43
Float_t AverageCollisions() const
Definition: KVHashList.cpp:64
KVHashList(Int_t capacity=TCollection::kInitHashTableCapacity, Int_t rehash=2)
Definition: KVHashList.cpp:26
virtual ~KVHashList()
Destructor.
Definition: KVHashList.cpp:52
void Rehash(Int_t newCapacity=0)
Definition: KVHashList.cpp:92
const TList * GetListForObject(const char *name) const
Definition: KVHashList.cpp:121
KaliVeda extensions to ROOT collection classes.
TSeqCollection * fCollection
Pointer to embedded ROOT collection.
Bool_t Contains(const char *name) const