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