24 fxData(
"forModel",
"Data, used to represent model component", this,
TGo4FitData::Class(), kTRUE, iDataAsModel,
31 fxData(
"forModel",
"Data, used to represent model component", this,
TGo4FitData::Class(), kTRUE)
47 fxData.SetObject(iData, iOwned);
59 std::cout <<
"TGo4FitModelFromData: incompatible data used for model" << std::endl;
75 return fxIter->Reset(kFALSE);
85 return iter ?
FindDataPoint(iter->IndexesSize(), iter->Indexes()) : 0.;
104 std::cout <<
"Model driven from data" << std::endl;
111 if (!
fxIter ||
fxIter->ReachEnd() || !Indexes || (NumIndexes !=
fxIter->IndexesSize()))
113 Int_t num = NumIndexes - 1;
115 if (
fxIter->Indexes()[num] == Indexes[num]) {
118 }
else if (
fxIter->Indexes()[num] > Indexes[num])
120 else if (!
fxIter->Next(kFALSE))
Data objects, which provides access to generic TH1 ROOT histogram.
Basic abstract class for representing data, which should be fitted.
void FillSlotList(TSeqCollection *list) override
Copy pointers on all slots of data object to list.
virtual std::unique_ptr< TGo4FitDataIter > MakeIter()
Creates iterator for data object.
void Print(Option_t *option="") const override
Display information about data object on standard output.
~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.
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.
virtual Bool_t Initialize(Int_t UseBuffers=-1)
Initialize model object.
void Print(Option_t *option="") const override
Print information about model object on standard output.
Int_t GetDataIndexesSize(TGo4FitData *data)
const Int_t * GetDataFullIndex(TGo4FitData *data, Int_t nbin)
TGo4FitModel()
Default constructor.
TGo4FitData * GetAssignedConnection(Int_t n)
Return pointer on assigned data.
Int_t NumAssigments() const
Returns number of assignment for this model.
virtual void FillSlotList(TSeqCollection *lst)
Fill list of TGo4FitSlot objects to provided collection.
void SetUpdateSlotList()
Update internal list of slots (if exists).