]>
Commit | Line | Data |
---|---|---|
7d5d0cc5 | 1 | #ifndef ALIMUONCLUSTERSTOREV2_H |
2 | #define ALIMUONCLUSTERSTOREV2_H | |
2060b217 | 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 | ||
9 | /// \ingroup rec | |
10 | /// \class AliMUONClusterStoreV2 | |
11 | /// \brief Implementation of VClusterStore | |
12 | /// | |
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 | ||
22 | class AliMUONClusterStoreV2 : public AliMUONVClusterStore | |
23 | { | |
24 | friend class AliMUONClusterStoreV2Iterator; | |
25 | ||
26 | public: | |
27 | AliMUONClusterStoreV2(); | |
28 | AliMUONClusterStoreV2(const AliMUONClusterStoreV2& store); | |
29 | AliMUONClusterStoreV2& operator=(const AliMUONClusterStoreV2& store); | |
30 | virtual ~AliMUONClusterStoreV2(); | |
31 | ||
32 | virtual void Clear(Option_t* opt=""); | |
33 | ||
34 | /// Whether the Connect(TTree&) method is implemented | |
35 | virtual Bool_t CanConnect() const { return kTRUE; } | |
36 | virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const; | |
37 | ||
38 | /// Create an empty copy of this | |
39 | virtual AliMUONClusterStoreV2* Create() const { return new AliMUONClusterStoreV2; } | |
40 | ||
41 | virtual AliMUONVCluster* CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const; | |
42 | ||
43 | using AliMUONVClusterStore::Add; | |
44 | ||
7332f213 | 45 | virtual AliMUONVCluster* Add(const AliMUONVCluster& Cluster); |
2060b217 | 46 | virtual AliMUONVCluster* Add(Int_t chamberId, Int_t detElemId, Int_t clusterIndex); |
47 | ||
48 | virtual AliMUONVCluster* Remove(AliMUONVCluster& cluster); | |
49 | ||
50 | using AliMUONVClusterStore::GetSize; | |
51 | ||
52 | /// Return the number of clusters we hold | |
53 | virtual Int_t GetSize() const {return fClusters->GetLast()+1;} | |
54 | ||
55 | using AliMUONVStore::FindObject; | |
56 | ||
57 | AliMUONVCluster* FindObject(const TObject* object) const; | |
58 | AliMUONVCluster* FindObject(UInt_t uniqueID) const; | |
59 | ||
60 | virtual TIterator* CreateIterator() const; | |
61 | virtual TIterator* CreateChamberIterator(Int_t firstChamberId, Int_t lastChamberId) const; | |
62 | ||
63 | private: | |
64 | void ReMap(); | |
65 | void UpdateMap(AliMUONVCluster& cluster); | |
66 | ||
67 | private: | |
68 | TClonesArray* fClusters; ///< collection of clusters | |
69 | TClonesArray* fMap; //!< index map for fast cluster retrieval | |
70 | Bool_t fMapped; //!< whether our internal indices are uptodate | |
71 | ||
72 | ClassDef(AliMUONClusterStoreV2,1) // Implementation of VClusterStore | |
73 | }; | |
74 | ||
75 | #endif |