16 #include "Riostream.h"
34 fxPars.SetOwner(IsParsOwned);
38 TGo4FitNamed(Name,Title), fxPars(), fbCanRollbackPars(kFALSE)
40 fxPars.SetOwner(IsParsOwned);
50 if(
GetPar(i)==par)
return i;
64 if(par) { par->
SetValue(iValue);
return kTRUE; }
91 if(par) { par->
SetError(iError);
return kTRUE; }
98 if(par) { par->
SetFixed(iFixed);
return kTRUE; }
112 for (Int_t n=0; n<
NumPars(); n++)
126 if(par) { par->
SetRange(RangeMin,RangeMax);
return kTRUE; }
133 if(par)
return par->
GetRange(RangeMin,RangeMax);
140 if(par) { par->
SetEpsilon(Epsilon);
return kTRUE; }
153 if(
Get(n))
Get(n)->SetName(name);
158 if(
Get(n))
return Get(n)->GetName();
169 const char* name5,
const char* name6,
const char* name7,
const char* name8,
const char* name9) {
183 Double_t par5, Double_t par6, Double_t par7, Double_t par8, Double_t par9) {
220 std::cout <<
" List of parameters:" << std::endl;
221 for(Int_t n=0;n<lst->
NumPars();n++)
228 std::cout << std::endl <<
"*** LIST OF PARAMETERS VALUE ***" << std::endl;
233 for(Int_t np=0;np<l->
NumPars();np++) {
235 if (len>maxparlen) maxparlen = len;
238 TString tt = TString::Format(
"%s%ds %s%s %s%s",
"%",maxparlen,
"%",gStyle->GetStatFormat(),
"%",gStyle->GetStatFormat());
240 for(Int_t n=0;n<l->
NumPars();n++)
253 else return Find(ParName);
259 if (strcmp(
Get(i)->GetName(),ParName)==0)
return Get(i);
269 for(Int_t i=0;i<
NumPars();i++) {
273 (strcmp(par->GetName(),ParName)==0) )
return par;
281 if (
Get(i)==par)
return par;
298 if (
fxPars.FindObject(par)) {
301 if (
fxPars.IsOwner())
delete par;
303 }
else return kFALSE;
308 for(Int_t i=0;i<
NumPars();i++) {
337 if (indx<0)
fxPars.AddLast(par);
338 else fxPars.AddAt(par,indx);
344 void TGo4FitParsList::Streamer(TBuffer& b)
347 TGo4FitParsList::Class()->ReadBuffer(b,
this);
355 TGo4FitParsList::Class()->WriteBuffer(b,
this);
Bool_t SetParValue(const char *ParName, Double_t iValue)
void SetParsNames(const char *name0="Par0", const char *name1="Par1", const char *name2="Par2", const char *name3="Par3", const char *name4="Par4", const char *name5="Par5", const char *name6="Par6", const char *name7="Par7", const char *name8="Par8", const char *name9="Par9")
TGo4FitParameter * InsertPar(TGo4FitParameter *par, Int_t indx)
virtual Bool_t SetParFixed(const char *ParName, Bool_t iFixed=kTRUE)
void SetParName(Int_t n, const char *name)
Double_t GetParError(const char *ParName)
TGo4FitParameter * CreatePar(const char *ParName, const char *Title, Double_t iValue=0)
virtual Bool_t GetParEpsilon(const char *ParName, Double_t &Epsilon)
TGo4FitParameter * GetPar(Int_t n)
virtual void MemorizePars()
Bool_t GetRange(Double_t &min, Double_t &max) const
virtual void Print(Option_t *option) const
const char * GetFullName()
void SetParsOwner(TGo4FitNamed *iOwner)
void SetOwner(TNamed *iOwner)
virtual Bool_t SetParRange(const char *ParName, Double_t RangeMin, Double_t RangeMax)
Bool_t SetParError(const char *ParName, Double_t iError)
virtual Bool_t SetParEpsilon(const char *ParName, Double_t Epsilon)
Bool_t RemovePar(const char *name)
const char * GetParFullName(Int_t n)
TGo4FitParameter * FindPar(const char *ParName)
Double_t GetError() const
Bool_t GetEpsilon(Double_t &eps) const
virtual Bool_t GetParRange(const char *ParName, Double_t &RangeMin, Double_t &RangeMax)
TGo4FitParameter * Find(const char *ParName)
virtual void Print(Option_t *option) const
Bool_t RemoveParByIndex(Int_t indx)
Int_t GetParIndex(const TGo4FitParameter *par)
virtual Bool_t GetParFixed(const char *ParName)
void SetValue(Double_t iValue)
Double_t GetValue() const
virtual void RememberPars()
virtual ~TGo4FitParsList()
const char * GetOwnerFullName()
void SetEpsilon(Double_t iEpsilon)
virtual TGo4FitParameter * Get(Int_t n)
void SetFixed(Bool_t iFixed)
void GetParsValues(Double_t *pars)
virtual void CollectParsTo(TGo4FitParsList &list)
TGo4FitParameter * AddPar(TGo4FitParameter *par)
void SetRange(Double_t iRangeMin, Double_t iRangeMax)
Double_t GetParValue(const char *ParName)
const char * GetParName(Int_t n)
void SetError(Double_t iError)
void SetParsValues(Double_t *pars)