Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4FITPARSLIST_H
00015 #define TGO4FITPARSLIST_H
00016
00017 #include "TGo4FitNamed.h"
00018
00019 #include "TOrdCollection.h"
00020
00021 class TGo4FitParameter;
00022
00028 class TGo4FitParsList: public TGo4FitNamed {
00029 public:
00030
00034 TGo4FitParsList();
00035
00039 TGo4FitParsList(Bool_t IsParsOwned);
00040
00044 TGo4FitParsList(const char* Name, const char* Title, Bool_t IsParsOwned);
00045
00049 virtual ~TGo4FitParsList();
00050
00054 virtual Int_t NumPars() { return fxPars.GetSize(); }
00055
00060 TGo4FitParameter* GetPar(Int_t n) { return Get(n); }
00061
00066 Int_t GetParIndex(const TGo4FitParameter* par);
00067
00072 TGo4FitParameter* FindPar(const char* ParName) { return Find(ParName); }
00073
00078 TGo4FitParameter* FindPar(const char* OwnerFullName, const char* ParName) { return Find(OwnerFullName,ParName); }
00079
00084 TGo4FitParameter* FindPar(TGo4FitParameter* par) { return Find(par); }
00085
00090 Double_t GetParValue(const char* ParName);
00091
00096 Bool_t SetParValue(const char* ParName, Double_t iValue);
00097
00102 void GetParsValues(Double_t* pars);
00103
00107 void SetParsValues(Double_t* pars);
00108
00113 Double_t GetParError(const char* ParName);
00114
00119 Bool_t SetParError(const char* ParName, Double_t iError);
00120
00124 virtual Bool_t SetParFixed(const char* ParName, Bool_t iFixed = kTRUE);
00125
00130 virtual Bool_t GetParFixed(const char* ParName);
00131
00135 Int_t NumFixedPars();
00136
00140 Int_t NumFreePars();
00141
00146 virtual Bool_t SetParRange(const char* ParName, Double_t RangeMin, Double_t RangeMax);
00147
00152 virtual Bool_t GetParRange(const char* ParName, Double_t& RangeMin, Double_t& RangeMax);
00153
00158 virtual Bool_t SetParEpsilon(const char* ParName, Double_t Epsilon);
00159
00164 virtual Bool_t GetParEpsilon(const char* ParName, Double_t& Epsilon);
00165
00169 void SetParName(Int_t n, const char* name);
00170
00175 const char* GetParName(Int_t n);
00176
00181 const char* GetParFullName(Int_t n);
00182
00189 void SetParsNames(const char* name0 = "Par0", const char* name1 = "Par1",
00190 const char* name2 = "Par2", const char* name3 = "Par3",
00191 const char* name4 = "Par4", const char* name5 = "Par5",
00192 const char* name6 = "Par6", const char* name7 = "Par7",
00193 const char* name8 = "Par8", const char* name9 = "Par9");
00194
00201 void SetParsValues(Double_t par0 = 0., Double_t par1 = 0., Double_t par2 = 0., Double_t par3 = 0., Double_t par4 = 0.,
00202 Double_t par5 = 0., Double_t par6 = 0., Double_t par7 = 0., Double_t par8 = 0., Double_t par9 = 0.);
00203
00208 virtual void MemorizePars();
00209
00213 virtual bool CanRollbackPars() { return fbCanRollbackPars; }
00214
00218 virtual void RememberPars();
00219
00223 Bool_t IsAllParsFixed();
00224
00229 TGo4FitParameter* CreatePar(const char* ParName, const char* Title, Double_t iValue = 0);
00230
00236 Bool_t RemovePar(const char* name);
00237
00243 Bool_t RemovePar(TGo4FitParameter* par);
00244
00249 virtual void Print(Option_t* option) const;
00250
00254 void PrintPars() const;
00255
00260 virtual void CollectParsTo(TGo4FitParsList & list);
00261
00266 void ClearPars();
00267
00268 protected:
00269 TGo4FitParameter* AddPar(TGo4FitParameter* par);
00270 TGo4FitParameter* InsertPar(TGo4FitParameter* par, Int_t indx);
00271 void SetParsOwner(TGo4FitNamed* iOwner);
00272
00273 void ClearParsBlocking();
00274
00275 virtual TGo4FitParameter* Get(Int_t n) { return (n>=0) && (n<NumPars()) ? (TGo4FitParameter*) fxPars.At(n) : 0 ; }
00276 TGo4FitParameter* Find(const char* ParName);
00277 TGo4FitParameter* Find(const char* OwnerFullName, const char* ParName);
00278 TGo4FitParameter* Find(TGo4FitParameter* par);
00279 Bool_t RemoveParByIndex(Int_t indx);
00280
00281 private:
00282 TOrdCollection fxPars;
00283
00287 Bool_t fbCanRollbackPars;
00288
00292
00293 ClassDef(TGo4FitParsList,1)
00294 };
00295 #endif // TGO4FITPARSLIST_H