39 #include <TClonesArray.h>
40 #include <TObjArray.h>
53 fClusters->SetOwner(kTRUE);
54 for ( Int_t i = 0; i < fClusters->GetSize(); ++i )
56 TClonesArray* tca =
new TClonesArray(
"AliMUONRawCluster",100);
57 fClusters->AddAt(tca,i);
68 AliError(
"Please implement me");
76 AliError(
"Please implement me");
106 AliError(Form(
"Cluster is not of the expected type (%s vs AliMUONRawCluster)",
107 vCluster.ClassName()));
126 if (!array)
return 0x0;
138 TClonesArray*
array =
static_cast<TClonesArray*
>(
fClusters->At(chamberId));
141 AliError(Form(
"Cannot get Clusters for chamberId=%d",chamberId));
152 TClonesArray*
array =
static_cast<TClonesArray*
>(
fClusters->At(chamberId));
155 AliError(Form(
"Cannot get Clusters for chamberId=%d",chamberId));
170 TBranch* b = tree.GetBranch(
"MUONRawClusters1");
172 Bool_t isMaking = (b == 0);
178 TString branchName(Form(
"MUONRawClusters%d",i+1));
179 ok = ok && tman.
MakeBranch(tree,ClassName(),
"TClonesArray",
189 TString branchName(Form(
"MUONRawClusters%d",i+1));
190 ok = ok && tman.
SetAddress(tree,branchName.Data(),
204 TObject* o = array->Remove(&cluster);
219 for ( Int_t i = 0; i <
fClusters->GetSize(); ++i )
247 for ( Int_t i = 0; i <
fClusters->GetSize(); ++i )
Iterator on a store composed of a TObjArray of TClonesArrays.
Bool_t SetAddress(TTree &tree, const char *branchName, void *address) const
TObjArray * fClusters
! Array of TClonesArray of VClusters
TObject ** ChamberClustersPtr(Int_t chamberId) const
Helper class to ease TTree (MUON) branches manipulations.
virtual AliMUONVCluster * Add(const AliMUONVCluster &Cluster)
Add a cluster object to the store.
virtual TIterator * CreateIterator() const
Return an iterator to loop over the whole store.
static Int_t GetChamberId(Int_t detElemId, Bool_t warn=true)
abstract base class for clusters
virtual Int_t GetDetElemId() const
Return detection element Id.
virtual ~AliMUONClusterStoreV1()
Implementation of VClusterStore.
virtual Bool_t Connect(TTree &tree, Bool_t alone=kTRUE) const
Connect us to a TTree (only valid if CanConnect()==kTRUE)
virtual void Clear(Option_t *opt="")
Clear container.
Interface of a cluster container.
virtual TIterator * CreateChamberIterator(Int_t firstChamberId, Int_t lastChamberId) const
Return an iterator to loop over the store in the given chamber range.
void UpdateBranchStatuses(TTree &tree, const char *pattern) const
virtual AliMUONVCluster * Remove(AliMUONVCluster &cluster)
Remove a cluster object to the store.
virtual AliMUONVCluster * CreateCluster(Int_t, Int_t detElemId, Int_t) const
Create a cluster.
virtual Int_t GetSize() const
The number of objects stored.
static Int_t GetDetElemId(UInt_t uniqueID)
Return detection element id, part of the uniqueID.
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
Globally used constants definition.
AliMUONClusterStoreV1 & operator=(const AliMUONClusterStoreV1 &rhs)
static Int_t NofTrackingChambers()
Return number of tracking chambers.
TClonesArray * ChamberClusters(Int_t chamberId) const