]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCdataQA.h
Fixing coverity defects
[u/mrichter/AliRoot.git] / TPC / AliTPCdataQA.h
CommitLineData
0ffacf98 1#ifndef ALITPCDATAQA_H
2#define ALITPCDATAQA_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7
336156cc 8#include <TH1F.h>
6a50ff96 9class TProfile;
57acd2d2 10#include "AliRecoParam.h"
0ffacf98 11
12class TArrayF;
13class TH2F;
14class TTreeSRedirector;
15class AliTPCROC;
16class AliTPCCalROC;
17class AliTPCRawStream;
0c25417d 18class AliTPCRawStreamV3;
0ffacf98 19class AliRawReader;
20class AliTPCAltroMapping;
ac940b58 21class AliTPCCalPad;
22class TMap;
0ffacf98 23struct eventHeaderStruct;
24
336156cc 25class AliTPCdataQA : public TH1F {
0ffacf98 26
27public:
28 AliTPCdataQA();
57acd2d2 29 AliTPCdataQA(AliRecoParam::EventSpecie_t es);
0ffacf98 30 AliTPCdataQA(const AliTPCdataQA &ped);
8ba97cc8 31 AliTPCdataQA(const TMap *config);
0ffacf98 32 virtual ~AliTPCdataQA();
33
34 AliTPCdataQA& operator = (const AliTPCdataQA &source);
8368e0ee 35 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
6a50ff96 36 void MakeTree(const char *fname="QApad.root") const;
258cd111 37
0ffacf98 38 //
6a50ff96 39 Bool_t ProcessEvent(AliTPCRawStream *const rawStream);
40 Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3);
41 Bool_t ProcessEvent(AliRawReader *const rawReader);
42 Bool_t ProcessEventOld(AliRawReader *const rawReader);
43 Bool_t ProcessEvent(eventHeaderStruct *const event);
0ffacf98 44
0ffacf98 45 void Analyse();
46 //
47 //
6a50ff96 48 void SetPedestal(AliTPCCalPad *const pedestalCal){ fPedestal = pedestalCal;}
49 void SetNoise(AliTPCCalPad *const noiseCal){ fNoise = noiseCal;}
f11b3071 50
266f8637 51 AliTPCCalPad *GetNoThreshold() const { return fNoThreshold;}
52 AliTPCCalPad *GetMaxCharge() const { return fMaxCharge;}
53 AliTPCCalPad *GetMeanCharge() const { return fMeanCharge;}
54 AliTPCCalPad *GetNLocalMaxima() const { return fNLocalMaxima;}
55 AliTPCCalPad *GetOverThreshold10() const { return fOverThreshold10;}
56 AliTPCCalPad *GetOverThreshold20() const { return fOverThreshold20;}
57 AliTPCCalPad *GetOverThreshold30() const { return fOverThreshold30;}
58 AliTPCCalPad *GetNTimeBins() const { return fNTimeBins;}
59 AliTPCCalPad *GetNPads() const { return fNPads;}
60 AliTPCCalPad *GetTimePosition() const { return fTimePosition;}
23c9ab21 61 TProfile* GetHistQVsTimeSideA() const {return fHistQVsTimeSideA;}
62 TProfile* GetHistQVsTimeSideC() const {return fHistQVsTimeSideC;}
63 TProfile* GetHistQMaxVsTimeSideA() const {return fHistQMaxVsTimeSideA;}
64 TProfile* GetHistQMaxVsTimeSideC() const {return fHistQMaxVsTimeSideC;}
ce0175fa 65 TH1F* GetHistOccupancyVsEventConst() const {return fHistOccupancyVsEvent;}
66 TH1F* GetHistNclustersVsEventConst() const {return fHistNclustersVsEvent;}
67 TH1F* GetHistOccupancyVsEvent();
68 TH1F* GetHistNclustersVsEvent();
0ffacf98 69
70 //
6a50ff96 71 AliTPCAltroMapping **GetAltroMapping() const { return fMapping; };
0ffacf98 72 void SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
73 //
74 //
266f8637 75 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
76 Int_t GetLastTimeBin() const { return fLastTimeBin; }
77 Int_t GetAdcMin() const { return fAdcMin; }
78 Int_t GetAdcMax() const { return fAdcMax; }
79 Int_t GetEventCounter() const { return fEventCounter; }
266f8637 80 Bool_t GetIsAnalysed() const { return fIsAnalysed; }
ce0175fa 81 Int_t GetMaxEvents() const { return fMaxEvents; }
82 Int_t GetEventsPerBin() const { return fEventsPerBin; }
83 Int_t GetSignalCounter() const { return fSignalCounter; }
84 Int_t GetClusterCounter() const { return fClusterCounter;}
85
c322f08a 86 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
0ffacf98 87 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
ce0175fa 88 void SetMaxEvents (Int_t value) { fMaxEvents = value; }
89 void SetEventsPerBin(Int_t value) { fEventsPerBin = value; }
c322f08a 90
0ffacf98 91private:
266f8637 92 Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad,
93 const Int_t iTimeBin, Float_t signal);
94 void FindLocalMaxima(const Int_t iSector);
95
96 void MakeArrays(); // Create arrays for random data acces
97 void CleanArrays(); // Clean arrays for random data acces
98 void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin,
99 const Float_t signal); // Fill arrays with signals
100 void GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin); // Get pad and time bin corresponding to the 1d bin
101 Float_t GetQ(const Float_t* adcArray, const Int_t time,
102 const Int_t pad, const Int_t maxTimeBins,
6a50ff96 103 Int_t& timeMin,Int_t& timeMax,Int_t& padMin,Int_t& padMax) const;
ce0175fa 104 void UpdateEventHistograms();
266f8637 105
0ffacf98 106 Int_t fFirstTimeBin; // First Time bin needed for analysis
107 Int_t fLastTimeBin; // Last Time bin needed for analysis
108 Int_t fAdcMin; // min adc channel of pedestal value
109 Int_t fAdcMax; // max adc channel of pedestal value
0ffacf98 110
0ffacf98 111 AliTPCAltroMapping **fMapping; //! Altro Mapping object
112 //
113 //
336156cc 114 AliTPCCalPad * fPedestal; //! option to set pedestal cal object
115 AliTPCCalPad * fNoise; //! option to set noise cal object
266f8637 116 AliTPCCalPad * fNLocalMaxima; // local maximas found
f11b3071 117 AliTPCCalPad * fMaxCharge; // max charge
118 AliTPCCalPad * fMeanCharge; // mean charge
119 AliTPCCalPad * fNoThreshold; // number of digits
266f8637 120 AliTPCCalPad * fNTimeBins; // timebins width of cluster
121 AliTPCCalPad * fNPads; // pads with of cluster
122 AliTPCCalPad * fTimePosition; // Time position of local maximum
123 AliTPCCalPad * fOverThreshold10; //! local maxima with qMax over threshold
124 AliTPCCalPad * fOverThreshold20; //! local maxima with qMax over threshold
125 AliTPCCalPad * fOverThreshold30; //! local maxima with qMax over threshold
f11b3071 126
23c9ab21 127 TProfile* fHistQVsTimeSideA; // Q vs time (side A)
128 TProfile* fHistQVsTimeSideC; // Q vs time (side C)
129 TProfile* fHistQMaxVsTimeSideA; // QMax vs time (side A)
130 TProfile* fHistQMaxVsTimeSideC; // QMax vs time (side C)
131
ce0175fa 132 TH1F* fHistOccupancyVsEvent; // Occupancy vs event number (~time)
133 TH1F* fHistNclustersVsEvent; // Nclusters vs event number (~time)
134
f11b3071 135 Int_t fEventCounter; // event Counter
266f8637 136 Bool_t fIsAnalysed; // Set to true after Analyse has been called
ce0175fa 137
138 Int_t fMaxEvents; // Max events for event histograms
139 Int_t fEventsPerBin; // Events per bin for event histograms
140 Int_t fSignalCounter; // Signal counter
141 Int_t fClusterCounter; // Cluster counter
c322f08a 142 //
143 // Expand buffer
144 //
145 Float_t** fAllBins; //! array for digit using random access
146 Int_t** fAllSigBins; //! array of pointers to the indexes over threshold
147 Int_t* fAllNSigBins; //!
266f8637 148 Int_t fRowsMax; //! Maximum number of time bins
149 Int_t fPadsMax; //! Maximum number of time bins
150 Int_t fTimeBinsMax; //! Maximum number of time bins
c322f08a 151
ce0175fa 152 ClassDef(AliTPCdataQA, 5) // Implementation of the TPC Raw QA
0ffacf98 153};
154
155
156
157#endif
158