]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCdataQA.h
Don't add mapping to the tree - AliTPCPreprocessorOnline.cxx
[u/mrichter/AliRoot.git] / TPC / AliTPCdataQA.h
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
8 #include <TH1F.h>
9 #include <TObjArray.h>
10
11 class TArrayF;
12 class TH2F;
13 class TTreeSRedirector;
14 class AliTPCROC;
15 class AliTPCCalROC;
16 class AliTPCRawStream;
17 class AliTPCRawStreamFast;
18 class AliRawReader;
19 class AliTPCAltroMapping;
20 class AliTPCCalPad; 
21 struct eventHeaderStruct;
22
23 class AliTPCdataQA : public TH1F {
24
25 public:
26   AliTPCdataQA();
27   AliTPCdataQA(const AliTPCdataQA &ped);
28   virtual ~AliTPCdataQA();
29
30   AliTPCdataQA& operator = (const  AliTPCdataQA &source);
31  void  DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
32  void MakeTree(const char *fname="QApad.root");
33
34   //
35   Bool_t ProcessEventFast(AliTPCRawStreamFast *rawStreamFast);
36   Bool_t ProcessEventFast(AliRawReader        *rawReader);
37   Bool_t ProcessEvent(AliTPCRawStream *rawStream);
38   Bool_t ProcessEvent(AliRawReader    *rawReader);
39   Bool_t ProcessEvent(eventHeaderStruct   *event);
40
41   Int_t  Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
42                 const Int_t iTimeBin, const Float_t signal);
43   void   Analyse();
44   //
45   //
46   void SetPedestal(AliTPCCalPad *pedestalCal){ fPedestal = pedestalCal;}
47   void SetNoise(AliTPCCalPad *noiseCal){ fNoise = noiseCal;}
48
49   AliTPCCalPad *GetMaxCharge(){ return fMaxCharge;}
50   AliTPCCalPad *GetMeanCharge(){ return fMeanCharge;}
51   AliTPCCalPad *GetNoThreshold(){ return fNoThreshold;}
52   AliTPCCalPad *GetOverThreshold0(){ return fOverThreshold0;}
53   AliTPCCalPad *GetOverThreshold5(){ return fOverThreshold5;}
54   AliTPCCalPad *GetOverThreshold10(){ return fOverThreshold10;}
55   AliTPCCalPad *GetOverThreshold20(){ return fOverThreshold20;}
56   AliTPCCalPad *GetOverThreshold30(){ return fOverThreshold30;}
57
58   //
59   AliTPCAltroMapping **GetAltroMapping() { return fMapping; };
60   void  SetAltroMapping(AliTPCAltroMapping **mapp) { fMapping = mapp; };
61   //
62   //
63   Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
64   Int_t GetLastTimeBin()  const { return fLastTimeBin;  }
65   Int_t GetAdcMin()       const { return fAdcMin;       }
66   Int_t GetAdcMax()       const { return fAdcMax;       }
67   void  SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; }  // Set time bin range that is used for the pedestal calibration
68   void  SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; }  // Set adc range for the pedestal calibration
69
70   void  SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
71
72 private:
73   void UpdateSignalHistograms(const Int_t icsector, const Int_t icRow,
74                               const Int_t icPad, const Int_t icTimeBin,
75                               const Float_t signal);  
76   
77   Int_t fFirstTimeBin;              //  First Time bin needed for analysis
78   Int_t fLastTimeBin;               //  Last Time bin needed for analysis
79   Int_t fAdcMin;                    //  min adc channel of pedestal value
80   Int_t fAdcMax;                    //  max adc channel of pedestal value
81   Bool_t  fOldRCUformat;            //! Should we use the old RCU format for data reading
82   
83
84   AliTPCROC *fROC;                  //! ROC information
85   AliTPCAltroMapping **fMapping;    //! Altro Mapping object
86   //
87   //
88   AliTPCCalPad * fPedestal;         //! option to set pedestal cal object
89   AliTPCCalPad * fNoise;            //! option to set noise cal object
90   AliTPCCalPad * fMaxCharge;        // max charge
91   AliTPCCalPad * fMeanCharge;       // mean charge
92   AliTPCCalPad * fNoThreshold;      // number of digits
93   AliTPCCalPad * fOverThreshold0;   // number of digits over threshold
94   AliTPCCalPad * fOverThreshold5;   // number of digits over threshold
95   AliTPCCalPad * fOverThreshold10;  // number of digits over threshold
96   AliTPCCalPad * fOverThreshold20;  // number of digits over threshold
97   AliTPCCalPad * fOverThreshold30;  //! number of digits over threshold
98
99   Int_t   fEventCounter;            // event Counter
100   Int_t   fSectorLast;              //! last sector with signal
101   Int_t   fRowLast;                 //! last row with signal
102   Int_t   fPadLast;                 //! last pad with signal
103   Int_t   fTimeBinLast;             //! last time bin with signal
104   Float_t fSignalLast;              //! last signal value
105   Int_t   fNAboveThreshold;         //! number of signals above threshold
106
107 public:
108   ClassDef(AliTPCdataQA, 1)  // Implementation of the TPC pedestal and noise calibration
109 };
110
111
112
113 #endif
114