22 #include "TApplication.h" 23 #include "TCollection.h" 35 int main(
int argc,
char **argv)
37 TApplication theApp(
"Application",
nullptr,
nullptr);
51 TFile *f = TFile::Open(
"histograms.root");
52 if (!f)
return nullptr;
53 TH1D *histo =
nullptr;
54 f->GetObject(HistogramName, histo);
55 if (histo) histo->SetDirectory(
nullptr);
107 config->
SetParDepend(
"Gauss1_2.Width",
"Gauss1_1.Width");
109 config->
SetParDepend(
"Gauss2_2.Width",
"Gauss2_1.Width");
125 TFile *f = TFile::Open(
"Example6.root",
"recreate");
126 if (f) fitter->Write(
"Fitter");
133 TFile *f = TFile::Open(
"Example6.root");
134 if (!f)
return nullptr;
136 f->GetObject(
"Fitter", fitter);
169 fitter->
Draw(
"#data1,Gauss1_1,Gauss2_1");
170 fitter->
Draw(
"#data2,Gauss1_2,Gauss2_2,Gauss3_2,Gauss4_2");
TGo4FitSlot * SetObject(TObject *obj, Bool_t iOwned=kFALSE)
void SetMemoryUsage(Int_t iMemoryUsage)
int main(int argc, char **argv)
TH1D * GetHistogram(const char *HistogramName)
void AddAction(TGo4FitterAction *Action)
void SetParDepend(const char *FullName, const char *iExpression)
TGo4FitData * AddData(TGo4FitData *d)
void SetCoefByRange(Int_t nbins, Double_t y1, Double_t y2)
void SetRange(Int_t naxis, Double_t min, Double_t max)
void SetParInit(const char *FullName, Double_t iValue)
TGo4FitAxisTrans * ConstructTrans()
TGo4Fitter * BuildFitter()
TGo4FitModel * AddModel(TGo4FitModel *m)
void SetUseBinScale(Bool_t iUseBinScale)
void AddAxisTrans(TGo4FitAxisTrans *Trans, Bool_t TransOwned=kFALSE)
void StoreFitter(TGo4Fitter *fitter)
TGo4FitData * FindData(const char *DataName)
void DoActions(Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr)
void Draw(Option_t *option) override
TGo4Fitter * RestoreFitter()
void AddStandardActions()