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
15 // Author: Stefan Kniege, IKF, Frankfurt
18 /////////////////////////////////////////////////////////////////////////
33 class AliTPCMonitorConfig: public TNamed
37 AliTPCMonitorConfig(Char_t* name,Char_t* title);
38 virtual ~AliTPCMonitorConfig();
40 // Data Format 0: DATA 1: ROOT
43 Int_t fSector; // Currently processed sector
44 Int_t fSectorLast; // Previously processed sector
45 Int_t fSectorLastDisplayed; // Last displayed sector
46 Int_t* fSectorArr; // Array of processed sectors
48 // Current and Last Files and Dirs
49 Char_t* fFileLast; // Name of last processed file/stream
50 Int_t fFileLastSet ; // Flag showing if last file name was set
52 Char_t* fFileCurrent; // Current file/stream name
54 Int_t fEventNext; // Process next event -> do not stay in current event
55 Int_t fEventNextID; // Next event ID to be processed (if event id does not exist search for next existing event)
57 Int_t fEventProcessed; // Flag to show if event was read in
59 // Ranges for determination of ADC max , Baseline and ADC Sum
60 Int_t fRangeMaxAdcMin ; // Min timebin of range to determine max. adc value
61 Int_t fRangeMaxAdcMax ; // Max timebin of range to determine max. adc value
63 Int_t fRangeBaseMin ; // Min timebin of range to determine baseline
64 Int_t fRangeBaseMax ; // Max timebin of range to determine basline
66 Int_t fRangeSumMin ; // Min timebin of range to determine adc sum
67 Int_t fRangeSumMax ; // Max timebin of range to determine adc sum
69 // Canvas Size for Monitor Canvases
70 Int_t fCanvasXSize; // Canvas size in x ( set to fCanvasMainSize )
71 Int_t fCanvasYSize; // Canvas size in y ( set to fCanvasMainSize )
72 Int_t fCanvasXSpace; // Canvas size in x + border size
73 Int_t fCanvasYSpace; // Canvas size in y + border size
74 Int_t fCanvasXOffset; // Canvas x offset (main window)
75 Int_t fCanvasMainSize; // Canvas size in x and y
77 // Size of Main frame and Border (depending on Window Manager) // Main window size x
78 Int_t fMainXSize; // Main window size y
81 Int_t fBorderXSize ; // Canvas border size x
82 Int_t fBorderYSize ; // Canvas border size y
85 Float_t fButtonXSize ; // Button size x
86 Float_t fButtonYSize ; // Button size y
87 Float_t fButtonFirstX1; // Pos of first button row in x
88 Float_t fButtonFirstX2; // Pos of second button row in x
89 Float_t fButtonFirstY ; // Position of first button in y
91 Int_t fWrite10Bit ; // Flag to write 10 bit data words to file
93 // Arr to Store Selected components to be displayed
94 Float_t* fComponents; // Array of components to be selected for display
96 // Sampling Freq required for FFT
97 Int_t fSamplingFreq; // Sampling frequency for data taking
100 Int_t fPedestals ; // Version for pedestal calculation
101 Int_t fNumOfChannels ; // Maximum number of channels
102 Int_t fTimeBins ; // Number of timebins to be displayed
103 Int_t fMaxHwAddr ; // Max value of hardware addresses
105 Int_t fFitPulse ; // Flag for fitting pulse around max adc
107 Int_t fProcOneSector ;
110 Float_t GetButtonXSize() { return fButtonXSize;}
111 Float_t GetButtonYSize() { return fButtonYSize;}
112 Float_t GetButtonXFirst1() { return fButtonFirstX1;}
113 Float_t GetButtonXFirst2() { return fButtonFirstX2;}
114 Float_t GetButtonYFirst() { return fButtonFirstY;}
115 Int_t GetMainXSize() { return fMainXSize;}
116 Int_t GetMainYSize() { return fMainYSize;}
117 Int_t GetBorderXSize() { return fBorderXSize;}
118 Int_t GetBorderYSize() { return fBorderYSize;}
119 Int_t GetCanvasXOffset() { return fCanvasXOffset;}
120 Int_t GetCanvasXSize() { return fCanvasXSize;}
121 Int_t GetCanvasYSize() { return fCanvasYSize;}
122 Int_t GetCanvasXSpace() { return fCanvasXSpace;}
123 Int_t GetCanvasYSpace() { return fCanvasYSpace;}
125 Float_t* GetComponentSelection() { return fComponents;}
127 Int_t GetEventProcessed() { return fEventProcessed ;}
130 Int_t GetFormat() { return fFormat ;}
131 Char_t* GetFile() { return fFileCurrent;}
133 Int_t GetFitPulse() { return fFitPulse ;}
134 Char_t* GetLastProcFile();
135 Int_t GetMaxHwAddr() { return fMaxHwAddr ; }
137 Int_t GetLastSector() { return fSectorLast;}
138 Int_t GetLastSectorDisplayed() { return fSectorLastDisplayed;}
140 Int_t GetNextEventID() { return fEventNextID ;}
141 Int_t GetNumOfChannels() { return fNumOfChannels ; }
143 Int_t GetPedestals() { return fPedestals ; }
144 Int_t GetProcNextEvent() { return fEventNext;}
146 Int_t GetProcOneSector() { return fProcOneSector;}
148 Int_t GetRangeBaseMin() { return fRangeBaseMin;}
149 Int_t GetRangeBaseMax() { return fRangeBaseMax;}
151 Int_t GetRangeMaxAdcMin() { return fRangeMaxAdcMin;}
152 Int_t GetRangeMaxAdcMax() { return fRangeMaxAdcMax;}
154 Int_t GetRangeSumMin() { return fRangeSumMin;}
155 Int_t GetRangeSumMax() { return fRangeSumMax;}
158 Int_t GetSectorFilled(Int_t sector,Int_t side){ return fSectorArr[sector+side*18] ;}
159 Int_t GetSectorFilled(Int_t sector) { return fSectorArr[sector] ;}
161 Int_t GetSamplingFrequency() { return fSamplingFreq;}
163 Int_t GetTimeBins() { return fTimeBins ; }
165 Int_t GetWrite10Bit() { return fWrite10Bit ;}
169 void SetBaseConfig(float* ConfArr);
171 void SetLastProcFile(Char_t* val);
173 void SetEventProcessed(Int_t val) { fEventProcessed=val;}
175 void SetFitPulse( Int_t val) { fFitPulse =val;}
177 void SetNumOfChannels(Int_t val) { fNumOfChannels = val ; }
179 void SetPedestals(Int_t val) { fPedestals = val ; }
181 void SetTimeBins(Int_t val) { fTimeBins = val ; }
183 void SetFile(Char_t* val) { sprintf(fFileCurrent,val);}
185 void SetLastSector(Int_t val) { fSectorLast = val;}
187 void SetLastSectorDisplayed(Int_t val) { fSectorLastDisplayed = val;}
189 void SetNextEventID(Int_t val ) { fEventNextID = val;}
191 void SetProcNextEvent(Int_t val) { fEventNext = val ;}
193 void SetProcOneSector(Int_t val) { fProcOneSector = val ;}
195 void SetRangeMax( Int_t min, Int_t max) { fRangeMaxAdcMin=min, fRangeMaxAdcMax=max;}
196 void SetRangeBase(Int_t min, Int_t max) { fRangeBaseMin =min, fRangeBaseMax =max;}
197 void SetRangeSum( Int_t min, Int_t max) { fRangeSumMin =min, fRangeSumMax =max;}
199 void SetSectorFilled(Int_t sector,Int_t side){ fSectorArr[sector+side*18] =1;}
200 void SetSectorFilled(Int_t sector) { fSectorArr[sector] =1;}
202 void SetComponentSelection(float* val) { for(Int_t i=0;i<10;i++) fComponents[i] = val[i];}
204 void SetFormat(Int_t val) { fFormat = val;}
206 void SetWrite10Bit(Int_t val) { fWrite10Bit =val;}
207 void SetMainSize(Int_t mainx, Int_t mainy,
208 Int_t borderx ,Int_t bordery );
212 void ReadConfig(Char_t* nameconf);
213 void ResetSectorArray() { for(Int_t i=0;i<36; i++) fSectorArr[i]=0;}
216 ClassDef(AliTPCMonitorConfig,1);