49 #include <TClonesArray.h>
52 #include <Riostream.h>
60 TString BaseName(
const TString& name)
63 if ( name ==
"TreeS" )
return "MUONSDigit";
64 if ( name ==
"TreeD" )
return "MUONDigit";
68 Int_t InternalManuId(Int_t cathode, Int_t manuId)
76 return manuId | ( cathode << 15 );
84 fDigits(new TClonesArray(concreteClassName,100)),
99 AliError(
"Please implement me");
107 AliError(
"Please implement me");
126 TString branchName(BaseName(tree.GetName()));
131 if (tree.GetBranch(branchName.Data()))
135 const_cast<TClonesArray**
>(&
fDigits));
139 ok = tman.
MakeBranch(tree,ClassName(),
"TClonesArray",branchName.Data(),
140 const_cast<TClonesArray**
>(&
fDigits));
189 if ( replace ==
kDeny )
return 0x0;
199 Int_t n =
fDigits->GetLast()+1;
216 return fDigits->MakeIterator();
280 while ( ( d = static_cast<AliMUONVDigit*>(next()) ) )
295 Int_t manuId = InternalManuId(digit.
Cathode(),digit.
ManuId());
313 Int_t manuChannel)
const
360 Int_t index =
FindIndex(detElemId,InternalManuId(cathode,manuId),manuChannel);
Bool_t fIndexed
! whether our internal indices fDEs and fManus are uptodate
virtual Int_t ManuChannel() const =0
The channel within ManuId() this digit belongs to (manuChannel for tracker, localBoardChannel for tri...
Bool_t SetAddress(TTree &tree, const char *branchName, void *address) const
virtual Int_t GetSize() const
Number of digits we store.
Interface for a digit container.
virtual TIterator * CreateTriggerIterator() const
Create an iterator to loop over trigger digits only.
virtual void Clear(Option_t *opt="")
Clear ourselves (i.e. Reset)
virtual ~AliMUONDigitStoreVImpl()
AliMUONDigitStoreVImpl & operator=(const AliMUONDigitStoreVImpl &rhs)
Base implementation of VDigitStore.
virtual AliMUONVDigit * AddConcreteDigit(TClonesArray &a, const AliMUONVDigit &digit, Int_t index)=0
Add concrete digit.
virtual Int_t DetElemId() const =0
The detection element this digit belongs to.
Helper class to ease TTree (MUON) branches manipulations.
AliMUON2DMap * fMap
! index map for fast digit retrieval
virtual Bool_t Connect(TTree &tree, Bool_t alone=kTRUE) const
Connect us to a TTree (only valid if CanConnect()==kTRUE)
virtual AliMUONVDigit * Add(const AliMUONVDigit &digit, EReplacePolicy replace)
Container of calibration values for a given number of channels.
AliMUONVDigit * Find(const AliMUONVDigit &digit) const
virtual TObject * FindObject(Int_t i, Int_t j) const
Find an object using 2 ids.
Implementation of AliMUONVCalibParam for tuples of ints.
void UpdateIndex(const AliMUONVDigit &digit, Int_t index)
TClonesArray * fDigits
collection of digits
virtual Int_t Cathode() const =0
Cathode number this digit is on (0 or 1)
virtual TIterator * CreateTrackerIterator() const
Create an iterator to loop over tracker digits only.
virtual TIterator * CreateIterator() const
Create an iterator to loop over all our digits.
Int_t FindIndex(const AliMUONVDigit &digit) const
virtual Int_t ValueAsInt(Int_t i, Int_t j=0) const =0
Basic implementation of AliMUONVStore container using AliMpExMap internally.
virtual Bool_t Add(TObject *object)
Add an object to the store.
void UpdateBranchStatuses(TTree &tree, const char *pattern) const
friend class AliMUONDigitStoreVImplIterator
virtual AliMUONVDigit * Remove(AliMUONVDigit &digit)
Remove an element.
virtual AliMUONVDigit * FindObject(UInt_t uniqueID) const
Find an object by its uniqueID.
virtual Int_t ManuId() const =0
The electronic card id this digit belongs to (manuId for tracker, localboardId for trigger) ...
AliMUONDigitStoreVImpl(const char *concreteClassName)
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
EReplacePolicy
Replacement policy : what to do when adding a digit to the store.
virtual void Clear(Option_t *opt="")
Mandatory methods from TCollection.
virtual Bool_t MergeWith(const AliMUONVDigit &other)=0
Merge this with other.