1 #ifndef ALI_MUON_DATA_INTERFACE_H
2 #define ALI_MUON_DATA_INTERFACE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 // Includes revised 07/05/2004
9 /// \ingroup evaluation
10 /// \class AliMUONDataInterface
11 /// \brief An easy to use interface to MUON data
13 // Author: Artur Szostak
14 // email: artur@alice.phy.uct.ac.za
16 // Updated to MUON module w/o MUONData by Laurent Aphecetche, Subatech
21 class AliMUONDataManager;
22 class AliMUONVDigitStore;
23 class AliMUONVTriggerStore;
24 class AliMUONVTriggerTrackStore;
25 class AliMUONVClusterStore;
26 class AliMUONVTrackStore;
28 // >>LA should not needed (once we remove deprecated methods)
31 class AliMUONLocalTrigger;
32 class AliMUONGlobalTrigger;
33 class AliMUONRawCluster;
39 class AliMUONDataInterface : public TObject
43 AliMUONDataInterface(const char* filename="galice.root");
44 virtual ~AliMUONDataInterface();
46 Bool_t IsValid() const;
48 AliMUONVClusterStore* ClusterStore(Int_t event) const;
49 void DumpRecPoints(Int_t event, Bool_t sorted=kFALSE) const;
51 /** Return the digit store for one event. The returned pointer should be
52 deleted by the client.
54 AliMUONVDigitStore* DigitStore(Int_t event) const;
55 void DumpDigits(Int_t event, Bool_t sorted=kFALSE) const;
56 TList* DigitStoreAsList(Int_t event) const;
58 Int_t NumberOfEvents() const;
60 AliMUONVDigitStore* SDigitStore(Int_t event) const;
61 void DumpSDigits(Int_t event, Bool_t sorted=kFALSE) const;
63 AliMUONVTrackStore* TrackStore(Int_t event) const;
64 void DumpTracks(Int_t event, Bool_t sorted=kFALSE) const;
66 /// Get the triggerStore from the given tree (can be "D" or "R").
67 AliMUONVTriggerStore* TriggerStore(Int_t event, const char* treeLetter) const;
68 void DumpTrigger(Int_t event, const char* treeLetter="R") const;
70 AliMUONVTriggerTrackStore* TriggerTrackStore(Int_t event) const;
71 void DumpTriggerTracks(Int_t event, Bool_t sorted=kFALSE) const;
73 // all the methods below are deprecated.
75 // Sets all internal pointers to NULL without releasing the current runloader.
78 Bool_t UseCurrentRunLoader();
80 Int_t NumberOfEvents(TString filename, TString foldername);
82 Int_t NumberOfParticles(TString filename, TString foldername, Int_t event);
83 TParticle* Particle(TString filename, TString foldername, Int_t event, Int_t particle);
85 Int_t NumberOfTracks(TString filename, TString foldername, Int_t event);
86 Int_t NumberOfHits(TString filename, TString foldername, Int_t event, Int_t track);
87 AliMUONHit* Hit(TString filename, TString foldername, Int_t event, Int_t track, Int_t hit);
89 Int_t NumberOfSDigits(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode);
90 AliMUONDigit* SDigit(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode, Int_t sdigit);
92 Int_t NumberOfDigits(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode);
93 AliMUONDigit* Digit(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode, Int_t digit);
95 Int_t NumberOfRawClusters(TString filename, TString foldername, Int_t event, Int_t chamber);
96 AliMUONRawCluster* RawCluster(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cluster);
98 Int_t NumberOfLocalTriggers(TString filename, TString foldername, Int_t event);
99 AliMUONLocalTrigger* LocalTrigger(TString filename, TString foldername, Int_t event, Int_t trigger);
101 Bool_t SetFile(TString filename = "galice.root", TString foldername = "MUONFolder");
102 Bool_t GetEvent(Int_t event = 0);
104 Int_t NumberOfParticles();
105 TParticle* Particle(Int_t particle);
107 Int_t NumberOfTracks();
108 Int_t NumberOfHits(Int_t track);
109 AliMUONHit* Hit(Int_t track, Int_t hit);
111 Int_t NumberOfSDigits(Int_t chamber, Int_t cathode);
112 AliMUONDigit* SDigit(Int_t chamber, Int_t cathode, Int_t sdigit);
114 Int_t NumberOfDigits(Int_t chamber, Int_t cathode);
115 AliMUONDigit* Digit(Int_t chamber, Int_t cathode, Int_t digit);
117 Int_t NumberOfRawClusters(Int_t chamber);
118 AliMUONRawCluster* RawCluster(Int_t chamber, Int_t cluster);
120 Int_t NumberOfLocalTriggers();
121 AliMUONLocalTrigger* LocalTrigger(Int_t trigger);
123 Int_t NumberOfGlobalTriggers();
124 AliMUONGlobalTrigger* GlobalTrigger(Int_t trigger);
125 // Returns the name of the currently selected file.
127 Int_t NumberOfRecTracks();
128 AliMUONTrack* RecTrack(Int_t rectrack);
130 /// Returns the file name from which we are fetching data
131 TString CurrentFile() const { return ""; }
133 /// Returns the name of the currently selected folder.
134 TString CurrentFolder() const { return ""; }
136 /// Returns the number of the currently selected event.
137 Int_t CurrentEvent() const { return 0; }
139 /// Returns the currently selected track.
140 Int_t CurrentTrack() const { return 0; }
142 /// Returns the currently selected cathode in TreeS.
143 Int_t CurrentSCathode() const { return 0; }
145 /// Returns the currently selected cathode in TreeD.
146 Int_t CurrentDCathode() const { return 0; }
150 void DumpIt(const char* treeLetter, const char* what, Int_t event, Bool_t sorted) const;
153 AliMUONDataInterface(const AliMUONDataInterface& rhs);
155 AliMUONDataInterface& operator=(const AliMUONDataInterface& rhs);
157 AliMUONDataManager* fDataManager; //!< Internal data accessor
159 ClassDef(AliMUONDataInterface, 0) // An easy to use interface to MUON data
163 #endif // ALI_MUON_DATA_INTERFACE_H