Misplaced ";" removed.
[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>
e9bef706 20#include <TString.h>
48b32e42 21
e9bef706 22class AliLoader;
23class AliMUONVClusterStore;
a202c2d2 24class AliMUONVDigitStore;
e9bef706 25class AliMUONVStore;
26class AliMUONVTrackStore;
a202c2d2 27class AliMUONVTriggerStore;
28class AliMUONVTriggerTrackStore;
30178c30 29
a202c2d2 30// >>LA should not needed (once we remove deprecated methods)
31class AliMUONHit;
30178c30 32class AliMUONDigit;
a202c2d2 33class AliMUONLocalTrigger;
34class AliMUONGlobalTrigger;
35class AliMUONRawCluster;
554b38a6 36class AliMUONTrack;
a202c2d2 37class TParticle;
38// <<LA
48b32e42 39
48b32e42 40class AliMUONDataInterface : public TObject
41{
554b38a6 42 public:
43
a202c2d2 44 AliMUONDataInterface(const char* filename="galice.root");
45 virtual ~AliMUONDataInterface();
46
47 Bool_t IsValid() const;
48
e9bef706 49 void Open(const char* filename);
a202c2d2 50
a202c2d2 51 Int_t NumberOfEvents() const;
52
e9bef706 53 AliMUONVDigitStore* DigitStore(Int_t event);
54 AliMUONVClusterStore* ClusterStore(Int_t event);
55 AliMUONVTrackStore* TrackStore(Int_t event);
56 AliMUONVTriggerStore* TriggerStore(Int_t event, const char* treeLetter="R");
57 AliMUONVTriggerTrackStore* TriggerTrackStore(Int_t event);
58
59 /// Dump the clusters for a given event, sorted if so required
60 void DumpClusters(Int_t event, Bool_t sorted=kTRUE) { return DumpRecPoints(event,sorted); }
61 void DumpRecPoints(Int_t event, Bool_t sorted=kTRUE);
62 void DumpDigits(Int_t event, Bool_t sorted=kTRUE);
63 void DumpTracks(Int_t event, Bool_t sorted=kFALSE);
64 void DumpTrigger(Int_t event, const char* treeLetter="R");
65 void DumpTriggerTracks(Int_t event, Bool_t sorted=kFALSE);
a202c2d2 66
67 // all the methods below are deprecated.
554b38a6 68
69 // Sets all internal pointers to NULL without releasing the current runloader.
70 void Reset();
71
72 Bool_t UseCurrentRunLoader();
73
74 Int_t NumberOfEvents(TString filename, TString foldername);
75
76 Int_t NumberOfParticles(TString filename, TString foldername, Int_t event);
77 TParticle* Particle(TString filename, TString foldername, Int_t event, Int_t particle);
78
79 Int_t NumberOfTracks(TString filename, TString foldername, Int_t event);
80 Int_t NumberOfHits(TString filename, TString foldername, Int_t event, Int_t track);
81 AliMUONHit* Hit(TString filename, TString foldername, Int_t event, Int_t track, Int_t hit);
82
83 Int_t NumberOfSDigits(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode);
84 AliMUONDigit* SDigit(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode, Int_t sdigit);
85
86 Int_t NumberOfDigits(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode);
87 AliMUONDigit* Digit(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cathode, Int_t digit);
88
89 Int_t NumberOfRawClusters(TString filename, TString foldername, Int_t event, Int_t chamber);
90 AliMUONRawCluster* RawCluster(TString filename, TString foldername, Int_t event, Int_t chamber, Int_t cluster);
91
92 Int_t NumberOfLocalTriggers(TString filename, TString foldername, Int_t event);
93 AliMUONLocalTrigger* LocalTrigger(TString filename, TString foldername, Int_t event, Int_t trigger);
94
95 Bool_t SetFile(TString filename = "galice.root", TString foldername = "MUONFolder");
96 Bool_t GetEvent(Int_t event = 0);
97
554b38a6 98 Int_t NumberOfParticles();
99 TParticle* Particle(Int_t particle);
100
101 Int_t NumberOfTracks();
102 Int_t NumberOfHits(Int_t track);
103 AliMUONHit* Hit(Int_t track, Int_t hit);
104
105 Int_t NumberOfSDigits(Int_t chamber, Int_t cathode);
106 AliMUONDigit* SDigit(Int_t chamber, Int_t cathode, Int_t sdigit);
107
108 Int_t NumberOfDigits(Int_t chamber, Int_t cathode);
109 AliMUONDigit* Digit(Int_t chamber, Int_t cathode, Int_t digit);
110
111 Int_t NumberOfRawClusters(Int_t chamber);
112 AliMUONRawCluster* RawCluster(Int_t chamber, Int_t cluster);
113
114 Int_t NumberOfLocalTriggers();
115 AliMUONLocalTrigger* LocalTrigger(Int_t trigger);
116
117 Int_t NumberOfGlobalTriggers();
118 AliMUONGlobalTrigger* GlobalTrigger(Int_t trigger);
119 // Returns the name of the currently selected file.
120
121 Int_t NumberOfRecTracks();
122 AliMUONTrack* RecTrack(Int_t rectrack);
123
71a2d3aa 124 /// Returns the file name from which we are fetching data
a202c2d2 125 TString CurrentFile() const { return ""; }
554b38a6 126
71a2d3aa 127 /// Returns the name of the currently selected folder.
a202c2d2 128 TString CurrentFolder() const { return ""; }
554b38a6 129
71a2d3aa 130 /// Returns the number of the currently selected event.
a202c2d2 131 Int_t CurrentEvent() const { return 0; }
554b38a6 132
71a2d3aa 133 /// Returns the currently selected track.
a202c2d2 134 Int_t CurrentTrack() const { return 0; }
554b38a6 135
71a2d3aa 136 /// Returns the currently selected cathode in TreeS.
a202c2d2 137 Int_t CurrentSCathode() const { return 0; }
554b38a6 138
71a2d3aa 139 /// Returns the currently selected cathode in TreeD.
a202c2d2 140 Int_t CurrentDCathode() const { return 0; }
554b38a6 141
f51d54cb 142 private:
a202c2d2 143
e9bef706 144 void DumpSorted(const AliMUONVStore& store) const;
145
146 Int_t LoadEvent(Int_t event);
147
148 void NtupleTrigger(const char* treeLetter);
a202c2d2 149
71a2d3aa 150 /// Not implemented
554b38a6 151 AliMUONDataInterface(const AliMUONDataInterface& rhs);
71a2d3aa 152 /// Not implemented
554b38a6 153 AliMUONDataInterface& operator=(const AliMUONDataInterface& rhs);
a202c2d2 154
e9bef706 155private:
156
157 AliLoader* fLoader; //!< Tree accessor
158 AliMUONVDigitStore* fDigitStore; //!< current digit store (owner)
159 AliMUONVTriggerStore* fTriggerStore; //!< current trigger store (owner)
160 AliMUONVClusterStore* fClusterStore; //!< current cluster store (owner)
161 AliMUONVTrackStore* fTrackStore; //!< current track store (owner)
162 AliMUONVTriggerTrackStore* fTriggerTrackStore; //!< current trigger track store (owner)
163 Int_t fCurrentEvent; //!< Current event we've read in
164 Bool_t fIsValid; //!< whether we were initialized properly or not
165
166 static Int_t fgInstanceCounter; //!< To build unique folder name for each instance
554b38a6 167
a202c2d2 168 ClassDef(AliMUONDataInterface, 0) // An easy to use interface to MUON data
169};
554b38a6 170
48b32e42 171
37b3f607 172#endif // ALI_MUON_DATA_INTERFACE_H