1 #ifndef ALIMUONDIGITSTOREVIMPL_H
2 #define ALIMUONDIGITSTOREVIMPL_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONDigitStoreVImpl
11 /// \brief Base implementation of VDigitStore
13 // author Laurent Aphecetche
15 #ifndef ALIMUONVDIGITSTORE_H
16 # include "AliMUONVDigitStore.h"
22 class AliMUONDigitStoreVImpl : public AliMUONVDigitStore
24 friend class AliMUONDigitStoreVImplIterator;
27 AliMUONDigitStoreVImpl(const char* concreteClassName);
28 AliMUONDigitStoreVImpl(const AliMUONDigitStoreVImpl& rhs);
29 AliMUONDigitStoreVImpl& operator=(const AliMUONDigitStoreVImpl& rhs);
30 virtual ~AliMUONDigitStoreVImpl();
32 /// Whether we can be connected to a TTree
33 virtual Bool_t CanConnect() const { return kTRUE; }
35 virtual Bool_t Connect(TTree& tree, Bool_t alone = kTRUE) const;
37 virtual void Clear(Option_t* opt="");
39 virtual AliMUONVDigit* CreateDigit(Int_t detElemId, Int_t manuId,
40 Int_t manuChannel, Int_t cathode) const = 0;
42 using AliMUONVDigitStore::Add;
44 virtual AliMUONVDigit* Add(const AliMUONVDigit& digit, EReplacePolicy replace);
46 virtual TIterator* CreateIterator() const;
48 virtual TIterator* CreateIterator(Int_t firstDetElemId,
50 Int_t cathode=2) const;
52 virtual TIterator* CreateTrackerIterator() const;
54 virtual TIterator* CreateTriggerIterator() const;
56 using AliMUONVStore::FindObject;
58 virtual AliMUONVDigit* FindObject(UInt_t uniqueID) const;
60 virtual AliMUONVDigit* FindObject(Int_t detElemId, Int_t manuId,
61 Int_t manuChannel, Int_t cathode) const;
63 using AliMUONVDigitStore::GetSize;
65 virtual Int_t GetSize() const;
67 virtual AliMUONVDigit* Remove(AliMUONVDigit& digit);
70 /// Add concrete digit
71 virtual AliMUONVDigit* AddConcreteDigit(TClonesArray& a,
72 const AliMUONVDigit& digit,
77 AliMUONVDigit* Find(const AliMUONVDigit& digit) const;
79 void UpdateIndex(const AliMUONVDigit& digit, Int_t index);
81 Int_t FindIndex(const AliMUONVDigit& digit) const;
82 Int_t FindIndex(Int_t detElemId, Int_t internalManuId, Int_t manuChannel) const;
88 TClonesArray* fDigits; ///< collection of digits
89 AliMUON2DMap* fMap; //!< index map for fast digit retrieval
90 Bool_t fIndexed; //!< whether our internal indices fDEs and fManus are uptodate
92 ClassDef(AliMUONDigitStoreVImpl,1) // Implementation of AliMUONVDigitStore