AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONClusterStoreV2.h
Go to the documentation of this file.
1 #ifndef ALIMUONCLUSTERSTOREV2_H
2 #define ALIMUONCLUSTERSTOREV2_H
3 
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6 
7 // $Id$
8 
13 // Author Philippe Pillot, Subatech
14 
15 #ifndef ALIMUONVCLUSTERSTORE_H
16 # include "AliMUONVClusterStore.h"
17 #endif
18 
19 #include "AliMUONVCluster.h"
20 #include <TClonesArray.h>
21 
23 {
25 
26 public:
28  AliMUONClusterStoreV2(TRootIOCtor* dummy);
31  virtual ~AliMUONClusterStoreV2();
32 
33  virtual void Clear(Option_t* opt="");
34 
36  virtual Bool_t CanConnect() const { return kTRUE; }
37  virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const;
38 
40  virtual AliMUONClusterStoreV2* Create() const { return new AliMUONClusterStoreV2; }
41 
42  virtual AliMUONVCluster* CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const;
43 
45 
46  virtual AliMUONVCluster* Add(const AliMUONVCluster& Cluster);
47  virtual AliMUONVCluster* Add(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
48 
49  virtual AliMUONVCluster* Remove(AliMUONVCluster& cluster);
50 
52 
54  virtual Int_t GetSize() const {return fClusters->GetLast()+1;}
55 
57 
58  AliMUONVCluster* FindObject(const TObject* object) const;
59  AliMUONVCluster* FindObject(UInt_t uniqueID) const;
60 
61  virtual TIterator* CreateIterator() const;
62  virtual TIterator* CreateChamberIterator(Int_t firstChamberId, Int_t lastChamberId) const;
63 
64 private:
65  void ReMap();
66  void UpdateMap(AliMUONVCluster& cluster);
67 
68 private:
69  TClonesArray* fClusters;
70  TClonesArray* fMap;
71  Bool_t fMapped;
72 
73  ClassDef(AliMUONClusterStoreV2,1) // Implementation of VClusterStore
74 };
75 
76 #endif
AliMUONVCluster * FindObject(const TObject *object) const
Find an object.
virtual Int_t GetSize() const
Return the number of clusters we hold.
virtual TIterator * CreateChamberIterator(Int_t firstChamberId, Int_t lastChamberId) const
Return an iterator to loop over the store in the given chamber range.
void UpdateMap(AliMUONVCluster &cluster)
virtual Int_t GetSize() const =0
The number of objects stored.
Implementation of VClusterStore.
TTree * tree
virtual TIterator * CreateIterator() const
Return an iterator to loop over the whole store.
TClonesArray * fClusters
collection of clusters
virtual Bool_t Add(TObject *object)
Add an object to the store.
abstract base class for clusters
virtual AliMUONVCluster * Remove(AliMUONVCluster &cluster)
Remove a cluster object to the store.
Interface of a cluster container.
virtual AliMUONVCluster * Add(const AliMUONVCluster &Cluster)
Add a cluster object to the store.
TClonesArray * fMap
! index map for fast cluster retrieval
virtual void Clear(Option_t *opt="")
Clear container.
virtual AliMUONVCluster * CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const
Create a cluster.
AliMUONClusterStoreV2 & operator=(const AliMUONClusterStoreV2 &store)
virtual Bool_t CanConnect() const
Whether the Connect(TTree&) method is implemented.
virtual Bool_t Connect(TTree &tree, Bool_t alone=kTRUE) const
Connect us to a TTree (only valid if CanConnect()==kTRUE)
Bool_t fMapped
! whether our internal indices are uptodate
virtual AliMUONClusterStoreV2 * Create() const
Create an empty copy of this.
Base implementation of TIterator for AliMUONClusterStoreV2.
virtual TObject * FindObject(const char *name) const
Find an object by name.