removed TPC CA tracker
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitorConfig.h
CommitLineData
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
9////////////////////////////////////////////////////////////////////////
10//
11// AliTPCMonitorConfig class
12//
13// Configuration handler class for AliTPCMonitor
14//
15// Author: Stefan Kniege, IKF, Frankfurt
16//
17//
18/////////////////////////////////////////////////////////////////////////
19
20
21
22#include <iostream>
23#include <fstream>
24#include <istream>
25#include <ostream>
26#include <string>
27#include "TNamed.h"
28#include "TObject.h"
29#include "TSystem.h"
30#include "AliLog.h"
31using namespace std;
32
33class AliTPCMonitorConfig: public TNamed
34{
35 public :
36
37 AliTPCMonitorConfig(Char_t* name,Char_t* title);
38 virtual ~AliTPCMonitorConfig();
39
40 // Data Format 0: DATA 1: ROOT
41 Int_t fFormat;
42
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
47
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
51
52 Char_t* fFileCurrent; // Current file/stream name
53
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)
56
57 Int_t fEventProcessed; // Flag to show if event was read in
58
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
62
63 Int_t fRangeBaseMin ; // Min timebin of range to determine baseline
64 Int_t fRangeBaseMax ; // Max timebin of range to determine basline
65
66 Int_t fRangeSumMin ; // Min timebin of range to determine adc sum
67 Int_t fRangeSumMax ; // Max timebin of range to determine adc sum
68
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
76
77 // Size of Main frame and Border (depending on Window Manager) // Main window size x
78 Int_t fMainXSize; // Main window size y
79 Int_t fMainYSize;
80
81 Int_t fBorderXSize ; // Canvas border size x
82 Int_t fBorderYSize ; // Canvas border size y
83
84 // Buttonsize;
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
90
91 Int_t fWrite10Bit ; // Flag to write 10 bit data words to file
92
93 // Arr to Store Selected components to be displayed
94 Float_t* fComponents; // Array of components to be selected for display
95
96 // Sampling Freq required for FFT
97 Int_t fSamplingFreq; // Sampling frequency for data taking
98
99
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
104
105 Int_t fFitPulse ; // Flag for fitting pulse around max adc
106
107 Int_t fProcOneSector ;
108
109
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;}
124
125 Float_t* GetComponentSelection() { return fComponents;}
126
127 Int_t GetEventProcessed() { return fEventProcessed ;}
128
129
130 Int_t GetFormat() { return fFormat ;}
131 Char_t* GetFile() { return fFileCurrent;}
132
133 Int_t GetFitPulse() { return fFitPulse ;}
134 Char_t* GetLastProcFile();
135 Int_t GetMaxHwAddr() { return fMaxHwAddr ; }
136
137 Int_t GetLastSector() { return fSectorLast;}
138 Int_t GetLastSectorDisplayed() { return fSectorLastDisplayed;}
139
140 Int_t GetNextEventID() { return fEventNextID ;}
141 Int_t GetNumOfChannels() { return fNumOfChannels ; }
142
143 Int_t GetPedestals() { return fPedestals ; }
144 Int_t GetProcNextEvent() { return fEventNext;}
145
146 Int_t GetProcOneSector() { return fProcOneSector;}
147
148 Int_t GetRangeBaseMin() { return fRangeBaseMin;}
149 Int_t GetRangeBaseMax() { return fRangeBaseMax;}
150
151 Int_t GetRangeMaxAdcMin() { return fRangeMaxAdcMin;}
152 Int_t GetRangeMaxAdcMax() { return fRangeMaxAdcMax;}
153
154 Int_t GetRangeSumMin() { return fRangeSumMin;}
155 Int_t GetRangeSumMax() { return fRangeSumMax;}
156
157
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] ;}
160
161 Int_t GetSamplingFrequency() { return fSamplingFreq;}
162
163 Int_t GetTimeBins() { return fTimeBins ; }
164
165 Int_t GetWrite10Bit() { return fWrite10Bit ;}
166
167
168
169 void SetBaseConfig(float* ConfArr);
170
171 void SetLastProcFile(Char_t* val);
172
173 void SetEventProcessed(Int_t val) { fEventProcessed=val;}
174
175 void SetFitPulse( Int_t val) { fFitPulse =val;}
176
177 void SetNumOfChannels(Int_t val) { fNumOfChannels = val ; }
178
179 void SetPedestals(Int_t val) { fPedestals = val ; }
180
181 void SetTimeBins(Int_t val) { fTimeBins = val ; }
182
183 void SetFile(Char_t* val) { sprintf(fFileCurrent,val);}
184
185 void SetLastSector(Int_t val) { fSectorLast = val;}
186
187 void SetLastSectorDisplayed(Int_t val) { fSectorLastDisplayed = val;}
188
189 void SetNextEventID(Int_t val ) { fEventNextID = val;}
190
191 void SetProcNextEvent(Int_t val) { fEventNext = val ;}
192
193 void SetProcOneSector(Int_t val) { fProcOneSector = val ;}
194
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;}
198
199 void SetSectorFilled(Int_t sector,Int_t side){ fSectorArr[sector+side*18] =1;}
200 void SetSectorFilled(Int_t sector) { fSectorArr[sector] =1;}
201
202 void SetComponentSelection(float* val) { for(Int_t i=0;i<10;i++) fComponents[i] = val[i];}
203
204 void SetFormat(Int_t val) { fFormat = val;}
205
206 void SetWrite10Bit(Int_t val) { fWrite10Bit =val;}
207 void SetMainSize(Int_t mainx, Int_t mainy,
208 Int_t borderx ,Int_t bordery );
209
210 void PrintConfig();
211
212 void ReadConfig(Char_t* nameconf);
213 void ResetSectorArray() { for(Int_t i=0;i<36; i++) fSectorArr[i]=0;}
214
215
216 ClassDef(AliTPCMonitorConfig,1);
217};
218#endif