]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TPC/AliTPCCalibPedestal.h
Coding violation reduction (Stefan)
[u/mrichter/AliRoot.git] / TPC / AliTPCCalibPedestal.h
CommitLineData
8bc7e885 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
f1b14fa2 8#include <TObject.h>
9#include <TObjArray.h>
8bc7e885 10
bdf99a93 11class TArrayF;
8bc7e885 12class TH2F;
8bc7e885 13class TTreeSRedirector;
14class AliTPCROC;
bc331d5b 15class AliTPCCalROC;
a7dce0bc 16class AliTPCRawStream;
aa983e4f 17class AliRawReader;
8bc7e885 18
bdf99a93 19struct eventHeaderStruct;
8bc7e885 20
21class AliTPCCalibPedestal : public TObject {
22
23public:
24 AliTPCCalibPedestal();
bc331d5b 25 AliTPCCalibPedestal(const AliTPCCalibPedestal &ped);
8bc7e885 26 virtual ~AliTPCCalibPedestal();
bc331d5b 27
28 AliTPCCalibPedestal& operator = (const AliTPCCalibPedestal &source);
29
30 Bool_t ProcessEvent(AliTPCRawStream *rawStream);
31 Bool_t ProcessEvent(AliRawReader *rawReader);
32 Bool_t ProcessEvent(eventHeaderStruct *event);
33
bdf99a93 34 Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
35 const Int_t iTimeBin, const Float_t signal);
36 void Analyse();
8bc7e885 37 //
bc331d5b 38 AliTPCCalROC* GetCalRocPedestal (Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
39 AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force=kFALSE); // get calibration object - sector
40 const TObjArray* GetCalPadPedestal (){return &fCalRocArrayPedestal;} // get calibration object
41 const TObjArray* GetCalPadRMS(){return &fCalRocArrayRMS;} // get calibration object
aa983e4f 42
bc331d5b 43 TH2F* GetHistoPedestal (Int_t sector, Bool_t force=kFALSE); // get refernce histogram
44 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
8bc7e885 45 //
bdf99a93 46 void SetTimeAnalysis(Bool_t time = kTRUE); // Use ONLY in TPCPEDESTALda on LDC for one sector!
47 void AnalyseTime(Int_t nevents); // Makes sense only in TPCPEDESTALda on LDC!
48 TArrayF **GetTimePedestals() const { return fTimeSignal; } // Get array with time dependent pedestals (for one sector!)
49 //
aa983e4f 50 Int_t GetFirstTimeBin() const { return fFirstTimeBin; }
51 Int_t GetLastTimeBin() const { return fLastTimeBin; }
52 Int_t GetAdcMin() const { return fAdcMin; }
53 Int_t GetAdcMax() const { return fAdcMax; }
bc331d5b 54
aa983e4f 55 void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax; } // Set time bin range that is used for the pedestal calibration
56 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
8bc7e885 57
bdf99a93 58 void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
aa983e4f 59
bdf99a93 60 void Merge(AliTPCCalibPedestal *ped);
8bc7e885 61
bdf99a93 62 Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes
8bc7e885 63
64private:
bdf99a93 65
8bc7e885 66 Int_t fFirstTimeBin; // First Time bin needed for analysis
67 Int_t fLastTimeBin; // Last Time bin needed for analysis
bdf99a93 68
8bc7e885 69 Int_t fAdcMin; // min adc channel of pedestal value
70 Int_t fAdcMax; // max adc channel of pedestal value
bdf99a93 71
aa983e4f 72 Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
bdf99a93 73 Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
a7dce0bc 74
8bc7e885 75 AliTPCROC *fROC; //! ROC information
bdf99a93 76
8bc7e885 77 TObjArray fCalRocArrayPedestal; // Array of AliTPCCalROC class for Time0 calibration
78 TObjArray fCalRocArrayRMS; // Array of AliTPCCalROC class for signal width calibration
bdf99a93 79
8bc7e885 80 TObjArray fHistoPedestalArray; // Calibration histograms for Pedestal distribution
bdf99a93 81
82 TArrayF **fTimeSignal; //! Arrays which hold time dependent signals
83
bc331d5b 84 TH2F* GetHisto(Int_t sector, TObjArray *arr,
8bc7e885 85 Int_t nbinsY, Float_t ymin, Float_t ymax,
86 Char_t *type, Bool_t force);
bdf99a93 87
8bc7e885 88 AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
89
90public:
bdf99a93 91 ClassDef(AliTPCCalibPedestal, 2) // Implementation of the TPC pedestal and noise calibration
8bc7e885 92};
93
94
95
96#endif
97