1 #ifndef ALITPCMONITORCONFIG_H
2 #define ALITPCMONITORCONFIG_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 //////////////////////////////////////////////////////////////////////////
11 //// AliTPCMonitorConfig class
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
18 //// Author: Stefan Kniege, IKF, Frankfurt
21 /////////////////////////////////////////////////////////////////////////
25 class AliTPCMonitorConfig: public TNamed
29 AliTPCMonitorConfig(const Char_t* name,const Char_t* title);
30 AliTPCMonitorConfig(const AliTPCMonitorConfig &config);
31 AliTPCMonitorConfig& operator= (const AliTPCMonitorConfig& config);
32 virtual ~AliTPCMonitorConfig();
34 Float_t GetButtonXSize() const { return fButtonXSize;}
35 Float_t GetButtonYSize() const { return fButtonYSize;}
36 Float_t GetButtonXFirst1() const { return fButtonFirstX1;}
37 Float_t GetButtonXFirst2() const { return fButtonFirstX2;}
38 Float_t GetButtonYFirst() const { return fButtonFirstY;}
39 Int_t GetMainXSize() const { return fMainXSize;}
40 Int_t GetMainYSize() const { return fMainYSize;}
41 Int_t GetBorderXSize() const { return fBorderXSize;}
42 Int_t GetBorderYSize() const { return fBorderYSize;}
43 Int_t GetCanvasXOffset() const { return fCanvasXOffset;}
44 Int_t GetCanvasXSize() const { return fCanvasXSize;}
45 Int_t GetCanvasYSize() const { return fCanvasYSize;}
46 Int_t GetCanvasXSpace() const { return fCanvasXSpace;}
47 Int_t GetCanvasYSpace() const { return fCanvasYSpace;}
49 Float_t* GetComponentSelection() const { return fComponents;}
51 Int_t GetEventProcessed() const { return fEventProcessed ;}
54 Int_t GetFormat() const { return fFormat ;}
55 Char_t* GetFile() const { return fFileCurrent;}
57 Int_t GetFitPulse() const { return fFitPulse ;}
58 Char_t* GetLastProcFile();
59 Int_t GetMaxHwAddr() const { return fMaxHwAddr ; }
61 Int_t GetLastSector() const { return fSectorLast;}
62 Int_t GetLastSectorDisplayed() const { return fSectorLastDisplayed;}
64 Int_t GetNextEventID() const { return fEventNextID ;}
65 Int_t GetNumOfChannels() const { return fNumOfChannels ; }
67 Int_t GetPedestals() const { return fPedestals ; }
68 Int_t GetProcNextEvent() const { return fEventNext;}
70 Int_t GetProcOneSector() const { return fProcOneSector;}
72 Int_t GetRangeBaseMin() const { return fRangeBaseMin;}
73 Int_t GetRangeBaseMax() const { return fRangeBaseMax;}
75 Int_t GetRangeMaxAdcMin() const { return fRangeMaxAdcMin;}
76 Int_t GetRangeMaxAdcMax() const { return fRangeMaxAdcMax;}
78 Int_t GetRangeSumMin() const { return fRangeSumMin;}
79 Int_t GetRangeSumMax() const { return fRangeSumMax;}
82 Int_t GetSectorFilled(Int_t sector,Int_t side)const { return fSectorArr[sector+side*18] ;}
83 Int_t GetSectorFilled(Int_t sector) const { return fSectorArr[sector] ;}
85 Int_t GetSamplingFrequency() const { return fSamplingFreq;}
87 Int_t GetTimeBins() const { return fTimeBins ; }
89 Int_t GetWrite10Bit() const { return fWrite10Bit ;}
93 void SetBaseConfig(float* ConfArr);
95 void SetLastProcFile(Char_t* val);
97 void SetEventProcessed(Int_t val) { fEventProcessed=val;}
99 void SetFitPulse( Int_t val) { fFitPulse =val;}
101 void SetNumOfChannels(Int_t val) { fNumOfChannels = val ; }
103 void SetPedestals(Int_t val) { fPedestals = val ; }
105 void SetTimeBins(Int_t val) { fTimeBins = val ; }
107 void SetFile(Char_t* val) { sprintf(fFileCurrent,val);}
109 void SetLastSector(Int_t val) { fSectorLast = val;}
111 void SetLastSectorDisplayed(Int_t val) { fSectorLastDisplayed = val;}
113 void SetNextEventID(Int_t val ) { fEventNextID = val;}
115 void SetProcNextEvent(Int_t val) { fEventNext = val ;}
117 void SetProcOneSector(Int_t val) { fProcOneSector = val ;}
119 void SetRangeMax( Int_t min, Int_t max) { fRangeMaxAdcMin=min, fRangeMaxAdcMax=max;}
120 void SetRangeBase(Int_t min, Int_t max) { fRangeBaseMin =min, fRangeBaseMax =max;}
121 void SetRangeSum( Int_t min, Int_t max) { fRangeSumMin =min, fRangeSumMax =max;}
123 void SetSectorFilled(Int_t sector,Int_t side){ fSectorArr[sector+side*18] =1;}
124 void SetSectorFilled(Int_t sector) { fSectorArr[sector] =1;}
126 void SetComponentSelection(float* val) { for(Int_t i=0;i<10;i++) fComponents[i] = val[i];}
128 void SetFormat(Int_t val) { fFormat = val;}
130 void SetWrite10Bit(Int_t val) { fWrite10Bit =val;}
131 void SetMainSize(Int_t mainx, Int_t mainy,
132 Int_t borderx ,Int_t bordery );
136 void ReadConfig(Char_t* nameconf);
137 void ResetSectorArray() { for(Int_t i=0;i<36; i++) fSectorArr[i]=0;}
141 // Data Format 0: DATA 1: ROOT
142 Int_t fFormat; // Format of the processed file/stream
144 Int_t fSector; // Currently processed sector
145 Int_t fSectorLast; // Previously processed sector
146 Int_t fSectorLastDisplayed; // Last displayed sector
147 Int_t* fSectorArr; // Array of processed sectors
149 // Current and Last Files and Dirs
150 Char_t* fFileLast; // Name of last processed file/stream
151 Int_t fFileLastSet ; // Flag showing if last file name was set
153 Char_t* fFileCurrent; // Current file/stream name
155 Int_t fEventNext; // Process next event -> do not stay in current event
156 Int_t fEventNextID; // Next event ID to be processed (if event id does not exist search for next existing event)
158 Int_t fEventProcessed; // Flag to show if event was read in
160 // Ranges for determination of ADC max , Baseline and ADC Sum
161 Int_t fRangeMaxAdcMin ; // Min timebin of range to determine max. adc value
162 Int_t fRangeMaxAdcMax ; // Max timebin of range to determine max. adc value
164 Int_t fRangeBaseMin ; // Min timebin of range to determine baseline
165 Int_t fRangeBaseMax ; // Max timebin of range to determine basline
167 Int_t fRangeSumMin ; // Min timebin of range to determine adc sum
168 Int_t fRangeSumMax ; // Max timebin of range to determine adc sum
170 // Canvas Size for Monitor Canvases
171 Int_t fCanvasXSize; // Canvas size in x ( set to fCanvasMainSize )
172 Int_t fCanvasYSize; // Canvas size in y ( set to fCanvasMainSize )
173 Int_t fCanvasXSpace; // Canvas size in x + border size
174 Int_t fCanvasYSpace; // Canvas size in y + border size
175 Int_t fCanvasXOffset; // Canvas x offset (main window)
176 Int_t fCanvasMainSize; // Canvas size in x and y
178 // Size of Main frame and Border (depending on Window Manager)
179 Int_t fMainXSize; // Main window size x
180 Int_t fMainYSize; // Main window size y
182 Int_t fBorderXSize ; // Canvas border size x
183 Int_t fBorderYSize ; // Canvas border size y
186 Float_t fButtonXSize ; // Button size x
187 Float_t fButtonYSize ; // Button size y
188 Float_t fButtonFirstX1; // Pos of first button row in x
189 Float_t fButtonFirstX2; // Pos of second button row in x
190 Float_t fButtonFirstY ; // Position of first button in y
192 Int_t fWrite10Bit ; // Flag to write 10 bit data words to file
194 // Arr to Store Selected components to be displayed
195 Float_t* fComponents; // Array of components to be selected for display
197 // Sampling Freq required for FFT
198 Int_t fSamplingFreq; // Sampling frequency for data taking
201 Int_t fPedestals ; // Version for pedestal calculation
202 Int_t fNumOfChannels ; // Maximum number of channels
203 Int_t fTimeBins ; // Number of timebins to be displayed
204 Int_t fMaxHwAddr ; // Max value of hardware addresses
206 Int_t fFitPulse ; // Flag for fitting pulse around max adc
208 Int_t fProcOneSector ; // Flag for processing only the specified sector for the next event
211 ClassDef(AliTPCMonitorConfig,1);