]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDCalibPadStatus.h
Retrieval of parameters from config file implemented
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibPadStatus.h
... / ...
CommitLineData
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 */
5
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////////////////
9// //
10// TRD calibration class for online calibration //
11// //
12///////////////////////////////////////////////////////////////////////////////
13
14class TObjArray;
15class TH2F;
16
17class AliRawReader;
18
19class AliTRDCalDet;
20class AliTRDCalPad;
21class AliTRDCalROC;
22class AliTRDCalPadStatus;
23class AliTRDrawStreamBase;
24class AliTRDgeometry;
25
26struct eventHeaderStruct;
27
28class AliTRDCalibPadStatus : public TObject {
29
30public:
31
32 AliTRDCalibPadStatus();
33 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
34 virtual ~AliTRDCalibPadStatus();
35
36 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
37
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);
41
42 Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
43 const Int_t signal, const Int_t crowMax, const Int_t ccold, const Int_t icMcm);
44
45 void AnalyseHisto();
46 AliTRDCalPadStatus *CreateCalPadStatus();
47 AliTRDCalPad *CreateCalPad();
48 AliTRDCalDet *CreateCalDet() const;
49
50 void SetCalRocMean(AliTRDCalROC *mean, Int_t det);
51 void SetCalRocRMS(AliTRDCalROC *rms, Int_t det);
52
53 void SetCalRocMeand(AliTRDCalROC *mean, Int_t det);
54 void SetCalRocRMSd(AliTRDCalROC *rms, Int_t det);
55
56 //
57 AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object
58 AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object
59
60 AliTRDCalROC* GetCalRocMeand(Int_t det, Bool_t force=kFALSE); // get calibration object
61 AliTRDCalROC* GetCalRocRMSd(Int_t det, Bool_t force=kFALSE); // get calibration object
62
63 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
64
65 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
66 //
67 Int_t GetAdcMin() const { return fAdcMin; }
68 Int_t GetAdcMax() const { return fAdcMax; }
69
70 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
71
72
73 Bool_t TestEventHisto(Int_t nevent, Int_t sm, Int_t ch); //test the fast approach to fill histograms
74
75 private:
76
77 // Geometry
78 AliTRDgeometry *fGeo; //! The TRD geometry
79
80 Int_t fAdcMin; // min adc channel of pedestal value
81 Int_t fAdcMax; // max adc channel of pedestal value
82 Int_t fDetector; // Current detector
83 Int_t fNumberOfTimeBins; // Current number of time bins
84
85 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
86 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
87
88 TObjArray fCalRocArrayMeand; // Array of AliTRDCalROC class for signal width calibration doubled
89 TObjArray fCalRocArrayRMSd; // Array of AliTRDCalROC class for mean width calibration doubled
90
91 TObjArray fHistoArray; // Array of histos for mean width calibration
92
93
94 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
95
96 TH2F* GetHisto(Int_t det, TObjArray *arr,
97 Int_t nbinsY, Float_t ymin, Float_t ymax,
98 Char_t *type, Bool_t force);
99
100 // Some basic geometry function
101 virtual Int_t GetLayer(Int_t d) const;
102 virtual Int_t GetStack(Int_t d) const;
103 virtual Int_t GetSector(Int_t d) const;
104
105 ClassDef(AliTRDCalibPadStatus,1)
106
107};
108#endif
109