]>
Commit | Line | Data |
---|---|---|
25b7f84c | 1 | |
2374af72 | 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 | **************************************************************************/ | |
209a4703 | 16 | |
17 | #ifndef ALIHLTPHOSDIGIT_H | |
18 | #define ALIHLTPHOSDIGIT_H | |
19 | ||
2374af72 | 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 | ||
209a4703 | 35 | #include "TObject.h" |
36 | //#include "AliHLTPHOSAltroConfig.h" | |
37 | #include "AliHLTPHOSBase.h" | |
38 | ||
39 | //class AliHLTPHOSDigit : public TObject, public AliHLTPHOSAltroConfig | |
2374af72 | 40 | |
41 | /** | |
42 | * @class AliHLTPHOSDigit | |
43 | * Digit class for PHOS HLT, used for writing ROOT files | |
44 | * | |
45 | * @ingroup alihlt_phos | |
46 | */ | |
209a4703 | 47 | class AliHLTPHOSDigit : public TObject, public AliHLTPHOSBase |
48 | { | |
49 | ||
50 | public: | |
2374af72 | 51 | |
52 | /** Constructor */ | |
209a4703 | 53 | AliHLTPHOSDigit(); |
2374af72 | 54 | |
55 | /** Destructor */ | |
209a4703 | 56 | virtual ~AliHLTPHOSDigit(); |
57 | ||
25b7f84c | 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 | ||
2374af72 | 86 | /** Set x */ |
209a4703 | 87 | void SetX(Int_t x) { fX = x; } |
2374af72 | 88 | |
89 | /** Set z */ | |
209a4703 | 90 | void SetZ(Int_t z) { fZ = z; } |
91 | ||
2374af72 | 92 | /** Set the amplitude in ADC counts */ |
209a4703 | 93 | void SetAmplitude(Float_t amp) { fAmplitude = amp; } |
2374af72 | 94 | |
95 | /** Set the time in sample counts ? */ | |
209a4703 | 96 | void SetTime(Float_t time) { fTime = time; } |
2374af72 | 97 | |
98 | /** Set the energy in GeV */ | |
209a4703 | 99 | void SetEnergy(Float_t energy) { fEnergy = energy; } |
2374af72 | 100 | |
101 | /** Set the gain */ | |
209a4703 | 102 | void SetGain(Int_t gain) { fGain = gain; } |
103 | ||
2374af72 | 104 | /** |
105 | * Set the raw data | |
106 | * @param rawData is a pointer to an array of raw data | |
107 | */ | |
ab38011b | 108 | void SetRawData(Int_t* rawData); |
209a4703 | 109 | |
2374af72 | 110 | /** Set the crazyness */ |
209a4703 | 111 | void SetCrazyness(Int_t crazyness) { fCrazyness = crazyness; } |
2374af72 | 112 | |
113 | /** Set the baseline value */ | |
209a4703 | 114 | void SetBaseline(Float_t baseline) { fBaseline = baseline; } |
115 | ||
2374af72 | 116 | /** Set the number of samples */ |
209a4703 | 117 | void SetSamples(Int_t samples) { fSamples = samples; } |
2374af72 | 118 | |
119 | /** Set the number of pre samples */ | |
209a4703 | 120 | void SetPreSamples(Int_t presamples) { fPreSamples = presamples; } |
121 | ||
2374af72 | 122 | /** Reset the digit */ |
ab38011b | 123 | void ResetDigit(); |
124 | ||
2374af72 | 125 | /** Set the debug variable */ |
209a4703 | 126 | void SetDebugVar(Int_t val) { fDebugVar = val; } |
127 | ||
2374af72 | 128 | /** Get x */ |
209a4703 | 129 | Int_t GetX() { return fX; } |
2374af72 | 130 | |
131 | /** Get z */ | |
209a4703 | 132 | Int_t GetZ() { return fZ; } |
2374af72 | 133 | |
134 | /** Get the amplitude */ | |
209a4703 | 135 | Float_t GetAmplitude() { return fAmplitude; } |
2374af72 | 136 | |
137 | /** Get the time */ | |
209a4703 | 138 | Float_t GetTime() { return fTime; } |
2374af72 | 139 | |
140 | /** Get the energy */ | |
209a4703 | 141 | Float_t GetEnergy() { return fEnergy; } |
2374af72 | 142 | |
143 | /** Get the gain */ | |
209a4703 | 144 | Int_t GetGain() { return fGain; } |
145 | ||
2374af72 | 146 | /** |
147 | * Get the raw data | |
148 | * @return a pointer to an array of raw data | |
149 | */ | |
209a4703 | 150 | Int_t* GetRawData() { return fData; } |
151 | ||
2374af72 | 152 | /** Get the crazyness */ |
209a4703 | 153 | Int_t GetCrazyness() {return fCrazyness; } |
2374af72 | 154 | |
155 | /** Get the baseline */ | |
209a4703 | 156 | Float_t GetBaseline() { return fBaseline; } |
157 | ||
2374af72 | 158 | /** Get number of samples */ |
209a4703 | 159 | Int_t GetSamples() { return fSamples; } |
2374af72 | 160 | |
161 | /** Get number of pre samples */ | |
209a4703 | 162 | Int_t GetPreSamples() { return fPreSamples; } |
2374af72 | 163 | |
164 | /** Get the total number of samples */ | |
209a4703 | 165 | Int_t GetTotalSamples(){ return fNTotalSamples;} |
166 | ||
2374af72 | 167 | /** Get the debug variable */ |
209a4703 | 168 | Int_t GetDebugVar() { return fDebugVar; } |
169 | ||
170 | ||
171 | private: | |
172 | ||
2374af72 | 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 | |
209a4703 | 199 | |
2374af72 | 200 | /** A debug variable */ |
201 | Int_t fDebugVar; //COMMENT | |
209a4703 | 202 | |
2374af72 | 203 | /** Pointer to the digit raw data */ |
204 | Int_t *fData; //[fTotalSamples] | |
205 | ||
206 | /** The crazyness */ | |
207 | Int_t fCrazyness; //COMMENT | |
209a4703 | 208 | |
2374af72 | 209 | /** The baseline */ |
210 | Float_t fBaseline; //COMMENT | |
209a4703 | 211 | |
212 | ClassDef(AliHLTPHOSDigit, 1); | |
213 | ||
214 | }; | |
215 | ||
216 | #endif |