]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDInput.h
Last fixes before declaring (almost) success
[u/mrichter/AliRoot.git] / FMD / AliFMDInput.h
1 #ifndef AliFMDInput_H
2 #define AliFMDInput_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
8 //___________________________________________________________________
9 //
10 // The classes defined here, are utility classes for reading in data
11 // for the FMD.  They are  put in a seperate library to not polute the
12 // normal libraries.  The classes are intended to be used as base
13 // classes for customized class that do some sort of analysis on the
14 // various types of data produced by the FMD. 
15 //
16 #include <TObject.h>
17 #ifndef ROOT_TString
18 # include <TString.h>
19 #endif
20 class AliRunLoader;
21 class AliLoader;
22 class AliStack;
23 class AliRun;
24 class AliRawReader;
25 class AliFMD;
26 class AliFMDHit;
27 class AliFMDDigit;
28 class AliFMDSDigit;
29 class AliFMDRecPoint;
30 class AliESD;
31 class AliESDFMD;
32 class TString;
33 class TClonesArray;
34 class TTree;
35 class TGeoManager;
36 class TParticle;
37 class TChain;
38
39 //___________________________________________________________________
40 class AliFMDInput : public TObject
41 {
42 public:
43   enum ETrees {
44     kHits       = 1,  // Hits
45     kKinematics,      // Kinematics (from sim)
46     kDigits,          // Digits
47     kSDigits,         // Summable digits 
48     kHeader,          // Header information 
49     kRecPoints,       // Reconstructed points
50     kESD,             // Load ESD's
51     kRaw,             // Read raw data 
52     kGeometry         // Not really a tree 
53   };
54   AliFMDInput();
55   AliFMDInput(const char* gAliceFile);
56   virtual ~AliFMDInput() {}
57
58   virtual void   AddLoad(ETrees tree)     { SETBIT(fTreeMask, tree); }
59   virtual void   RemoveLoad(ETrees tree)  { CLRBIT(fTreeMask, tree); }
60   virtual Int_t  NEvents() const;
61
62   virtual Bool_t Init();
63   virtual Bool_t Begin(Int_t event);
64   virtual Bool_t Event();
65   virtual Bool_t End();
66   virtual Bool_t Finish() { return kTRUE; }
67   virtual Bool_t Run();
68
69   virtual Bool_t ProcessHits();
70   virtual Bool_t ProcessDigits();
71   virtual Bool_t ProcessSDigits();
72   virtual Bool_t ProcessRawDigits();
73   virtual Bool_t ProcessRecPoints();
74
75   virtual Bool_t ProcessHit(AliFMDHit*, TParticle*)  { return kTRUE; }
76   virtual Bool_t ProcessDigit(AliFMDDigit*)          { return kTRUE; }
77   virtual Bool_t ProcessSDigit(AliFMDSDigit*)        { return kTRUE; }
78   virtual Bool_t ProcessRawDigit(AliFMDDigit*)       { return kTRUE; }
79   virtual Bool_t ProcessRecPoint(AliFMDRecPoint*)    { return kTRUE; }
80   virtual Bool_t ProcessESD(AliESDFMD*)              { return kTRUE; }
81   
82 protected:
83   TString       fGAliceFile; // File name of gAlice file
84   AliRunLoader* fLoader;     // Loader of FMD data 
85   AliRun*       fRun;        // Run information
86   AliStack*     fStack;      // Stack of particles 
87   AliLoader*    fFMDLoader;  // Loader of FMD data 
88   AliRawReader* fReader;     // Raw data reader 
89   AliFMD*       fFMD;        // FMD object
90   AliESD*       fMainESD;    // ESD Object
91   AliESDFMD*    fESD;        // FMD ESD data  
92   TTree*        fTreeE;      // Header tree 
93   TTree*        fTreeH;      // Hits tree
94   TTree*        fTreeD;      // Digit tree 
95   TTree*        fTreeS;      // SDigit tree 
96   TTree*        fTreeR;      // RecPoint tree
97   TTree*        fTreeA;      // Raw data tree
98   TChain*       fChainE;     // Chain of ESD's
99   TClonesArray* fArrayE;     // Event info array
100   TClonesArray* fArrayH;     // Hit info array
101   TClonesArray* fArrayD;     // Digit info array
102   TClonesArray* fArrayS;     // SDigit info array
103   TClonesArray* fArrayR;     // Rec points info array
104   TClonesArray* fArrayA;     // Raw data (digits) info array
105   TGeoManager*  fGeoManager; // Geometry manager
106   Int_t         fTreeMask;   // Which tree's to load
107   Bool_t        fIsInit;
108   ClassDef(AliFMDInput,0)  //Hits for detector FMD
109 };
110
111
112 //____________________________________________________________________
113 class AliFMDHit;
114 class AliFMDInputHits : public AliFMDInput 
115 {
116 public:
117   AliFMDInputHits(const char* file="galice.root") 
118     : AliFMDInput(file) { AddLoad(kHits); }
119   ClassDef(AliFMDInputHits, 0);
120 };
121
122 //____________________________________________________________________
123 class AliFMDDigit;
124 class AliFMDInputDigits : public AliFMDInput 
125 {
126 public:
127   AliFMDInputDigits(const char* file="galice.root")
128     : AliFMDInput(file) { AddLoad(kDigits); }
129   ClassDef(AliFMDInputDigits, 0);
130 };
131
132 //____________________________________________________________________
133 class AliFMDSDigit;
134 class AliFMDInputSDigits : public AliFMDInput 
135 {
136 public:
137   AliFMDInputSDigits(const char* file="galice.root") 
138     : AliFMDInput(file) { AddLoad(kSDigits); }
139   ClassDef(AliFMDInputSDigits, 0);
140 };
141
142 //____________________________________________________________________
143 class AliFMDInputRaw : public AliFMDInput 
144 {
145 public:
146   AliFMDInputRaw(const char* file="galice.root") 
147     : AliFMDInput(file) { AddLoad(kRaw); }
148   ClassDef(AliFMDInputRaw, 0);
149 };
150
151 //____________________________________________________________________
152 class AliFMDRecPoint;
153 class AliFMDInputRecPoints : public AliFMDInput 
154 {
155 public:
156   AliFMDInputRecPoints(const char* file="galice.root") 
157     : AliFMDInput(file) { AddLoad(kRecPoints); }
158   ClassDef(AliFMDInputRecPoints, 0);
159 };
160
161 #endif
162 //____________________________________________________________________
163 //
164 // Local Variables:
165 //   mode: C++
166 // End:
167 //
168 // EOF
169 //