]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDCalibPadStatus.h
Bug fix
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibPadStatus.h
CommitLineData
cf46274d 1#ifndef ALITRDCALIBPADSTATUS_H
170c35f1 2#define ALITRDCALIBPADSTATUS_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD calibration class for online calibration //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
14class TObjArray;
15class TH2F;
16class TTreeSRedirector;
f162af62 17
18class AliRawReader;
19
170c35f1 20class AliTRDCalROC;
21class AliTRDCalPadStatus;
22class AliTRDRawStream;
23class AliTRDarrayF;
f162af62 24class AliTRDgeometry;
25
170c35f1 26struct eventHeaderStruct;
27
28class AliTRDCalibPadStatus : public TObject {
29
30public:
31
32 AliTRDCalibPadStatus();
33 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
34 virtual ~AliTRDCalibPadStatus();
35
36 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
37
3a0f6479 38 Int_t ProcessEvent(AliTRDRawStream *rawStream, Bool_t nocheck = kFALSE);
39 Int_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE);
40 Int_t ProcessEvent(eventHeaderStruct *event, Bool_t nocheck = kFALSE);
170c35f1 41
42 Int_t Update(const Int_t idet, const Int_t iRow, const Int_t iCol,
43 const Int_t signal, const Int_t rowMax);
44 Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
45 const Int_t signal, const Int_t crowMax);
46 void Analyse();
47 void AnalyseHisto();
48 AliTRDCalPadStatus *CreateCalPadStatus();
3a0f6479 49
170c35f1 50 //
51 AliTRDarrayF* GetCalEntries(Int_t det, Bool_t force=kFALSE); // get calibration object
52 AliTRDarrayF* GetCalMean(Int_t det, Bool_t force=kFALSE); // get calibration object
53 AliTRDarrayF* GetCalSquares(Int_t det, Bool_t force=kFALSE); // get calibration object
54 AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object
55 AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object
56
57 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
58
59 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
60 //
61 Int_t GetAdcMin() const { return fAdcMin; }
62 Int_t GetAdcMax() const { return fAdcMax; }
63
64 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
65
66
67 Bool_t TestEvent(Int_t nevent); //test the fast approach to fill array - used for test purposes
68 Bool_t TestEventHisto(Int_t nevent); //test the fast approach to fill histograms
69
70private:
71
f162af62 72 // Geometry
73 AliTRDgeometry *fGeo; //! The TRD geometry
74
170c35f1 75 Int_t fAdcMin; // min adc channel of pedestal value
76 Int_t fAdcMax; // max adc channel of pedestal value
77 Int_t fDetector; // Current detector
cf46274d 78 Int_t fNumberOfTimeBins; // Current number of time bins
170c35f1 79
80 TObjArray fCalArrayEntries; // Array of AliTRDarrayF class calibration
81 TObjArray fCalArrayMean; // Array of AliTRDarrayF class calibration
82 TObjArray fCalArraySquares; // Array of AliTRDarrayF class calibration
83 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
84 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
85
86 TObjArray fHistoArray; // Array of histos for mean width calibration
87
88 AliTRDarrayF *fCalEntries; // Current AliTRDArrayF entries
89 AliTRDarrayF *fCalMean; // Current AliTRDArrayF Mean
90 AliTRDarrayF *fCalSquares; // Current AliTRDArrayF Squares
91
cf46274d 92 AliTRDarrayF* GetCal(Int_t det, TObjArray* arr, Bool_t force);
93 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
94
170c35f1 95 TH2F* GetHisto(Int_t det, TObjArray *arr,
96 Int_t nbinsY, Float_t ymin, Float_t ymax,
97 Char_t *type, Bool_t force);
98
99 // Some basic geometry function
100 virtual Int_t GetPlane(Int_t d) const;
101 virtual Int_t GetChamber(Int_t d) const;
102 virtual Int_t GetSector(Int_t d) const;
103
3a0f6479 104public:
170c35f1 105
3a0f6479 106 ClassDef(AliTRDCalibPadStatus,1)
170c35f1 107
3a0f6479 108};
170c35f1 109#endif
110