]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/PHOS/AliHLTPHOSDigit.h
Updating CMake files
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSDigit.h
1
2 /**************************************************************************
3  * This file is property of and copyright by the ALICE HLT Project        * 
4  * All rights reserved.                                                   *
5  *                                                                        *
6  * Primary Authors: Oystein Djuvsland                                     *
7  *                                                                        *
8  * Permission to use, copy, modify and distribute this software and its   *
9  * documentation strictly for non-commercial purposes is hereby granted   *
10  * without fee, provided that the above copyright notice appears in all   *
11  * copies and that both the copyright notice and this permission notice   *
12  * appear in the supporting documentation. The authors make no claims     *
13  * about the suitability of this software for any purpose. It is          * 
14  * provided "as is" without express or implied warranty.                  *
15  **************************************************************************/
16
17 #ifndef ALIHLTPHOSDIGIT_H
18 #define ALIHLTPHOSDIGIT_H
19
20 /**
21  * Digit class for PHOS HLT
22  *
23  * @file   AliHLTPHOSDigit.h
24  * @author Oystein Djuvsland
25  * @date
26  * @brief  Digit class for PHOS HLT
27  */
28
29 // see below for class documentation
30 // or
31 // refer to README to build package
32 // or
33 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
34
35 #include "TObject.h"
36 //#include "AliHLTPHOSAltroConfig.h"
37 #include "AliHLTPHOSBase.h"
38
39 //class AliHLTPHOSDigit : public TObject, public AliHLTPHOSAltroConfig
40
41 /**
42  * @class AliHLTPHOSDigit
43  * Digit class for PHOS HLT, used for writing ROOT files
44  *
45  * @ingroup alihlt_phos
46  */
47 class AliHLTPHOSDigit : public TObject, public AliHLTPHOSBase
48 {
49    
50 public: 
51
52   /** Constructor */
53   AliHLTPHOSDigit();
54
55   /** Destructor */
56   virtual ~AliHLTPHOSDigit();
57
58    /** Copy constructor */  
59   AliHLTPHOSDigit(const AliHLTPHOSDigit &) : 
60     TObject(),
61     AliHLTPHOSBase(),
62     fX(-1),
63     fZ(-1),
64     fAmplitude(-1),
65     fTime(-1),
66     fEnergy(-1),
67     fGain(-1),
68     fSamples(55),
69     fPreSamples(15),
70     fTotalSamples(70),
71     fDebugVar(-1),
72     fData(0),
73     fCrazyness(0),
74     fBaseline(0)
75   {
76     //Copy constructor not implemented
77   }
78   
79   /** Assignment */
80   AliHLTPHOSDigit & operator = (const AliHLTPHOSDigit)
81   {
82     //Assignment
83     return *this; 
84   }
85
86   /** Set x */
87   void SetX(Int_t x) { fX = x; }
88
89   /** Set z */
90   void SetZ(Int_t z) { fZ = z; }
91
92   /** Set the amplitude in ADC counts */
93   void SetAmplitude(Float_t amp) { fAmplitude = amp; }
94
95   /** Set the time in sample counts ? */
96   void SetTime(Float_t time) { fTime = time; }
97
98   /** Set the energy in GeV */
99   void SetEnergy(Float_t energy) { fEnergy = energy; }
100
101   /** Set the gain */
102   void SetGain(Int_t gain) { fGain = gain; }
103
104   /** 
105    * Set the raw data 
106    * @param rawData is a pointer to an array of raw data 
107    */
108   void SetRawData(Int_t* rawData);
109
110   /** Set the crazyness */
111   void SetCrazyness(Int_t crazyness) { fCrazyness = crazyness; }
112
113   /** Set the baseline value */
114   void SetBaseline(Float_t baseline) { fBaseline = baseline; }
115   
116   /** Set the number of samples */
117   void SetSamples(Int_t samples) { fSamples = samples; }
118
119   /** Set the number of pre samples */
120   void SetPreSamples(Int_t presamples) { fPreSamples = presamples; }
121
122   /** Reset the digit */
123   void ResetDigit();
124    
125   /** Set the debug variable */
126   void SetDebugVar(Int_t val) { fDebugVar = val; }
127   
128   /** Get x */
129   Int_t GetX() { return fX; }
130
131   /** Get z */ 
132   Int_t GetZ() { return fZ; }
133
134   /** Get the amplitude */
135   Float_t GetAmplitude() { return fAmplitude; }
136
137   /** Get the time */ 
138   Float_t GetTime() { return fTime; }
139
140   /** Get the energy */
141   Float_t GetEnergy() { return fEnergy; }
142
143   /** Get the gain */
144   Int_t GetGain() { return fGain; }
145
146   /** 
147    * Get the raw data
148    * @return a pointer to an array of raw data 
149    */
150   Int_t* GetRawData() { return fData; }
151  
152   /** Get the crazyness */
153   Int_t GetCrazyness() {return fCrazyness; }
154
155   /** Get the baseline */
156   Float_t GetBaseline() { return fBaseline; }
157   
158   /** Get number of samples */ 
159   Int_t GetSamples() { return fSamples; }
160
161   /** Get number of pre samples */ 
162   Int_t GetPreSamples() { return  fPreSamples; }
163
164   /** Get the total number of samples */
165   Int_t GetTotalSamples(){ return fNTotalSamples;}
166   
167   /** Get the debug variable */
168   Int_t GetDebugVar() { return fDebugVar; }
169   
170
171 private:
172   
173   /** The x coordinate */
174   Int_t fX;                     //COMMENT
175
176   /** The z coordinate */
177   Int_t fZ;                     //COMMENT
178
179   /** The amplitude in ADC counts*/
180   Float_t fAmplitude;           //COMMENT
181
182   /** The time */
183   Float_t fTime;                //COMMENT
184
185   /** The energy in GeV */
186   Float_t fEnergy;              //COMMENT
187
188   /** The gain */ 
189   Int_t fGain;                  //COMMENT
190
191   /** The number of samples */
192   Int_t fSamples;               //COMMENT
193
194   /** The number of pre samples */ 
195   Int_t fPreSamples;            //COMMENT
196
197   /** The total number of samples */ 
198   Int_t fTotalSamples;          //COMMENT
199   
200   /** A debug variable */
201   Int_t fDebugVar;              //COMMENT
202   
203   /** Pointer to the digit raw data */
204   Int_t *fData;                 //[fTotalSamples]
205
206   /** The crazyness */
207   Int_t fCrazyness;             //COMMENT
208
209   /** The baseline */
210   Float_t fBaseline;            //COMMENT
211
212   ClassDef(AliHLTPHOSDigit, 1);
213   
214 };
215
216 #endif