GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitModelFromData.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4FITMODELFROMDATA_H
15 #define TGO4FITMODELFROMDATA_H
16 
17 #include "TGo4FitModel.h"
18 
19 #include "TGo4FitSlot.h"
20 
21 class TGo4FitData;
22 class TH1;
23 
42  public:
43 
48 
53  TGo4FitModelFromData(const char *iName, TGo4FitData *iDataAsModel = nullptr, Bool_t Amplitude = kTRUE);
54 
60  TGo4FitModelFromData(const char *iName, TH1 *, Bool_t iOwned = kFALSE, Bool_t Amplitude = kTRUE);
61 
66 
70  TGo4FitData *GetDataAsModel() const;
71 
75  void SetDataAsModel(TGo4FitData *iData, Bool_t iOwned);
76 
80  void FillSlotList(TSeqCollection *list) override;
81 
85  void Print(Option_t *option = "") const override;
86 
87  Bool_t BeforeEval(Int_t) override;
88  Double_t EvalN(const Double_t*) override { return 0.; }
89  void AfterEval() override;
90 
91  Double_t EvaluateAtPoint(TGo4FitData *data, Int_t nbin, Bool_t UseRanges = kTRUE) override;
92  Double_t EvaluateAtPoint(std::unique_ptr<TGo4FitDataIter> &iter, Bool_t UseRanges = kTRUE) override;
93 
94  protected:
95 
99  Bool_t Initialize(Int_t UseBuffers = -1) override;
100 
101  Double_t FindDataPoint(Int_t NumIndexes, const Int_t *Indexes);
102 
108 
109  private:
110  std::unique_ptr<TGo4FitDataIter> fxIter;
111 
112  ClassDefOverride(TGo4FitModelFromData,1)
113 };
114 #endif // TGO4FITMODELFROMDATA_H
std::unique_ptr< TGo4FitDataIter > fxIter
Bool_t Initialize(Int_t UseBuffers=-1) override
Double_t EvalN(const Double_t *) override
void FillSlotList(TSeqCollection *list) override
void Print(Option_t *option="") const override
void SetDataAsModel(TGo4FitData *iData, Bool_t iOwned)
Double_t FindDataPoint(Int_t NumIndexes, const Int_t *Indexes)
Bool_t BeforeEval(Int_t) override
TGo4FitData * GetDataAsModel() const
Double_t EvaluateAtPoint(TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE) override