Small update by Raphaelle AliTRDCalibPadStatus (some functions less
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibPadStatus.h
CommitLineData
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
14class TObjArray;
15class TH2F;
16class TTreeSRedirector;
17class AliTRDCalROC;
18class AliTRDCalPadStatus;
19class AliTRDRawStream;
20class AliTRDarrayF;
21class AliRawReader;
22struct eventHeaderStruct;
23
24class AliTRDCalibPadStatus : public TObject {
25
26public:
27
28 AliTRDCalibPadStatus();
29 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
30 virtual ~AliTRDCalibPadStatus();
31
32 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
33
cf46274d 34 Bool_t ProcessEvent(AliTRDRawStream *rawStream, Bool_t nocheck = kFALSE);
35 Bool_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE);
36 Bool_t ProcessEvent(eventHeaderStruct *event, Bool_t nocheck = kFALSE);
170c35f1 37
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);
42 void Analyse();
43 void AnalyseHisto();
44 AliTRDCalPadStatus *CreateCalPadStatus();
45 //
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
51
52 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
53
54 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
55 //
56 Int_t GetAdcMin() const { return fAdcMin; }
57 Int_t GetAdcMax() const { return fAdcMax; }
58
59 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
60
61
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
64
65private:
66
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
cf46274d 70 Int_t fNumberOfTimeBins; // Current number of time bins
170c35f1 71
72 TObjArray fCalArrayEntries; // Array of AliTRDarrayF class calibration
73 TObjArray fCalArrayMean; // Array of AliTRDarrayF class calibration
74 TObjArray fCalArraySquares; // Array of AliTRDarrayF class calibration
75 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
76 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
77
78 TObjArray fHistoArray; // Array of histos for mean width calibration
79
80 AliTRDarrayF *fCalEntries; // Current AliTRDArrayF entries
81 AliTRDarrayF *fCalMean; // Current AliTRDArrayF Mean
82 AliTRDarrayF *fCalSquares; // Current AliTRDArrayF Squares
83
cf46274d 84 AliTRDarrayF* GetCal(Int_t det, TObjArray* arr, Bool_t force);
85 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
86
170c35f1 87 TH2F* GetHisto(Int_t det, TObjArray *arr,
88 Int_t nbinsY, Float_t ymin, Float_t ymax,
89 Char_t *type, Bool_t force);
90
91 // Some basic geometry function
92 virtual Int_t GetPlane(Int_t d) const;
93 virtual Int_t GetChamber(Int_t d) const;
94 virtual Int_t GetSector(Int_t d) const;
95
96public:
97
98 ClassDef(AliTRDCalibPadStatus,1)
99
100};
101
102
103
104#endif
105