]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCMonitor.h
Adding new option - cumulative statistic
[u/mrichter/AliRoot.git] / TPC / AliTPCMonitor.h
CommitLineData
48265b32 1
2#ifndef ALITPCMONITOR_H
3#define ALITPCMONITOR_H
4
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8/* $Id$ */
9
10
11////////////////////////////////////////////////////////////////////////
fb3305d1 12////
13//// AliTPCMonitor class
14////
15//// Main class for the TPC raw data Monitor.
16//// The Monitor can handle rootified data, files and online streams in DATE format.
17//// The monitor GUI is started by the macro TPCMonitor.C
18////
19//// Author: Stefan Kniege, IKF, Frankfurt
20////
21////
48265b32 22/////////////////////////////////////////////////////////////////////////
23
48265b32 24#include "AliTPCMonitorConfig.h"
48265b32 25
ca7b8371 26class TH1F;
27class TH1D;
28class TH1;
29class TH2F;
30class TH2S;
31class TCanvas;
32class TH3S;
33class AliTPCMonitorMappingHandler;
34class AliTPCMonitorDateFile;
35class AliTPCMonitorDateFormat;
36class AliTPCMonitorAltro;
37class AliTPCMonitorFFT;
38class AliTPCMonitorConfig;
39class AliRawReaderRoot;
40class AliRawReader;
1954d2d0 41class AliTPCMonitorDateMonitor;
48265b32 42
48265b32 43
44class AliTPCMonitor : public AliTPCMonitorConfig {
45
46 public:
47
48 AliTPCMonitor(char* name, char* title);
ca7b8371 49 AliTPCMonitor(const AliTPCMonitor &monitor);
50 AliTPCMonitor& operator= (const AliTPCMonitor& monitor);
51
48265b32 52 virtual ~AliTPCMonitor();
53
ca7b8371 54 Int_t CheckEqId(Int_t secid, Int_t eqid);
55 TCanvas* CreateCanvas(char* name);
56 void CreateHistos();
57
58 void DeleteHistos();
59 void DisableFit(Int_t val) { fDisableFit =val; }
60 void DrawHists(Int_t histos);
61 void DrawRMSMap();
62 void DumpHeader(AliRawReaderRoot* reader ) const ;
63 void DumpHeader(AliTPCMonitorDateFormat* DateForm) const ;
64
65 void ExecPad() ;
66 void ExecRow() ;
67 Int_t ExecProcess();
68 void ExecTransform();
69
70 void FillGlobal(Int_t sector);
fb3305d1 71 void FillHistsDecode( AliTPCMonitorAltro* altro , Int_t rcupatch, Int_t secid=0);
ca7b8371 72 void FillHistsPadPlane();
73
74 static double Gamma4(double* x, double* par);
75 Int_t GetChannelsProc() const { return fChannelIter ;}
76 Int_t GetEventID() const { return fEventNumber ;}
77 TH1* GetHisto(char* histname);
fb3305d1 78 Int_t GetRCUPatch(Int_t runid, Int_t eqid) const;
ca7b8371 79
80 Int_t GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const ;
81 Int_t GetPadAtX(Float_t xval, Int_t row) const ;
82 void GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t row , Int_t pad) const ;
83
84 Int_t IsLastEvent() const { return fLastEv ;}
85
86 Int_t ProcessEvent();
87
88 void SetEventID(Int_t val) { fEventNumber =val;}
89 void SetMirror(Int_t val) { fMirror=val;}
90 void SetVerbose(Int_t val) { fVerb = val;}
91 void SetMappingHandler(AliTPCMonitorMappingHandler* val ) { fMapHand = val;}
fb3305d1 92 void ShowSel(Int_t* compval);
ca7b8371 93 void SetEqIds();
94
95 void ResizeCanv();
96 void ResetHistos();
97 void ResetArrays();
98 Int_t ReadData( Int_t secid);
99
100 Int_t ReadDataDATEFile(Int_t secid);
101 Int_t ReadDataDATEStream(Int_t secid);
102 Int_t ReadDataDATESubEventLoop(AliTPCMonitorDateFormat* DateForm, Int_t secid);
103 Int_t ReadDataROOT(Int_t secid );
104
105 void WriteHistos() ;
106 void Write10bitChannel();
107
108
109 private:
110
48265b32 111 // stats for size of arrays and histograms /////////////////////////////////////////////////
112 Int_t** fPad; // array to store channel adc in time
113 Float_t* fPadMapHw; // array to store mapping of hardware address and channel number
114 Int_t** fPadMapRCU; // store multiple information for hardware address for debugging purpose (read out errors occur)
115
116
117 // histograms to be used ////////////////////////////////////////////////////////////////
118 TH2F* fHistIROC; // histo for max adc IROC
119 TH2F* fHistOROC; // histo for max adc OROC
120 TH2S* fHistIROCIndex; // histo for channel number in each bin IROC
121 TH2S* fHistOROCIndex; // histo for channel number in each bin OROC
122 TH2F* fHistIROCTime; // histo for peaking time in each bin IROC
123 TH2F* fHistOROCTime; // histo for peaking time in each bin OROC
124 TH2F* fHistIROCClone; // clone histo for max adc IROC (backup when selecting component)
125 TH2F* fHistOROCClone; // clone histo for max adc OROC (backup when selecting component)
126 TH2F* fHistIROCRMS; // histo for RMS IROC
127 TH2F* fHistOROCRMS; // histo for RMS OROC
128 TH2F* fHistIROCBASE; // histo for baseline IROC
129 TH2F* fHistOROCBASE; // histo for baseline OROC
130 TH2F* fHistIROCSUM; // histo for adc sum IROC
131 TH2F* fHistOROCSUM; // histo for adc sum OROC
132
133 TH2F* fHistChannelTime; // histo for adc(channel,time)
134 TH1F* fHistAddrMapIndex; // histo for channel(hardware address)
135 TH1F* fHistAddrMaxAdc; // histo for max-adc(hardware address)
136 TH1F* fHistAddrBaseMean; // histo for baseline(hardware address)
137 TH1F* fHistAddrMaxAdcX; // histo for max-adc-xposition(hardware address)
138 TH1F* fHistAddrAdcSum; // histo for adc-sum(hardware address)
139 TH1F* fHistAddrBaseRms; // histo for baselinr-rms(hardware address)
140
141 TH1F* fHistDistrSumIROC; // distribution of adc sum for all channels IROC
142 TH1F* fHistDistrMaxIROC; // distribution of adc max for all channels OROC
143 TH1F* fHistDistrSumOROC; // distribution of adc sum for all channels OROC
144 TH1F* fHistDistrMaxOROC; // distribution of adc max for all channels OROC
145
146 TH2F* fHistDistrBase2dIROC; // distribution of baseline vs rms for all channels IROC
147 TH2F* fHistDistrBase2dOROC; // distribution of baseline vs rms for all channels OROC
148 TH1D* fHistDistrBaseRmsIROC; // projection of fHistDistrBase2dIROC on Rms
149 TH1D* fHistDistrBaseMeanIROC; // projection of fHistDistrBase2dIROC on Mean
150 TH1D* fHistDistrBaseRmsOROC; // projection of fHistDistrBase2dOROC on Rms
151 TH1D* fHistDistrBaseMeanOROC; // projection of fHistDistrBase2dOROC on Mean
152
153 TH2S* fHistGlobalMaxA; // global histogramm for max adc of all sectors Side A
154 TH2S* fHistGlobalMaxC; // global histogramm for max adc of all sectors Side C
155
156 TObjArray* fHistList; // array to store all histogram
157
158
159 // row and pad settings
ca7b8371 160 Int_t fkNRowsIroc; // number of rows in IROC
161 Int_t fkNRowsOroc; // number of rows in OROC
48265b32 162
ca7b8371 163 Int_t fkNPadsIroc; // number of pads in IROC
164 Int_t fkNPadsOroc; // number of pads in OROC
48265b32 165
ca7b8371 166 Int_t fkNPadMinIroc; // min for pad (y-axis) representation in 2D histogram IROC
167 Int_t fkNPadMinOroc; // min for pad (y-axis) representation in 2D histogram OROC
168 Int_t fkNPadMaxIroc; // max for pad (y-axis) representation in 2D histogram IROC
169 Int_t fkNPadMaxOroc; // max for pad (y-axis) representation in 2D histogram IROC
48265b32 170
171 Int_t fVerb; // verbose flag
172
173 Int_t fLastEv; // flag for last event
174
175 Int_t fEventNumber; // current event number (ID)
176 Int_t fEventNumberOld; // previous event number
177
178 Int_t fDisableFit; // flag to disable fit of maximum peak
179
180 Int_t fExecGlob; // flag to add Executable to global histo
181 Int_t fExecPlaneMax; // flag to add executable for plane view ( max iroc/oroc)
182 Int_t fExecPadIrocRms; // flag to add executable for rms plane view IROC
183 Int_t fExecPadOrocRms; // flag to add executable for rms plane view OROC
184
185 Int_t fRunId; // current run id
186 Int_t fEqId; // currend equipment id
187
188 Int_t fPadUsedRoc; // last ROC canvas the mouse pointed at
189 Int_t fPadUsedHwAddr; // hwaddress for last pad the mouse pointed at
190
191 Int_t fGdcId; // current GDC id
192 Int_t fLdcId; // current LDC id
193 Int_t fLdcIdOld; // previous LDC id
194
195 Int_t** fMapEqidsSec; // mapping rcu-patch(equipmentid)
196 Int_t* fMapEqidsRcu; // mapping equipmentid(sector,rcu-patch)
197
198 Int_t fMirror; // mirror x position on C-side
199 Int_t fChannelIter; // counter for channels read
200
201
202 AliTPCMonitorMappingHandler* fMapHand; // mapping handler
203
204 AliRawReaderRoot* fReaderROOT; // reader for ROOT format
205 AliTPCMonitorDateFile* fReaderDATE; // reader for DATE files
206
48265b32 207 AliTPCMonitorDateMonitor* fReaderDATEMon; // reader for DATE monitoring
48265b32 208
209
210
211
ca7b8371 212
48265b32 213
214 ClassDef(AliTPCMonitor,1);
215};
216
217#endif