]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/AliTPCCalibPedestal.h
Now the TPC preprocessor has been updated to read pedestal entries from the DAQ FXS...
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibPedestal.h
1 #ifndef ALITPCCALIBPEDESTAL_H
2 #define ALITPCCALIBPEDESTAL_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
9
10 class TObjArray;
11 class TH2F;
12 class TTreeSRedirector;
13 class AliTPCROC;
14 class AliTPCCalROC;
15 class AliRawReader;
16 class AliTPCRawStream;
17 struct eventHeaderStruct;
18
19
20 class AliTPCCalibPedestal : public TObject {
21
22 public:
23   AliTPCCalibPedestal();
24   AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
25   virtual ~AliTPCCalibPedestal();
26
27   AliTPCCalibPedestal& operator = (const  AliTPCCalibPedestal &source);
28
29   Bool_t ProcessEvent(AliTPCRawStream *rawStream);
30   Bool_t ProcessEvent(AliRawReader    *rawReader);
31   Bool_t ProcessEvent(eventHeaderStruct   *event);
32
33   Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
34                const Int_t iTimeBin, const Float_t signal);
35   void Analyse();
36   //
37   AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE);  // get calibration object - sector
38   AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE);        // get calibration object - sector
39   const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;}  // get calibration object
40   const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;}             // get calibration object
41   void SetCalRocPedestal (AliTPCCalROC *roc, Int_t sector)
42                                      { fCalRocArrayPedestal.RemoveAt(sector);
43                                        fCalRocArrayPedestal.AddAt(roc,sector); }
44
45   TH2F* GetHistoPedestal  (Int_t sector, Bool_t force=kFALSE);          // get refernce histogram
46   void  DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
47   //
48   Int_t   GetFirstTimeBin() const { return fFirstTimeBin; }
49   Int_t   GetLastTimeBin()  const { return fLastTimeBin;  }
50   Int_t   GetAdcMin()       const { return fAdcMin;       }
51   Int_t   GetAdcMax()       const { return fAdcMax;       }
52
53   void    SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; }  // Set time bin range that is used for the pedestal calibration
54   void    SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; }  // Set adc range for the pedestal calibration
55
56
57   Bool_t TestEvent();  //test the fast approach to fill histogram  - used for test purposes
58
59 private:
60   Int_t fFirstTimeBin;              //  First Time bin needed for analysis
61   Int_t fLastTimeBin;               //  Last Time bin needed for analysis
62
63   Int_t fAdcMin;                    //  min adc channel of pedestal value
64   Int_t fAdcMax;                    //  max adc channel of pedestal value
65
66   AliTPCROC *fROC;                  //! ROC information
67
68   TObjArray fCalRocArrayPedestal;   //  Array of AliTPCCalROC class for Time0 calibration
69   TObjArray fCalRocArrayRMS;        //  Array of AliTPCCalROC class for signal width calibration
70
71   TObjArray fHistoPedestalArray;    //  Calibration histograms for Pedestal distribution
72
73
74
75   TH2F* GetHisto(Int_t sector, TObjArray *arr,
76                  Int_t nbinsY, Float_t ymin, Float_t ymax,
77                  Char_t *type, Bool_t force);
78
79   AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
80
81 public:
82
83
84   ClassDef(AliTPCCalibPedestal,1)
85 };
86
87
88
89 #endif
90