KaliVeda
Toolkit for HIC analysis
KVHashList.h
1 
4 #ifndef __KVHASHLIST_H
5 #define __KVHASHLIST_H
6 
7 #include "KVSeqCollection.h"
8 #include "THashList.h"
9 #include "RVersion.h"
10 
29 class KVHashList : public KVSeqCollection {
30 
31 public:
33  virtual ~KVHashList();
34 
35  Float_t AverageCollisions() const;
36  void Rehash(Int_t newCapacity = 0);
37 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,5,0)
38  const TList* GetListForObject(const char* name) const;
39  const TList* GetListForObject(const TObject* obj) const;
40 #else
41  TList* GetListForObject(const char* name) const;
42  TList* GetListForObject(const TObject* obj) const;
43 #endif
44  void Sort(Bool_t order = kSortAscending)
45  {
46  ((THashList*)fCollection)->Sort(order);
47  };
48  template<typename T> Bool_t ContainsObjectWithName(const T& o)
49  {
52  return Contains(o.GetName());
53  }
54 
55  ClassDef(KVHashList, 1) //Extended version of ROOT THashList
56 };
57 
58 #endif
int Int_t
bool Bool_t
float Float_t
#define ClassDef(name, id)
char name[80]
Extended version of ROOT THashList.
Definition: KVHashList.h:29
Bool_t ContainsObjectWithName(const T &o)
Definition: KVHashList.h:48
void Sort(Bool_t order=kSortAscending)
Definition: KVHashList.h:44
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