]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONClusterStoreV2.h
#101318: Patch for various problems in AliROOT
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterStoreV2.h
CommitLineData
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
22class AliMUONClusterStoreV2 : public AliMUONVClusterStore
23{
24 friend class AliMUONClusterStoreV2Iterator;
25
26public:
27 AliMUONClusterStoreV2();
ce350193 28 AliMUONClusterStoreV2(TRootIOCtor* dummy);
2060b217 29 AliMUONClusterStoreV2(const AliMUONClusterStoreV2& store);
30 AliMUONClusterStoreV2& operator=(const AliMUONClusterStoreV2& store);
31 virtual ~AliMUONClusterStoreV2();
32
33 virtual void Clear(Option_t* opt="");
34
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;
38
39 /// Create an empty copy of this
40 virtual AliMUONClusterStoreV2* Create() const { return new AliMUONClusterStoreV2; }
41
42 virtual AliMUONVCluster* CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const;
43
44 using AliMUONVClusterStore::Add;
45
7332f213 46 virtual AliMUONVCluster* Add(const AliMUONVCluster& Cluster);
2060b217 47 virtual AliMUONVCluster* Add(Int_t chamberId, Int_t detElemId, Int_t clusterIndex);
48
49 virtual AliMUONVCluster* Remove(AliMUONVCluster& cluster);
50
51 using AliMUONVClusterStore::GetSize;
52
53 /// Return the number of clusters we hold
54 virtual Int_t GetSize() const {return fClusters->GetLast()+1;}
55
56 using AliMUONVStore::FindObject;
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
64private:
65 void ReMap();
66 void UpdateMap(AliMUONVCluster& cluster);
67
68private:
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
72
73 ClassDef(AliMUONClusterStoreV2,1) // Implementation of VClusterStore
74};
75
76#endif