GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
21class TGo4FitData;
22class TH1;
23
48 public:
49
54
59 TGo4FitModelFromData(const char *iName, TGo4FitData *iDataAsModel = nullptr, Bool_t Amplitude = kTRUE);
60
66 TGo4FitModelFromData(const char *iName, TH1 *, Bool_t iOwned = kFALSE, Bool_t Amplitude = kTRUE);
67
72
77
81 void SetDataAsModel(TGo4FitData *iData, Bool_t iOwned);
82
86 void FillSlotList(TSeqCollection *list) override;
87
91 void Print(Option_t *option = "") const override;
92
93 Bool_t BeforeEval(Int_t) override;
94 Double_t EvalN(const Double_t*) override { return 0.; }
95 void AfterEval() override;
96
97 Double_t EvaluateAtPoint(TGo4FitData *data, Int_t nbin, Bool_t UseRanges = kTRUE) override;
98 Double_t EvaluateAtPoint(std::unique_ptr<TGo4FitDataIter> &iter, Bool_t UseRanges = kTRUE) override;
99
100 protected:
101
105 Bool_t Initialize(Int_t UseBuffers = -1) override;
106
107 Double_t FindDataPoint(Int_t NumIndexes, const Int_t *Indexes);
108
113
114 private:
115 std::unique_ptr<TGo4FitDataIter> fxIter;
116
117 ClassDefOverride(TGo4FitModelFromData,1)
118};
119#endif // TGO4FITMODELFROMDATA_H
Basic abstract class for representing data, which should be fitted.
Definition TGo4FitData.h:39
~TGo4FitModelFromData()
Destroy TGo4FitModelFromData object.
void AfterEval() override
Clear buffers, which were created by BeforeEval() method.
Bool_t Initialize(Int_t UseBuffers=-1) override
Initialize object.
void FillSlotList(TSeqCollection *list) override
Add pointer on slot, which should contain TGo4FitData object, to a slots list.
Double_t EvalN(const Double_t *) override
Calculates value of model according current parameters values and provided axes values.
TGo4FitModelFromData()
Default constructor.
void SetDataAsModel(TGo4FitData *iData, Bool_t iOwned)
Sets pointer on TGo4FitData object with ownership flag.
Bool_t BeforeEval(Int_t) override
Prepares (if necessary) some intermediate variables to be able calculate values of model via EvalN() ...
Double_t FindDataPoint(Int_t NumIndexes, const Int_t *Indexes)
void Print(Option_t *option="") const override
Print information on standard output.
std::unique_ptr< TGo4FitDataIter > fxIter
Double_t EvaluateAtPoint(TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE) override
Evaluate model value for specified data point.
TGo4FitData * GetDataAsModel() const
Return pointer on TGo4FitData object, which is used as model component.
TGo4FitSlot fxData
Slot for TGo4FitData object, which is used as model component.
TGo4FitModel()
Default constructor.
Managing pointers on specific objects.
Definition TGo4FitSlot.h:28