41 #include <Riostream.h>
60 fClusters(new TClonesArray(
"AliMUONRawClusterV2",100)),
70 fClusters(new TClonesArray(*(store.fClusters))),
109 for (Int_t chamber=0; chamber<nChamber; chamber++) {
125 if (tree.GetBranch(
"MUONRawClusters")) {
129 return tman.
SetAddress(tree,
"MUONRawClusters",
133 return tman.
MakeBranch(tree,ClassName(),
"TClonesArray",
"MUONRawClusters",
153 AliError(Form(
"Cluster is not of the expected type (%s vs AliMUONRawClusterV2)",
154 vCluster.ClassName()));
168 AliError(
"cluster store already contains a cluster with the same ID --> add() exited:");
195 AliError(
"cluster store already contains a cluster with the same ID --> add() exited:");
221 AliError(
"Could not remove cluster from array");
237 fMap =
new TClonesArray(
"AliMpExMap",nChamber);
241 for (Int_t chamber=0; chamber<nChamber; chamber++) {
247 for (Int_t chamber=0; chamber<nChamber; chamber++) {
256 while ( (cluster = static_cast<AliMUONVCluster*>(next())) )
UpdateMap(*cluster);
272 if (cluster)
return FindObject(cluster->GetUniqueID());
AliMUONVCluster * FindObject(const TObject *object) const
Find an object.
Bool_t SetAddress(TTree &tree, const char *branchName, void *address) const
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)
static UInt_t BuildUniqueID(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
Build a single integer with id information.
friend class AliMUONClusterStoreV2Iterator
virtual Int_t GetChamberId() const =0
Return chamber Id.
Implementation of VClusterStore.
Helper class to ease TTree (MUON) branches manipulations.
virtual TIterator * CreateIterator() const
Return an iterator to loop over the whole store.
TClonesArray * fClusters
collection of clusters
virtual void Print(Option_t *option="") const
abstract base class for clusters
virtual AliMUONVCluster * Remove(AliMUONVCluster &cluster)
Remove a cluster object to the store.
Interface of a cluster container.
TObject * GetValue(Int_t keyFirst, Int_t keySecond) const
virtual AliMUONVCluster * Add(const AliMUONVCluster &Cluster)
Add a cluster object to the store.
void Add(Int_t keyFirst, Int_t keySecond, TObject *object)
TClonesArray * fMap
! index map for fast cluster retrieval
virtual ~AliMUONClusterStoreV2()
void SetOwner(Bool_t owner)
static Int_t GetChamberId(UInt_t uniqueID)
Return chamber id (0..), part of the uniqueID.
virtual void Clear(Option_t *opt="")
Clear container.
virtual AliMUONVCluster * CreateCluster(Int_t chamberId, Int_t detElemId, Int_t clusterIndex) const
Create a cluster.
void UpdateBranchStatuses(TTree &tree, const char *pattern) const
AliMUONClusterStoreV2 & operator=(const AliMUONClusterStoreV2 &store)
virtual Bool_t Connect(TTree &tree, Bool_t alone=kTRUE) const
Connect us to a TTree (only valid if CanConnect()==kTRUE)
Bool_t MakeBranch(TTree &tree, const char *storeClassName, const char *branchClassName, const char *branchName, void *address, Int_t bufferSize=4000, Int_t splitLevel=99) const
Bool_t fMapped
! whether our internal indices are uptodate
virtual void Clear(Option_t *opt="")
static Int_t NofTrackingChambers()
Return number of tracking chambers.
Helper class making Root persistent TExMap.
virtual Int_t GetChamberId() const
Return chamber Id.