25-jun-2007 NvE Warning messages suppressed in the IceMakeHits processor to prevent
[u/mrichter/AliRoot.git] / MUON / AliMUONDataInterface.h
CommitLineData
37b3f607 1#ifndef ALI_MUON_DATA_INTERFACE_H
2#define ALI_MUON_DATA_INTERFACE_H
30178c30 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7// Includes revised 07/05/2004
692de412 8//
3455463a 9/// \ingroup evaluation
692de412 10/// \class AliMUONDataInterface
a202c2d2 11/// \brief An easy to use interface to MUON data
48b32e42 12
13// Author: Artur Szostak
14// email: artur@alice.phy.uct.ac.za
a202c2d2 15//
16// Updated to MUON module w/o MUONData by Laurent Aphecetche, Subatech
17//
48b32e42 18
19#include <TObject.h>
48b32e42 20
a202c2d2 21class AliMUONDataManager;
22class AliMUONVDigitStore;
23class AliMUONVTriggerStore;
24class AliMUONVTriggerTrackStore;
25class AliMUONVClusterStore;
26class AliMUONVTrackStore;
30178c30 27
a202c2d2 28// >>LA should not needed (once we remove deprecated methods)
29class AliMUONHit;
30178c30 30class AliMUONDigit;
a202c2d2 31class AliMUONLocalTrigger;
32class AliMUONGlobalTrigger;
33class AliMUONRawCluster;
554b38a6 34class AliMUONTrack;
a202c2d2 35class TParticle;
36// <<LA
37class TList;
48b32e42 38
48b32e42 39class AliMUONDataInterface : public TObject
40{
554b38a6 41 public:
42
a202c2d2 43 AliMUONDataInterface(const char* filename="galice.root");
44 virtual ~AliMUONDataInterface();
45
46 Bool_t IsValid() const;
47
48 AliMUONVClusterStore* ClusterStore(Int_t event) const;
49 void DumpRecPoints(Int_t event, Bool_t sorted=kFALSE) const;
50
51 /** Return the digit store for one event. The returned pointer should be
52 deleted by the client.
53 */
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;
57
58 Int_t NumberOfEvents() const;
59
60 AliMUONVDigitStore* SDigitStore(Int_t event) const;
61 void DumpSDigits(Int_t event, Bool_t sorted=kFALSE) const;
62
63 AliMUONVTrackStore* TrackStore(Int_t event) const;
64 void DumpTracks(Int_t event, Bool_t sorted=kFALSE) const;
65
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;
69
70 AliMUONVTriggerTrackStore* TriggerTrackStore(Int_t event) const;
71 void DumpTriggerTracks(Int_t event, Bool_t sorted=kFALSE) const;
72
73 // all the methods below are deprecated.
554b38a6 74
75 // Sets all internal pointers to NULL without releasing the current runloader.
76 void Reset();
77
78 Bool_t UseCurrentRunLoader();
79
80 Int_t NumberOfEvents(TString filename, TString foldername);
81
82 Int_t NumberOfParticles(TString filename, TString foldername, Int_t event);
83 TParticle* Particle(TString filename, TString foldername, Int_t event, Int_t particle);
84
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);
88
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);
91
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);
94
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);
97
98 Int_t NumberOfLocalTriggers(TString filename, TString foldername, Int_t event);
99 AliMUONLocalTrigger* LocalTrigger(TString filename, TString foldername, Int_t event, Int_t trigger);
100
101 Bool_t SetFile(TString filename = "galice.root", TString foldername = "MUONFolder");
102 Bool_t GetEvent(Int_t event = 0);
103
554b38a6 104 Int_t NumberOfParticles();
105 TParticle* Particle(Int_t particle);
106
107 Int_t NumberOfTracks();
108 Int_t NumberOfHits(Int_t track);
109 AliMUONHit* Hit(Int_t track, Int_t hit);
110
111 Int_t NumberOfSDigits(Int_t chamber, Int_t cathode);
112 AliMUONDigit* SDigit(Int_t chamber, Int_t cathode, Int_t sdigit);
113
114 Int_t NumberOfDigits(Int_t chamber, Int_t cathode);
115 AliMUONDigit* Digit(Int_t chamber, Int_t cathode, Int_t digit);
116
117 Int_t NumberOfRawClusters(Int_t chamber);
118 AliMUONRawCluster* RawCluster(Int_t chamber, Int_t cluster);
119
120 Int_t NumberOfLocalTriggers();
121 AliMUONLocalTrigger* LocalTrigger(Int_t trigger);
122
123 Int_t NumberOfGlobalTriggers();
124 AliMUONGlobalTrigger* GlobalTrigger(Int_t trigger);
125 // Returns the name of the currently selected file.
126
127 Int_t NumberOfRecTracks();
128 AliMUONTrack* RecTrack(Int_t rectrack);
129
71a2d3aa 130 /// Returns the file name from which we are fetching data
a202c2d2 131 TString CurrentFile() const { return ""; }
554b38a6 132
71a2d3aa 133 /// Returns the name of the currently selected folder.
a202c2d2 134 TString CurrentFolder() const { return ""; }
554b38a6 135
71a2d3aa 136 /// Returns the number of the currently selected event.
a202c2d2 137 Int_t CurrentEvent() const { return 0; }
554b38a6 138
71a2d3aa 139 /// Returns the currently selected track.
a202c2d2 140 Int_t CurrentTrack() const { return 0; }
554b38a6 141
71a2d3aa 142 /// Returns the currently selected cathode in TreeS.
a202c2d2 143 Int_t CurrentSCathode() const { return 0; }
554b38a6 144
71a2d3aa 145 /// Returns the currently selected cathode in TreeD.
a202c2d2 146 Int_t CurrentDCathode() const { return 0; }
554b38a6 147
f51d54cb 148 private:
a202c2d2 149
150 void DumpIt(const char* treeLetter, const char* what, Int_t event, Bool_t sorted) const;
151
71a2d3aa 152 /// Not implemented
554b38a6 153 AliMUONDataInterface(const AliMUONDataInterface& rhs);
71a2d3aa 154 /// Not implemented
554b38a6 155 AliMUONDataInterface& operator=(const AliMUONDataInterface& rhs);
a202c2d2 156
157 AliMUONDataManager* fDataManager; //!< Internal data accessor
554b38a6 158
a202c2d2 159 ClassDef(AliMUONDataInterface, 0) // An easy to use interface to MUON data
160};
554b38a6 161
48b32e42 162
37b3f607 163#endif // ALI_MUON_DATA_INTERFACE_H