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 ///////////////////////////////////////////////////////////////////////////////
22 class AliTRDCalPadStatus;
23 class AliTRDrawStreamBase;
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(AliTRDrawStreamBase *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);
43 Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
44 const Int_t signal, const Int_t crowMax, const Int_t ccold, const Int_t icMcm);
47 AliTRDCalPadStatus *CreateCalPadStatus();
48 AliTRDCalPad *CreateCalPad();
49 AliTRDCalDet *CreateCalDet() const;
51 void SetCalRocMean(AliTRDCalROC *mean, Int_t det);
52 void SetCalRocRMS(AliTRDCalROC *rms, Int_t det);
54 void SetCalRocMeand(AliTRDCalROC *mean, Int_t det);
55 void SetCalRocRMSd(AliTRDCalROC *rms, Int_t det);
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 AliTRDCalROC* GetCalRocMeand(Int_t det, Bool_t force=kFALSE); // get calibration object
62 AliTRDCalROC* GetCalRocRMSd(Int_t det, Bool_t force=kFALSE); // get calibration object
64 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
66 void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE);
68 Int_t GetAdcMin() const { return fAdcMin; }
69 Int_t GetAdcMax() const { return fAdcMax; }
71 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
74 Bool_t TestEventHisto(Int_t nevent, Int_t sm, Int_t ch); //test the fast approach to fill histograms
79 AliTRDgeometry *fGeo; //! The TRD geometry
81 Int_t fAdcMin; // min adc channel of pedestal value
82 Int_t fAdcMax; // max adc channel of pedestal value
83 Int_t fDetector; // Current detector
84 Int_t fNumberOfTimeBins; // Current number of time bins
86 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
87 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
89 TObjArray fCalRocArrayMeand; // Array of AliTRDCalROC class for signal width calibration doubled
90 TObjArray fCalRocArrayRMSd; // Array of AliTRDCalROC class for mean width calibration doubled
92 TObjArray fHistoArray; // Array of histos for mean width calibration
95 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
97 TH2F* GetHisto(Int_t det, TObjArray *arr,
98 Int_t nbinsY, Float_t ymin, Float_t ymax,
99 const Char_t *type, Bool_t force);
101 // Some basic geometry function
102 virtual Int_t GetLayer(Int_t d) const;
103 virtual Int_t GetStack(Int_t d) const;
104 virtual Int_t GetSector(Int_t d) const;
106 ClassDef(AliTRDCalibPadStatus,1)