]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | class TObjArray; | |
15 | class TH2F; | |
16 | class TTreeSRedirector; | |
f162af62 | 17 | |
18 | class AliRawReader; | |
19 | ||
289cc637 | 20 | class AliTRDCalDet; |
21 | class AliTRDCalPad; | |
170c35f1 | 22 | class AliTRDCalROC; |
23 | class AliTRDCalPadStatus; | |
289cc637 | 24 | class AliTRDRawStreamV2; |
170c35f1 | 25 | class AliTRDarrayF; |
f162af62 | 26 | class AliTRDgeometry; |
27 | ||
170c35f1 | 28 | struct eventHeaderStruct; |
29 | ||
30 | class AliTRDCalibPadStatus : public TObject { | |
31 | ||
32 | public: | |
33 | ||
34 | AliTRDCalibPadStatus(); | |
35 | AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped); | |
36 | virtual ~AliTRDCalibPadStatus(); | |
37 | ||
38 | AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source); | |
39 | ||
289cc637 | 40 | Int_t ProcessEvent(AliTRDRawStreamV2 *rawStream, Bool_t nocheck = kFALSE); |
3a0f6479 | 41 | Int_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE); |
42 | Int_t ProcessEvent(eventHeaderStruct *event, Bool_t nocheck = kFALSE); | |
170c35f1 | 43 | |
44 | Int_t Update(const Int_t idet, const Int_t iRow, const Int_t iCol, | |
45 | const Int_t signal, const Int_t rowMax); | |
46 | Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol, | |
47 | const Int_t signal, const Int_t crowMax); | |
6ace5fe2 | 48 | |
170c35f1 | 49 | void Analyse(); |
50 | void AnalyseHisto(); | |
51 | AliTRDCalPadStatus *CreateCalPadStatus(); | |
289cc637 | 52 | AliTRDCalPad *CreateCalPad(); |
53 | AliTRDCalDet *CreateCalDet(); | |
3a0f6479 | 54 | |
6ace5fe2 | 55 | void SetCalRocMean(AliTRDCalROC *mean, Int_t det); |
56 | void SetCalRocRMS(AliTRDCalROC *rms, Int_t det); | |
57 | ||
170c35f1 | 58 | // |
59 | AliTRDarrayF* GetCalEntries(Int_t det, Bool_t force=kFALSE); // get calibration object | |
60 | AliTRDarrayF* GetCalMean(Int_t det, Bool_t force=kFALSE); // get calibration object | |
61 | AliTRDarrayF* GetCalSquares(Int_t det, Bool_t force=kFALSE); // get calibration object | |
62 | AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object | |
63 | AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object | |
64 | ||
65 | TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram | |
66 | ||
67 | void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE); | |
68 | // | |
69 | Int_t GetAdcMin() const { return fAdcMin; } | |
70 | Int_t GetAdcMax() const { return fAdcMax; } | |
71 | ||
72 | void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range | |
73 | ||
74 | ||
289cc637 | 75 | Bool_t TestEvent(Int_t nevent, Int_t sm); //test the fast approach to fill array - used for test purposes |
76 | Bool_t TestEventHisto(Int_t nevent, Int_t sm); //test the fast approach to fill histograms | |
170c35f1 | 77 | |
78 | private: | |
79 | ||
f162af62 | 80 | // Geometry |
81 | AliTRDgeometry *fGeo; //! The TRD geometry | |
82 | ||
170c35f1 | 83 | Int_t fAdcMin; // min adc channel of pedestal value |
84 | Int_t fAdcMax; // max adc channel of pedestal value | |
85 | Int_t fDetector; // Current detector | |
cf46274d | 86 | Int_t fNumberOfTimeBins; // Current number of time bins |
170c35f1 | 87 | |
88 | TObjArray fCalArrayEntries; // Array of AliTRDarrayF class calibration | |
89 | TObjArray fCalArrayMean; // Array of AliTRDarrayF class calibration | |
90 | TObjArray fCalArraySquares; // Array of AliTRDarrayF class calibration | |
91 | TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration | |
92 | TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration | |
93 | ||
94 | TObjArray fHistoArray; // Array of histos for mean width calibration | |
95 | ||
96 | AliTRDarrayF *fCalEntries; // Current AliTRDArrayF entries | |
97 | AliTRDarrayF *fCalMean; // Current AliTRDArrayF Mean | |
98 | AliTRDarrayF *fCalSquares; // Current AliTRDArrayF Squares | |
99 | ||
cf46274d | 100 | AliTRDarrayF* GetCal(Int_t det, TObjArray* arr, Bool_t force); |
101 | AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force); | |
102 | ||
170c35f1 | 103 | TH2F* GetHisto(Int_t det, TObjArray *arr, |
104 | Int_t nbinsY, Float_t ymin, Float_t ymax, | |
105 | Char_t *type, Bool_t force); | |
106 | ||
107 | // Some basic geometry function | |
108 | virtual Int_t GetPlane(Int_t d) const; | |
109 | virtual Int_t GetChamber(Int_t d) const; | |
110 | virtual Int_t GetSector(Int_t d) const; | |
111 | ||
3a0f6479 | 112 | public: |
170c35f1 | 113 | |
3a0f6479 | 114 | ClassDef(AliTRDCalibPadStatus,1) |
170c35f1 | 115 | |
3a0f6479 | 116 | }; |
170c35f1 | 117 | #endif |
118 |