]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCMonitor.h
Removing coverity reports
[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;
ca7b8371 34class AliTPCMonitorFFT;
35class AliTPCMonitorConfig;
ca7b8371 36class AliRawReader;
5312f439 37class AliAltroRawStreamV3;
48265b32 38
39class AliTPCMonitor : public AliTPCMonitorConfig {
5312f439 40
41public:
42
43 AliTPCMonitor(char* name, char* title);
44 AliTPCMonitor(const AliTPCMonitor &monitor);
45 AliTPCMonitor& operator= (const AliTPCMonitor& monitor);
46
47 virtual ~AliTPCMonitor();
48
49 Int_t CheckEqId(Int_t secid, Int_t eqid);
50 TCanvas* CreateCanvas(const char* name);
51 void CreateHistos();
52
53 void DeleteHistos();
54 void DisableFit(Int_t val) { fDisableFit =val; }
55 void DrawHists(Int_t histos);
56 void DrawRMSMap();
57 void DumpHeader(AliRawReader* reader ) const ;
58
59 void ExecPad() ;
60 void ExecRow() ;
61 Int_t ExecProcess();
62 void ExecTransform();
63
64 void FillGlobal(Int_t sector);
65 void FillHistsPadPlane();
66
67 static double Gamma4(double* x, double* par);
68 Int_t GetChannelsProc() const { return fChannelIter ;}
69 Int_t GetEventID() const { return fEventNumber ;}
70 TH1* GetHisto(char* histname);
71 Int_t GetRCUPatch(Int_t runid, Int_t eqid) const;
72
73 Int_t GetPadAtX(Float_t xval, Int_t row, Int_t padmax) const ;
74 Int_t GetPadAtX(Float_t xval, Int_t row) const ;
75 void GetXY( Double_t& xval , Double_t& yval , Int_t padmax, Int_t row , Int_t pad) const ;
76
77 Int_t IsLastEvent() const { return fLastEv ;}
78
79 Int_t ProcessEvent();
80
81 void SetEventID(Int_t val) { fEventNumber =val;}
82 void SetMirror(Int_t val) { fMirror=val;}
83 void SetVerbose(Int_t val) { fVerb = val;}
84 void SetMappingHandler(AliTPCMonitorMappingHandler* val ) { fMapHand = val;}
85 void ShowSel(Int_t* compval);
86 void SetEqIds();
87
88 void ResizeCanv();
89 void ResetHistos();
90 void ResetArrays();
91 Int_t ReadDataNew( Int_t secid);
48265b32 92
5312f439 93 void WriteHistos() ;
94 void Write10bitChannel();
95
96
ac940b58 97// private:
5312f439 98
48265b32 99 // stats for size of arrays and histograms /////////////////////////////////////////////////
5312f439 100 Int_t** fPad; // array to store channel adc in time
101 Float_t* fPadMapHw; // array to store mapping of hardware address and channel number
102 Int_t** fPadMapRCU; // store multiple information for hardware address for debugging purpose (read out errors occur)
103
104
48265b32 105 // histograms to be used ////////////////////////////////////////////////////////////////
5312f439 106 TH2F* fHistIROC; // histo for max adc IROC
107 TH2F* fHistOROC; // histo for max adc OROC
108 TH2S* fHistIROCIndex; // histo for channel number in each bin IROC
109 TH2S* fHistOROCIndex; // histo for channel number in each bin OROC
110 TH2F* fHistIROCTime; // histo for peaking time in each bin IROC
111 TH2F* fHistOROCTime; // histo for peaking time in each bin OROC
112 TH2F* fHistIROCClone; // clone histo for max adc IROC (backup when selecting component)
113 TH2F* fHistOROCClone; // clone histo for max adc OROC (backup when selecting component)
114 TH2F* fHistIROCRMS; // histo for RMS IROC
115 TH2F* fHistOROCRMS; // histo for RMS OROC
116 TH2F* fHistIROCBASE; // histo for baseline IROC
117 TH2F* fHistOROCBASE; // histo for baseline OROC
118 TH2F* fHistIROCSUM; // histo for adc sum IROC
119 TH2F* fHistOROCSUM; // histo for adc sum OROC
120
121 TH2F* fHistChannelTime; // histo for adc(channel,time)
122 TH1F* fHistAddrMapIndex; // histo for channel(hardware address)
123 TH1F* fHistAddrMaxAdc; // histo for max-adc(hardware address)
124 TH1F* fHistAddrBaseMean; // histo for baseline(hardware address)
125 TH1F* fHistAddrMaxAdcX; // histo for max-adc-xposition(hardware address)
126 TH1F* fHistAddrAdcSum; // histo for adc-sum(hardware address)
127 TH1F* fHistAddrBaseRms; // histo for baselinr-rms(hardware address)
128
129 TH1F* fHistDistrSumIROC; // distribution of adc sum for all channels IROC
130 TH1F* fHistDistrMaxIROC; // distribution of adc max for all channels OROC
131 TH1F* fHistDistrSumOROC; // distribution of adc sum for all channels OROC
132 TH1F* fHistDistrMaxOROC; // distribution of adc max for all channels OROC
133
134 TH2F* fHistDistrBase2dIROC; // distribution of baseline vs rms for all channels IROC
135 TH2F* fHistDistrBase2dOROC; // distribution of baseline vs rms for all channels OROC
136 TH1D* fHistDistrBaseRmsIROC; // projection of fHistDistrBase2dIROC on Rms
137 TH1D* fHistDistrBaseMeanIROC; // projection of fHistDistrBase2dIROC on Mean
138 TH1D* fHistDistrBaseRmsOROC; // projection of fHistDistrBase2dOROC on Rms
139 TH1D* fHistDistrBaseMeanOROC; // projection of fHistDistrBase2dOROC on Mean
140
141 TH2S* fHistGlobalMaxA; // global histogramm for max adc of all sectors Side A
142 TH2S* fHistGlobalMaxC; // global histogramm for max adc of all sectors Side C
143
144 TObjArray* fHistList; // array to store all histogram
145
146
147 // row and pad settings
148 Int_t fkNRowsIroc; // number of rows in IROC
149 Int_t fkNRowsOroc; // number of rows in OROC
150
151 Int_t fkNPadsIroc; // number of pads in IROC
152 Int_t fkNPadsOroc; // number of pads in OROC
153
154 Int_t fkNPadMinIroc; // min for pad (y-axis) representation in 2D histogram IROC
155 Int_t fkNPadMinOroc; // min for pad (y-axis) representation in 2D histogram OROC
156 Int_t fkNPadMaxIroc; // max for pad (y-axis) representation in 2D histogram IROC
157 Int_t fkNPadMaxOroc; // max for pad (y-axis) representation in 2D histogram IROC
158
159 Int_t fVerb; // verbose flag
160
161 Int_t fLastEv; // flag for last event
162
163 Int_t fEventNumber; // current event number (ID)
164 Int_t fEventNumberOld; // previous event number
165
166 Int_t fDisableFit; // flag to disable fit of maximum peak
167
168 Int_t fExecGlob; // flag to add Executable to global histo
169 Int_t fExecPlaneMax; // flag to add executable for plane view ( max iroc/oroc)
170 Int_t fExecPadIrocRms; // flag to add executable for rms plane view IROC
171 Int_t fExecPadOrocRms; // flag to add executable for rms plane view OROC
172
173 Int_t fRunId; // current run id
174 Int_t fEqId; // currend equipment id
175
176 Int_t fPadUsedRoc; // last ROC canvas the mouse pointed at
177 Int_t fPadUsedHwAddr; // hwaddress for last pad the mouse pointed at
178
179 Int_t fGdcId; // current GDC id
180 Int_t fLdcId; // current LDC id
181 Int_t fLdcIdOld; // previous LDC id
182
183 Int_t** fMapEqidsSec; // mapping rcu-patch(equipmentid)
184 Int_t* fMapEqidsRcu; // mapping equipmentid(sector,rcu-patch)
185
186 Int_t fMirror; // mirror x position on C-side
187 Int_t fChannelIter; // counter for channels read
188
189
190 AliTPCMonitorMappingHandler* fMapHand; // mapping handler
191
192 AliRawReader* fRawReader; // reader for ROOT format
193
48265b32 194
5312f439 195
196 static const Int_t fgkHwMaskFEC ; // mask for fec in hardware address
197 static const Int_t fgkHwMaskBranch ; // mask for branch in hardware address
198 static const Int_t fgkHwMaskFECChannel ; // mask for fec channel in hardware address
199 static const Int_t fgkHwMaskAltroChannel ; // mask for altro channel in hardware address
200 static const Int_t fgkHwMaskAltroChip ; // mask for altro chip in hardware address
201 static const Int_t fgkHwMaskRCU ; // not part of the trailer added afterwards
202
203
204 ClassDef(AliTPCMonitor,1);
48265b32 205};
206
207#endif