Coverity fix
[u/mrichter/AliRoot.git] / TRD / TRDbase / AliTRDCalibraVdriftLinearFit.h
CommitLineData
3a0f6479 1#ifndef ALITRDCALIBRAVDRIFTLINEARFIT_H
2#define ALITRDCALIBRAVDRIFTLINEARFIT_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9///////////////////////////////////////////////////////////////////////////////
10// //
11// TRD calibration class for online calibration //
12// //
13///////////////////////////////////////////////////////////////////////////////
14
36dc3337 15//#include "TObjArray.h"
16#include "TObject.h"
d0569428 17
36dc3337 18//class TVectorD;
3a0f6479 19class TObjArray;
0ca1720e 20class TH2S;
661c7be6 21class TH2;
3a0f6479 22class TTreeSRedirector;
b2277aa2 23class TString;
661c7be6 24class TGraphErrors;
25class TLinearFitter;
26class TTreeSRedirector;
3a0f6479 27
28class AliTRDCalibraVdriftLinearFit : public TObject {
29
0bc7827a 30 public:
3a0f6479 31
32 AliTRDCalibraVdriftLinearFit();
33 AliTRDCalibraVdriftLinearFit(const AliTRDCalibraVdriftLinearFit &ped);
d0569428 34 AliTRDCalibraVdriftLinearFit(const TObjArray &obja);
3a0f6479 35 virtual ~AliTRDCalibraVdriftLinearFit();
6bbdc11a 36 virtual Long64_t Merge(const TCollection* list);
64942b85 37 virtual void Copy(TObject &c) const;
3a0f6479 38
39 AliTRDCalibraVdriftLinearFit& operator = (const AliTRDCalibraVdriftLinearFit &source);
40
41 void Update(Int_t detector, Float_t tnp, Float_t pars1);
42 void FillPEArray();
661c7be6 43 void FillPEArray2();
b2277aa2 44 void SetNameCalibUsed(const char*name) { fNameCalibUsed = name;};
45 const char* GetNameCalibUsed() const { return fNameCalibUsed;};
fe4ee353 46 void Add(const AliTRDCalibraVdriftLinearFit *ped);
0ca1720e 47 TH2S *GetLinearFitterHisto(Int_t detector, Bool_t force=kFALSE);
fe4ee353 48 TH2S *GetLinearFitterHistoForce(Int_t detector);
49 TH2S *GetLinearFitterHistoNoForce(Int_t detector) const { return (TH2S*)fLinearFitterHistoArray.UncheckedAt(detector);};
3a0f6479 50 Bool_t GetParam(Int_t detector, TVectorD *param);
51 Bool_t GetError(Int_t detector, TVectorD *error);
532be2d4 52 Int_t GetMinNumberOfPointsForFit() const { return fMinNpointsFit;};
4f3bd513 53 TH2S *AddAll();
54 TGraphErrors *DrawMS(const TH2 *const h2, Int_t &nEntries);
3a0f6479 55
0bc7827a 56 TObjArray *GetPArray() { return &fLinearFitterPArray; };
57 TObjArray *GetEArray() { return &fLinearFitterEArray; };
58 TObjArray GetHistoArray() const { return fLinearFitterHistoArray; };
2a1a7b36 59 void SetRobustFit(Bool_t robustFit) { fRobustFit = robustFit; };
532be2d4 60 void SetMinNumberOfPointsForFit(Int_t minNpointsFit) { fMinNpointsFit = minNpointsFit;};
3a0f6479 61
4f3bd513 62 void SetNbBindx(Short_t nbBindx) { fNbBindx = nbBindx; };
63 void SetNbBindy(Short_t nbBindy) { fNbBindy = nbBindy; }
64 void SetRangedx(Double_t rangedx) { fRangedx = rangedx; };
65 void SetRangedy(Double_t rangedy) { fRangedy = rangedy; };
66
661c7be6 67 // Debug
68 void SetDebugLevel(Short_t level) { fDebugLevel = level; };
69 void SetSeeDetector(Int_t seeDetector) { fSeeDetector = seeDetector; };
70
71private:
4f3bd513 72
661c7be6 73
3a0f6479 74 Int_t fVersion; // Version of the object
b2277aa2 75 TString fNameCalibUsed; // Info of the version, subversion, firstrun of the calib used
3a0f6479 76
77 TObjArray fLinearFitterHistoArray; // TObjArray of histo2D for debugging Linear Fitters
78 TObjArray fLinearFitterPArray; // Array of result parameters from linear fitters for the detectors
79 TObjArray fLinearFitterEArray; // Array of result errors from linear fitters for the detectors
2a1a7b36 80 Bool_t fRobustFit; // Robust fit or not
532be2d4 81 Int_t fMinNpointsFit; // Min number of points for the fit
82
4f3bd513 83 Short_t fNbBindx; // Nb of bin in x
84 Short_t fNbBindy; // Nb of bin in y
85 Double_t fRangedx; // Range in x
86 Double_t fRangedy; // Range in y
87
88
661c7be6 89 //For debugging
90 TTreeSRedirector *fDebugStreamer; //!Debug streamer
91 Short_t fDebugLevel; // Flag for debugging
92 Int_t fSeeDetector; // Detector to see
93
4f3bd513 94 ClassDef(AliTRDCalibraVdriftLinearFit,5) // Online Vdrift calibration
3a0f6479 95
96};
97
98
99
100#endif
a5dcf618 101