1 #ifndef ALITPCCALIBPEDESTAL_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;
18 class AliTRDCalPadStatus;
19 class AliTRDRawStream;
22 struct eventHeaderStruct;
24 class AliTRDCalibPadStatus : public TObject {
28 AliTRDCalibPadStatus();
29 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
30 virtual ~AliTRDCalibPadStatus();
32 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
34 Bool_t ProcessEvent(AliTRDRawStream *rawStream);
35 Bool_t ProcessEvent(AliRawReader *rawReader);
36 Bool_t ProcessEvent(eventHeaderStruct *event);
38 Int_t Update(const Int_t idet, const Int_t iRow, const Int_t iCol,
39 const Int_t signal, const Int_t rowMax);
40 Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
41 const Int_t signal, const Int_t crowMax);
44 AliTRDCalPadStatus *CreateCalPadStatus();
46 AliTRDarrayF* GetCalEntries(Int_t det, Bool_t force=kFALSE); // get calibration object
47 AliTRDarrayF* GetCalMean(Int_t det, Bool_t force=kFALSE); // get calibration object
48 AliTRDarrayF* GetCalSquares(Int_t det, Bool_t force=kFALSE); // get calibration object
49 AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object
50 AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object
52 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
54 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
56 Int_t GetAdcMin() const { return fAdcMin; }
57 Int_t GetAdcMax() const { return fAdcMax; }
59 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
62 Bool_t TestEvent(Int_t nevent); //test the fast approach to fill array - used for test purposes
63 Bool_t TestEventHisto(Int_t nevent); //test the fast approach to fill histograms
67 Int_t fAdcMin; // min adc channel of pedestal value
68 Int_t fAdcMax; // max adc channel of pedestal value
69 Int_t fDetector; // Current detector
71 TObjArray fCalArrayEntries; // Array of AliTRDarrayF class calibration
72 TObjArray fCalArrayMean; // Array of AliTRDarrayF class calibration
73 TObjArray fCalArraySquares; // Array of AliTRDarrayF class calibration
74 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
75 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
77 TObjArray fHistoArray; // Array of histos for mean width calibration
79 AliTRDarrayF *fCalEntries; // Current AliTRDArrayF entries
80 AliTRDarrayF *fCalMean; // Current AliTRDArrayF Mean
81 AliTRDarrayF *fCalSquares; // Current AliTRDArrayF Squares
83 AliTRDarrayF* GetCalEntries(Int_t det, TObjArray* arr, Bool_t force);
84 AliTRDarrayF* GetCalMean(Int_t det, TObjArray* arr, Bool_t force);
85 AliTRDarrayF* GetCalSquares(Int_t det, TObjArray* arr, Bool_t force);
86 AliTRDCalROC* GetCalRocMean(Int_t det, TObjArray* arr, Bool_t force);
87 AliTRDCalROC* GetCalRocRMS(Int_t det, TObjArray* arr, Bool_t force);
89 TH2F* GetHisto(Int_t det, TObjArray *arr,
90 Int_t nbinsY, Float_t ymin, Float_t ymax,
91 Char_t *type, Bool_t force);
93 // Some basic geometry function
94 virtual Int_t GetPlane(Int_t d) const;
95 virtual Int_t GetChamber(Int_t d) const;
96 virtual Int_t GetSector(Int_t d) const;
100 ClassDef(AliTRDCalibPadStatus,1)