1 #ifndef ALIMUONCLUSTERSTOREV2_H
2 #define ALIMUONCLUSTERSTOREV2_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONClusterStoreV2
11 /// \brief Implementation of VClusterStore
13 // Author Philippe Pillot, Subatech
15 #ifndef ALIMUONVCLUSTERSTORE_H
16 # include "AliMUONVClusterStore.h"
19 #include "AliMUONVCluster.h"
20 #include <TClonesArray.h>
22 class AliMUONClusterStoreV2 : public AliMUONVClusterStore
24 friend class AliMUONClusterStoreV2Iterator;
27 AliMUONClusterStoreV2();
28 AliMUONClusterStoreV2(TRootIOCtor* dummy);
29 AliMUONClusterStoreV2(const AliMUONClusterStoreV2& store);
30 AliMUONClusterStoreV2& operator=(const AliMUONClusterStoreV2& store);
31 virtual ~AliMUONClusterStoreV2();
33 virtual void Clear(Option_t* opt="");
35 /// Whether the Connect(TTree&) method is implemented
36 virtual Bool_t CanConnect() const { return kTRUE; }
37 virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const;
39 /// Create an empty copy of this
40 virtual AliMUONClusterStoreV2* Create() const { return new AliMUONClusterStoreV2; }
42 virtual AliMUONVCluster* CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const;
44 using AliMUONVClusterStore::Add;
46 virtual AliMUONVCluster* Add(const AliMUONVCluster& Cluster);
47 virtual AliMUONVCluster* Add(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
49 virtual AliMUONVCluster* Remove(AliMUONVCluster& cluster);
51 using AliMUONVClusterStore::GetSize;
53 /// Return the number of clusters we hold
54 virtual Int_t GetSize() const {return fClusters->GetLast()+1;}
56 using AliMUONVStore::FindObject;
58 AliMUONVCluster* FindObject(const TObject* object) const;
59 AliMUONVCluster* FindObject(UInt_t uniqueID) const;
61 virtual TIterator* CreateIterator() const;
62 virtual TIterator* CreateChamberIterator(Int_t firstChamberId, Int_t lastChamberId) const;
66 void UpdateMap(AliMUONVCluster& cluster);
69 TClonesArray* fClusters; ///< collection of clusters
70 TClonesArray* fMap; //!< index map for fast cluster retrieval
71 Bool_t fMapped; //!< whether our internal indices are uptodate
73 ClassDef(AliMUONClusterStoreV2,1) // Implementation of VClusterStore