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 */
12 class TTreeSRedirector;
16 struct eventHeaderStruct;
19 class AliTPCCalibPedestal : public TObject {
22 AliTPCCalibPedestal();
23 AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
24 virtual ~AliTPCCalibPedestal();
26 AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source);
28 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
29 Bool_t ProcessEvent(AliRawReader *rawReader);
30 Bool_t ProcessEvent(eventHeaderStruct *event);
32 Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
33 const Int_t iTimeBin, const Float_t signal);
36 AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
37 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
38 const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;} // get calibration object
39 const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} // get calibration object
41 TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
42 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
44 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
45 Int_t GetLastTimeBin() const { return fLastTimeBin; }
46 Int_t GetAdcMin() const { return fAdcMin; }
47 Int_t GetAdcMax() const { return fAdcMax; }
49 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration
50 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
53 Bool_t TestEvent(); //test the fast approach to fill histogram - used for test purposes
56 Int_t fFirstTimeBin; // First Time bin needed for analysis
57 Int_t fLastTimeBin; // Last Time bin needed for analysis
59 Int_t fAdcMin; // min adc channel of pedestal value
60 Int_t fAdcMax; // max adc channel of pedestal value
62 AliTPCROC *fROC; //! ROC information
64 TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration
65 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
67 TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
71 TH2F* GetHisto(Int_t sector, TObjArray *arr,
72 Int_t nbinsY, Float_t ymin, Float_t ymax,
73 Char_t *type, Bool_t force);
75 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
80 ClassDef(AliTPCCalibPedestal,1)