00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef TGO4FITPARSLIST_H
00017 #define TGO4FITPARSLIST_H
00018
00019 #include "TGo4FitNamed.h"
00020
00021 #include "TOrdCollection.h"
00022
00023 class TGo4FitParameter;
00024
00030 class TGo4FitParsList: public TGo4FitNamed {
00031 public:
00032
00036 TGo4FitParsList();
00037
00041 TGo4FitParsList(Bool_t IsParsOwned);
00042
00046 TGo4FitParsList(const char* Name, const char* Title, Bool_t IsParsOwned);
00047
00051 virtual ~TGo4FitParsList();
00052
00056 virtual Int_t NumPars() { return fxPars.GetSize(); }
00057
00062 TGo4FitParameter* GetPar(Int_t n) { return Get(n); }
00063
00068 Int_t GetParIndex(const TGo4FitParameter* par);
00069
00074 TGo4FitParameter* FindPar(const char* ParName) { return Find(ParName); }
00075
00080 TGo4FitParameter* FindPar(const char* OwnerFullName, const char* ParName) { return Find(OwnerFullName,ParName); }
00081
00086 TGo4FitParameter* FindPar(TGo4FitParameter* par) { return Find(par); }
00087
00092 Double_t GetParValue(const char* ParName);
00093
00098 Bool_t SetParValue(const char* ParName, Double_t iValue);
00099
00104 void GetParsValues(Double_t* pars);
00105
00109 void SetParsValues(Double_t* pars);
00110
00115 Double_t GetParError(const char* ParName);
00116
00121 Bool_t SetParError(const char* ParName, Double_t iError);
00122
00126 virtual Bool_t SetParFixed(const char* ParName, Bool_t iFixed = kTRUE);
00127
00132 virtual Bool_t GetParFixed(const char* ParName);
00133
00137 Int_t NumFixedPars();
00138
00142 Int_t NumFreePars();
00143
00148 virtual Bool_t SetParRange(const char* ParName, Double_t RangeMin, Double_t RangeMax);
00149
00154 virtual Bool_t GetParRange(const char* ParName, Double_t& RangeMin, Double_t& RangeMax);
00155
00160 virtual Bool_t SetParEpsilon(const char* ParName, Double_t Epsilon);
00161
00166 virtual Bool_t GetParEpsilon(const char* ParName, Double_t& Epsilon);
00167
00171 void SetParName(Int_t n, const char* name);
00172
00177 const char* GetParName(Int_t n);
00178
00183 const char* GetParFullName(Int_t n);
00184
00191 void SetParsNames(const char* name0 = "Par0", const char* name1 = "Par1",
00192 const char* name2 = "Par2", const char* name3 = "Par3",
00193 const char* name4 = "Par4", const char* name5 = "Par5",
00194 const char* name6 = "Par6", const char* name7 = "Par7",
00195 const char* name8 = "Par8", const char* name9 = "Par9");
00196
00203 void SetParsValues(Double_t par0 = 0., Double_t par1 = 0., Double_t par2 = 0., Double_t par3 = 0., Double_t par4 = 0.,
00204 Double_t par5 = 0., Double_t par6 = 0., Double_t par7 = 0., Double_t par8 = 0., Double_t par9 = 0.);
00205
00210 virtual void MemorizePars();
00211
00215 virtual bool CanRollbackPars() { return fbCanRollbackPars; }
00216
00220 virtual void RememberPars();
00221
00225 Bool_t IsAllParsFixed();
00226
00231 TGo4FitParameter* CreatePar(const char* ParName, const char* Title, Double_t iValue = 0);
00232
00238 Bool_t RemovePar(const char* name);
00239
00245 Bool_t RemovePar(TGo4FitParameter* par);
00246
00251 virtual void Print(Option_t* option) const;
00252
00256 void PrintPars() const;
00257
00262 virtual void CollectParsTo(TGo4FitParsList & list);
00263
00268 void ClearPars();
00269
00270 protected:
00271 TGo4FitParameter* AddPar(TGo4FitParameter* par);
00272 TGo4FitParameter* InsertPar(TGo4FitParameter* par, Int_t indx);
00273 void SetParsOwner(TGo4FitNamed* iOwner);
00274
00275 void ClearParsBlocking();
00276
00277 virtual TGo4FitParameter* Get(Int_t n) { return (n>=0) && (n<NumPars()) ? (TGo4FitParameter*) fxPars.At(n) : 0 ; }
00278 TGo4FitParameter* Find(const char* ParName);
00279 TGo4FitParameter* Find(const char* OwnerFullName, const char* ParName);
00280 TGo4FitParameter* Find(TGo4FitParameter* par);
00281 Bool_t RemoveParByIndex(Int_t indx);
00282
00283 private:
00284 TOrdCollection fxPars;
00285
00289 Bool_t fbCanRollbackPars;
00290
00294
00295 ClassDef(TGo4FitParsList,1)
00296 };
00297 #endif // TGO4FITPARSLIST_H
00298
00299