]>
Commit | Line | Data |
---|---|---|
48265b32 | 1 | #ifndef ALITPCMONITORCONFIG_H |
2 | #define ALITPCMONITORCONFIG_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /* $Id$ */ | |
8 | ||
fb3305d1 | 9 | ////////////////////////////////////////////////////////////////////////// |
10 | //// | |
11 | //// AliTPCMonitorConfig class | |
12 | //// | |
13 | //// Configuration handler class for AliTPCMonitor. | |
14 | //// The class reads and stores basic configurations | |
15 | //// for the AliTPCMonitor class. The values can be changed | |
16 | //// online or written to the configuration file AliTPCMonitorConfig.txt | |
17 | //// | |
18 | //// Author: Stefan Kniege, IKF, Frankfurt | |
19 | //// | |
20 | //// | |
48265b32 | 21 | ///////////////////////////////////////////////////////////////////////// |
22 | ||
c60053f6 | 23 | #include <TNamed.h> |
24 | #include <TString.h> | |
48265b32 | 25 | |
26 | class AliTPCMonitorConfig: public TNamed | |
27 | { | |
28 | public : | |
29 | ||
ca7b8371 | 30 | AliTPCMonitorConfig(const Char_t* name,const Char_t* title); |
31 | AliTPCMonitorConfig(const AliTPCMonitorConfig &config); | |
32 | AliTPCMonitorConfig& operator= (const AliTPCMonitorConfig& config); | |
48265b32 | 33 | virtual ~AliTPCMonitorConfig(); |
34 | ||
ca7b8371 | 35 | Float_t GetButtonXSize() const { return fButtonXSize;} |
36 | Float_t GetButtonYSize() const { return fButtonYSize;} | |
37 | Float_t GetButtonXFirst1() const { return fButtonFirstX1;} | |
38 | Float_t GetButtonXFirst2() const { return fButtonFirstX2;} | |
39 | Float_t GetButtonYFirst() const { return fButtonFirstY;} | |
40 | Int_t GetMainXSize() const { return fMainXSize;} | |
41 | Int_t GetMainYSize() const { return fMainYSize;} | |
42 | Int_t GetBorderXSize() const { return fBorderXSize;} | |
43 | Int_t GetBorderYSize() const { return fBorderYSize;} | |
44 | Int_t GetCanvasXOffset() const { return fCanvasXOffset;} | |
45 | Int_t GetCanvasXSize() const { return fCanvasXSize;} | |
46 | Int_t GetCanvasYSize() const { return fCanvasYSize;} | |
47 | Int_t GetCanvasXSpace() const { return fCanvasXSpace;} | |
48 | Int_t GetCanvasYSpace() const { return fCanvasYSpace;} | |
49 | ||
50 | Float_t* GetComponentSelection() const { return fComponents;} | |
51 | ||
52 | Int_t GetEventProcessed() const { return fEventProcessed ;} | |
48265b32 | 53 | |
54 | ||
ca7b8371 | 55 | Int_t GetFormat() const { return fFormat ;} |
c60053f6 | 56 | const Char_t* GetFile() const { return fFileCurrent.Data();} |
48265b32 | 57 | |
ca7b8371 | 58 | Int_t GetFitPulse() const { return fFitPulse ;} |
c60053f6 | 59 | const Char_t* GetLastProcFile(); |
ca7b8371 | 60 | Int_t GetMaxHwAddr() const { return fMaxHwAddr ; } |
48265b32 | 61 | |
ca7b8371 | 62 | Int_t GetLastSector() const { return fSectorLast;} |
63 | Int_t GetLastSectorDisplayed() const { return fSectorLastDisplayed;} | |
48265b32 | 64 | |
ca7b8371 | 65 | Int_t GetNextEventID() const { return fEventNextID ;} |
66 | Int_t GetNumOfChannels() const { return fNumOfChannels ; } | |
48265b32 | 67 | |
ca7b8371 | 68 | Int_t GetPedestals() const { return fPedestals ; } |
69 | Int_t GetProcNextEvent() const { return fEventNext;} | |
48265b32 | 70 | |
ca7b8371 | 71 | Int_t GetProcOneSector() const { return fProcOneSector;} |
48265b32 | 72 | |
ca7b8371 | 73 | Int_t GetRangeBaseMin() const { return fRangeBaseMin;} |
74 | Int_t GetRangeBaseMax() const { return fRangeBaseMax;} | |
48265b32 | 75 | |
ca7b8371 | 76 | Int_t GetRangeMaxAdcMin() const { return fRangeMaxAdcMin;} |
77 | Int_t GetRangeMaxAdcMax() const { return fRangeMaxAdcMax;} | |
48265b32 | 78 | |
ca7b8371 | 79 | Int_t GetRangeSumMin() const { return fRangeSumMin;} |
80 | Int_t GetRangeSumMax() const { return fRangeSumMax;} | |
48265b32 | 81 | |
82 | ||
ca7b8371 | 83 | Int_t GetSectorFilled(Int_t sector,Int_t side)const { return fSectorArr[sector+side*18] ;} |
84 | Int_t GetSectorFilled(Int_t sector) const { return fSectorArr[sector] ;} | |
48265b32 | 85 | |
ca7b8371 | 86 | Int_t GetSamplingFrequency() const { return fSamplingFreq;} |
48265b32 | 87 | |
ca7b8371 | 88 | Int_t GetTimeBins() const { return fTimeBins ; } |
48265b32 | 89 | |
ca7b8371 | 90 | Int_t GetWrite10Bit() const { return fWrite10Bit ;} |
48265b32 | 91 | |
92 | ||
93 | ||
94 | void SetBaseConfig(float* ConfArr); | |
95 | ||
c60053f6 | 96 | void SetLastProcFile(const Char_t* val); |
48265b32 | 97 | |
98 | void SetEventProcessed(Int_t val) { fEventProcessed=val;} | |
99 | ||
100 | void SetFitPulse( Int_t val) { fFitPulse =val;} | |
101 | ||
102 | void SetNumOfChannels(Int_t val) { fNumOfChannels = val ; } | |
103 | ||
104 | void SetPedestals(Int_t val) { fPedestals = val ; } | |
105 | ||
106 | void SetTimeBins(Int_t val) { fTimeBins = val ; } | |
107 | ||
c60053f6 | 108 | void SetFile(const Char_t* val) { fFileCurrent=val; } |
48265b32 | 109 | |
110 | void SetLastSector(Int_t val) { fSectorLast = val;} | |
111 | ||
112 | void SetLastSectorDisplayed(Int_t val) { fSectorLastDisplayed = val;} | |
113 | ||
114 | void SetNextEventID(Int_t val ) { fEventNextID = val;} | |
115 | ||
116 | void SetProcNextEvent(Int_t val) { fEventNext = val ;} | |
117 | ||
118 | void SetProcOneSector(Int_t val) { fProcOneSector = val ;} | |
119 | ||
120 | void SetRangeMax( Int_t min, Int_t max) { fRangeMaxAdcMin=min, fRangeMaxAdcMax=max;} | |
121 | void SetRangeBase(Int_t min, Int_t max) { fRangeBaseMin =min, fRangeBaseMax =max;} | |
122 | void SetRangeSum( Int_t min, Int_t max) { fRangeSumMin =min, fRangeSumMax =max;} | |
123 | ||
124 | void SetSectorFilled(Int_t sector,Int_t side){ fSectorArr[sector+side*18] =1;} | |
125 | void SetSectorFilled(Int_t sector) { fSectorArr[sector] =1;} | |
126 | ||
127 | void SetComponentSelection(float* val) { for(Int_t i=0;i<10;i++) fComponents[i] = val[i];} | |
128 | ||
129 | void SetFormat(Int_t val) { fFormat = val;} | |
130 | ||
131 | void SetWrite10Bit(Int_t val) { fWrite10Bit =val;} | |
132 | void SetMainSize(Int_t mainx, Int_t mainy, | |
133 | Int_t borderx ,Int_t bordery ); | |
134 | ||
135 | void PrintConfig(); | |
136 | ||
c60053f6 | 137 | void ReadConfig(const Char_t* nameconf); |
48265b32 | 138 | void ResetSectorArray() { for(Int_t i=0;i<36; i++) fSectorArr[i]=0;} |
139 | ||
ca7b8371 | 140 | private: |
141 | ||
142 | // Data Format 0: DATA 1: ROOT | |
143 | Int_t fFormat; // Format of the processed file/stream | |
144 | ||
145 | Int_t fSector; // Currently processed sector | |
146 | Int_t fSectorLast; // Previously processed sector | |
147 | Int_t fSectorLastDisplayed; // Last displayed sector | |
148 | Int_t* fSectorArr; // Array of processed sectors | |
149 | ||
150 | // Current and Last Files and Dirs | |
c60053f6 | 151 | TString fFileLast; // Name of last processed file/stream |
ca7b8371 | 152 | Int_t fFileLastSet ; // Flag showing if last file name was set |
153 | ||
c60053f6 | 154 | TString fFileCurrent; // Current file/stream name |
ca7b8371 | 155 | |
156 | Int_t fEventNext; // Process next event -> do not stay in current event | |
157 | Int_t fEventNextID; // Next event ID to be processed (if event id does not exist search for next existing event) | |
158 | ||
159 | Int_t fEventProcessed; // Flag to show if event was read in | |
160 | ||
161 | // Ranges for determination of ADC max , Baseline and ADC Sum | |
162 | Int_t fRangeMaxAdcMin ; // Min timebin of range to determine max. adc value | |
163 | Int_t fRangeMaxAdcMax ; // Max timebin of range to determine max. adc value | |
164 | ||
165 | Int_t fRangeBaseMin ; // Min timebin of range to determine baseline | |
166 | Int_t fRangeBaseMax ; // Max timebin of range to determine basline | |
167 | ||
168 | Int_t fRangeSumMin ; // Min timebin of range to determine adc sum | |
169 | Int_t fRangeSumMax ; // Max timebin of range to determine adc sum | |
170 | ||
171 | // Canvas Size for Monitor Canvases | |
172 | Int_t fCanvasXSize; // Canvas size in x ( set to fCanvasMainSize ) | |
173 | Int_t fCanvasYSize; // Canvas size in y ( set to fCanvasMainSize ) | |
174 | Int_t fCanvasXSpace; // Canvas size in x + border size | |
175 | Int_t fCanvasYSpace; // Canvas size in y + border size | |
176 | Int_t fCanvasXOffset; // Canvas x offset (main window) | |
177 | Int_t fCanvasMainSize; // Canvas size in x and y | |
178 | ||
179 | // Size of Main frame and Border (depending on Window Manager) | |
180 | Int_t fMainXSize; // Main window size x | |
181 | Int_t fMainYSize; // Main window size y | |
182 | ||
183 | Int_t fBorderXSize ; // Canvas border size x | |
184 | Int_t fBorderYSize ; // Canvas border size y | |
185 | ||
186 | // Buttonsize; | |
187 | Float_t fButtonXSize ; // Button size x | |
188 | Float_t fButtonYSize ; // Button size y | |
189 | Float_t fButtonFirstX1; // Pos of first button row in x | |
190 | Float_t fButtonFirstX2; // Pos of second button row in x | |
191 | Float_t fButtonFirstY ; // Position of first button in y | |
192 | ||
193 | Int_t fWrite10Bit ; // Flag to write 10 bit data words to file | |
194 | ||
195 | // Arr to Store Selected components to be displayed | |
196 | Float_t* fComponents; // Array of components to be selected for display | |
197 | ||
198 | // Sampling Freq required for FFT | |
199 | Int_t fSamplingFreq; // Sampling frequency for data taking | |
200 | ||
201 | ||
202 | Int_t fPedestals ; // Version for pedestal calculation | |
203 | Int_t fNumOfChannels ; // Maximum number of channels | |
204 | Int_t fTimeBins ; // Number of timebins to be displayed | |
205 | Int_t fMaxHwAddr ; // Max value of hardware addresses | |
206 | ||
207 | Int_t fFitPulse ; // Flag for fitting pulse around max adc | |
208 | ||
209 | Int_t fProcOneSector ; // Flag for processing only the specified sector for the next event | |
210 | ||
48265b32 | 211 | |
212 | ClassDef(AliTPCMonitorConfig,1); | |
213 | }; | |
214 | #endif |