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