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