1 #ifndef ALITRDCALIBPADSTATUS_H
2 #define ALITRDCALIBPADSTATUS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////////////////////
10 // TRD calibration class for online calibration //
12 ///////////////////////////////////////////////////////////////////////////////
16 class TTreeSRedirector;
21 class AliTRDCalPadStatus;
22 class AliTRDRawStream;
26 struct eventHeaderStruct;
28 class AliTRDCalibPadStatus : public TObject {
32 AliTRDCalibPadStatus();
33 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
34 virtual ~AliTRDCalibPadStatus();
36 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
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);
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);
49 AliTRDCalPadStatus *CreateCalPadStatus();
51 void SetCalRocMean(AliTRDCalROC *mean, Int_t det);
52 void SetCalRocRMS(AliTRDCalROC *rms, Int_t det);
55 AliTRDarrayF* GetCalEntries(Int_t det, Bool_t force=kFALSE); // get calibration object
56 AliTRDarrayF* GetCalMean(Int_t det, Bool_t force=kFALSE); // get calibration object
57 AliTRDarrayF* GetCalSquares(Int_t det, Bool_t force=kFALSE); // get calibration object
58 AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object
59 AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object
61 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
63 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
65 Int_t GetAdcMin() const { return fAdcMin; }
66 Int_t GetAdcMax() const { return fAdcMax; }
68 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
71 Bool_t TestEvent(Int_t nevent); //test the fast approach to fill array - used for test purposes
72 Bool_t TestEventHisto(Int_t nevent); //test the fast approach to fill histograms
77 AliTRDgeometry *fGeo; //! The TRD geometry
79 Int_t fAdcMin; // min adc channel of pedestal value
80 Int_t fAdcMax; // max adc channel of pedestal value
81 Int_t fDetector; // Current detector
82 Int_t fNumberOfTimeBins; // Current number of time bins
84 TObjArray fCalArrayEntries; // Array of AliTRDarrayF class calibration
85 TObjArray fCalArrayMean; // Array of AliTRDarrayF class calibration
86 TObjArray fCalArraySquares; // Array of AliTRDarrayF class calibration
87 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
88 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
90 TObjArray fHistoArray; // Array of histos for mean width calibration
92 AliTRDarrayF *fCalEntries; // Current AliTRDArrayF entries
93 AliTRDarrayF *fCalMean; // Current AliTRDArrayF Mean
94 AliTRDarrayF *fCalSquares; // Current AliTRDArrayF Squares
96 AliTRDarrayF* GetCal(Int_t det, TObjArray* arr, Bool_t force);
97 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
99 TH2F* GetHisto(Int_t det, TObjArray *arr,
100 Int_t nbinsY, Float_t ymin, Float_t ymax,
101 Char_t *type, Bool_t force);
103 // Some basic geometry function
104 virtual Int_t GetPlane(Int_t d) const;
105 virtual Int_t GetChamber(Int_t d) const;
106 virtual Int_t GetSector(Int_t d) const;
110 ClassDef(AliTRDCalibPadStatus,1)