AliRoot Core  edcc906 (edcc906)
AliMUONDigitStoreV1.h
Go to the documentation of this file.
1 #ifndef ALIMUONDIGITSTOREV1_H
2 #define ALIMUONDIGITSTOREV1_H
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 
13 // Author Laurent Aphecetche
14 
15 #ifndef ALIMUONVDIGITSTORE_H
16 # include "AliMUONVDigitStore.h"
17 #endif
18 
19 class TObjArray;
20 class TClonesArray;
21 
23 {
24 public:
26  AliMUONDigitStoreV1(TRootIOCtor* dummy);
29  virtual ~AliMUONDigitStoreV1();
30 
31  virtual void Clear(Option_t* opt="");
32 
34  virtual Bool_t CanConnect() const { return kTRUE; }
35 
36  // Below are our specific methods
37 
38  virtual AliMUONVDigitStore* Create() const { return new AliMUONDigitStoreV1; }
39 
40  virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const;
41 
42  virtual AliMUONVDigit* CreateDigit(Int_t detElemId, Int_t manuId,
43  Int_t manuChannel, Int_t cathode) const;
44 
46 
47  virtual AliMUONVDigit* Add(const AliMUONVDigit& digit, EReplacePolicy replace=kDeny);
48 
49  virtual TIterator* CreateIterator() const;
50 
51  virtual TIterator* CreateTrackerIterator() const;
52 
53  virtual TIterator* CreateTriggerIterator() const;
54 
55  virtual TIterator* CreateIterator(Int_t firstDetElemId,
56  Int_t lastDetElemId,
57  Int_t cathode=2) const;
58 
60 
61  virtual AliMUONVDigit* FindObject(Int_t detElemId, Int_t manuId,
62  Int_t manuChannel, Int_t cathode) const;
63 
65 
66  virtual Int_t GetSize() const;
67 
68  virtual AliMUONVDigit* Remove(AliMUONVDigit& digit);
69 
70  Bool_t HasMCInformation() const;
71 
72 private:
73 
74  TObject** ChamberDigitsPtr(Int_t chamberId) const;
75 
76  TClonesArray* ChamberDigits(Int_t chamberId);
77  const TClonesArray* ChamberDigits(Int_t chamberId) const;
78 
79  AliMUONVDigit* Find(const AliMUONVDigit& digit, Int_t& index) const;
80 
81  AliMUONVDigit* FindIndex(Int_t detElemId, Int_t manuId,
82  Int_t manuChannel, Int_t cathode, Int_t& index) const;
83 
84 private:
86  TClonesArray* fChamberDigits;
87 
88  ClassDef(AliMUONDigitStoreV1,1) // (Legacy) Implementation of AliMUONVDigitStore
89 };
90 
91 #endif
virtual Bool_t CanConnect() const
Whether the Connect(TTree&) method is implemented.
virtual Bool_t Connect(TTree &tree, Bool_t alone=kTRUE) const
Connect us to a TTree (only valid if CanConnect()==kTRUE)
Interface for a digit container.
#define TObjArray
virtual AliMUONVDigit * FindObject(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const
Find a digit by the quadruplet (de,manu,channel,cathode)
AliMUONVDigit * FindIndex(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode, Int_t &index) const
virtual TIterator * CreateTriggerIterator() const
Create an iterator to loop over trigger digits only.
TObject ** ChamberDigitsPtr(Int_t chamberId) const
TObjArray * fDigits
array of tclonesarray
TClonesArray * ChamberDigits(Int_t chamberId)
TTree * tree
(Legacy) implementation of AliMUONVDigitStore
virtual Int_t GetSize() const =0
Number of digits we store.
Bool_t HasMCInformation() const
Whether we have any MC related information (e.g. at least one simulated digit)
virtual AliMUONVDigit * Remove(AliMUONVDigit &digit)
Remove an element.
virtual Int_t GetSize() const
Number of digits we store.
virtual TIterator * CreateIterator() const
Create an iterator to loop over all our digits.
virtual void Clear(Option_t *opt="")
Clear ourselves (i.e. Reset)
AliMUONDigitStoreV1 & operator=(const AliMUONDigitStoreV1 &rhs)
virtual TIterator * CreateTrackerIterator() const
Create an iterator to loop over tracker digits only.
TClonesArray * fChamberDigits
array of digits for one chamber
virtual AliMUONVDigit * Add(const AliMUONVDigit &digit, EReplacePolicy replace=kDeny)
virtual AliMUONVDigitStore * Create() const
Create an (empty) object of the same concrete class as *this.
ABC of a MUON digit.
Definition: AliMUONVDigit.h:18
virtual AliMUONVDigit * CreateDigit(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t cathode) const
Create a digit.
AliMUONVDigit * Find(const AliMUONVDigit &digit, Int_t &index) const
virtual AliMUONVDigit * FindObject(const TObject *object) const
Find an object (default is to forward to FindObject(object->GetUniqueID())
EReplacePolicy
Replacement policy : what to do when adding a digit to the store.
virtual Bool_t Add(TObject *object)
Add an object, if it is of the right class.