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