]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - TRD/AliTRDCalibPadStatus.h
AliDCSClient "multiSplit" option added in the DCS configuration
[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;
16class TTreeSRedirector;
17
18class AliRawReader;
19
20class AliTRDCalDet;
21class AliTRDCalPad;
22class AliTRDCalROC;
23class AliTRDCalPadStatus;
24class AliTRDRawStreamV2;
25class AliTRDarrayF;
26class AliTRDgeometry;
27
28struct eventHeaderStruct;
29
30class AliTRDCalibPadStatus : public TObject {
31
32public:
33
34 AliTRDCalibPadStatus();
35 AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped);
36 virtual ~AliTRDCalibPadStatus();
37
38 AliTRDCalibPadStatus& operator = (const AliTRDCalibPadStatus &source);
39
40 Int_t ProcessEvent(AliTRDRawStreamV2 *rawStream, Bool_t nocheck = kFALSE);
41 Int_t ProcessEvent(AliRawReader *rawReader, Bool_t nocheck = kFALSE);
42 Int_t ProcessEvent(eventHeaderStruct *event, Bool_t nocheck = kFALSE);
43
44 Int_t Update(const Int_t idet, const Int_t iRow, const Int_t iCol,
45 const Int_t signal, const Int_t rowMax);
46 Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
47 const Int_t signal, const Int_t crowMax);
48
49 void Analyse();
50 void AnalyseHisto();
51 AliTRDCalPadStatus *CreateCalPadStatus();
52 AliTRDCalPad *CreateCalPad();
53 AliTRDCalDet *CreateCalDet();
54
55 void SetCalRocMean(AliTRDCalROC *mean, Int_t det);
56 void SetCalRocRMS(AliTRDCalROC *rms, Int_t det);
57
58 //
59 AliTRDarrayF* GetCalEntries(Int_t det, Bool_t force=kFALSE); // get calibration object
60 AliTRDarrayF* GetCalMean(Int_t det, Bool_t force=kFALSE); // get calibration object
61 AliTRDarrayF* GetCalSquares(Int_t det, Bool_t force=kFALSE); // get calibration object
62 AliTRDCalROC* GetCalRocMean(Int_t det, Bool_t force=kFALSE); // get calibration object
63 AliTRDCalROC* GetCalRocRMS(Int_t det, Bool_t force=kFALSE); // get calibration object
64
65 TH2F* GetHisto (Int_t det, Bool_t force=kFALSE); // get refernce histogram
66
67 void DumpToFile(const Char_t *filename, const Char_t *dir="", const Bool_t append=kFALSE);
68 //
69 Int_t GetAdcMin() const { return fAdcMin; }
70 Int_t GetAdcMax() const { return fAdcMax; }
71
72 void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range
73
74
75 Bool_t TestEvent(Int_t nevent, Int_t sm); //test the fast approach to fill array - used for test purposes
76 Bool_t TestEventHisto(Int_t nevent, Int_t sm); //test the fast approach to fill histograms
77
78private:
79
80 // Geometry
81 AliTRDgeometry *fGeo; //! The TRD geometry
82
83 Int_t fAdcMin; // min adc channel of pedestal value
84 Int_t fAdcMax; // max adc channel of pedestal value
85 Int_t fDetector; // Current detector
86 Int_t fNumberOfTimeBins; // Current number of time bins
87
88 TObjArray fCalArrayEntries; // Array of AliTRDarrayF class calibration
89 TObjArray fCalArrayMean; // Array of AliTRDarrayF class calibration
90 TObjArray fCalArraySquares; // Array of AliTRDarrayF class calibration
91 TObjArray fCalRocArrayMean; // Array of AliTRDCalROC class for signal width calibration
92 TObjArray fCalRocArrayRMS; // Array of AliTRDCalROC class for mean width calibration
93
94 TObjArray fHistoArray; // Array of histos for mean width calibration
95
96 AliTRDarrayF *fCalEntries; // Current AliTRDArrayF entries
97 AliTRDarrayF *fCalMean; // Current AliTRDArrayF Mean
98 AliTRDarrayF *fCalSquares; // Current AliTRDArrayF Squares
99
100 AliTRDarrayF* GetCal(Int_t det, TObjArray* arr, Bool_t force);
101 AliTRDCalROC* GetCalRoc(Int_t det, TObjArray* arr, Bool_t force);
102
103 TH2F* GetHisto(Int_t det, TObjArray *arr,
104 Int_t nbinsY, Float_t ymin, Float_t ymax,
105 Char_t *type, Bool_t force);
106
107 // Some basic geometry function
108 virtual Int_t GetPlane(Int_t d) const;
109 virtual Int_t GetChamber(Int_t d) const;
110 virtual Int_t GetSector(Int_t d) const;
111
112public:
113
114 ClassDef(AliTRDCalibPadStatus,1)
115
116};
117#endif
118