GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitParsList.h
Go to the documentation of this file.
1 // $Id: TGo4FitParsList.h 2627 2019-10-01 08:02:45Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4FITPARSLIST_H
15 #define TGO4FITPARSLIST_H
16 
17 #include "TGo4FitNamed.h"
18 
19 #include "TOrdCollection.h"
20 
21 class TGo4FitParameter;
22 
29  public:
30 
35 
39  TGo4FitParsList(Bool_t IsParsOwned);
40 
44  TGo4FitParsList(const char* Name, const char* Title, Bool_t IsParsOwned);
45 
49  virtual ~TGo4FitParsList();
50 
54  virtual Int_t NumPars() { return fxPars.GetSize(); }
55 
60  TGo4FitParameter* GetPar(Int_t n) { return Get(n); }
61 
66  Int_t GetParIndex(const TGo4FitParameter* par);
67 
72  TGo4FitParameter* FindPar(const char* ParName) { return Find(ParName); }
73 
78  TGo4FitParameter* FindPar(const char* OwnerFullName, const char* ParName) { return Find(OwnerFullName,ParName); }
79 
85 
90  Double_t GetParValue(const char* ParName);
91 
96  Bool_t SetParValue(const char* ParName, Double_t iValue);
97 
102  void GetParsValues(Double_t* pars);
103 
107  void SetParsValues(Double_t* pars);
108 
113  Double_t GetParError(const char* ParName);
114 
119  Bool_t SetParError(const char* ParName, Double_t iError);
120 
124  virtual Bool_t SetParFixed(const char* ParName, Bool_t iFixed = kTRUE);
125 
130  virtual Bool_t GetParFixed(const char* ParName);
131 
135  Int_t NumFixedPars();
136 
140  Int_t NumFreePars();
141 
146  virtual Bool_t SetParRange(const char* ParName, Double_t RangeMin, Double_t RangeMax);
147 
152  virtual Bool_t GetParRange(const char* ParName, Double_t& RangeMin, Double_t& RangeMax);
153 
158  virtual Bool_t SetParEpsilon(const char* ParName, Double_t Epsilon);
159 
164  virtual Bool_t GetParEpsilon(const char* ParName, Double_t& Epsilon);
165 
169  void SetParName(Int_t n, const char* name);
170 
175  const char* GetParName(Int_t n);
176 
181  const char* GetParFullName(Int_t n);
182 
189  void SetParsNames(const char* name0 = "Par0", const char* name1 = "Par1",
190  const char* name2 = "Par2", const char* name3 = "Par3",
191  const char* name4 = "Par4", const char* name5 = "Par5",
192  const char* name6 = "Par6", const char* name7 = "Par7",
193  const char* name8 = "Par8", const char* name9 = "Par9");
194 
201  void SetParsValues(Double_t par0 = 0., Double_t par1 = 0., Double_t par2 = 0., Double_t par3 = 0., Double_t par4 = 0.,
202  Double_t par5 = 0., Double_t par6 = 0., Double_t par7 = 0., Double_t par8 = 0., Double_t par9 = 0.);
203 
208  virtual void MemorizePars();
209 
213  virtual bool CanRollbackPars() { return fbCanRollbackPars; }
214 
218  virtual void RememberPars();
219 
223  Bool_t IsAllParsFixed();
224 
229  TGo4FitParameter* CreatePar(const char* ParName, const char* Title, Double_t iValue = 0);
230 
236  Bool_t RemovePar(const char* name);
237 
243  Bool_t RemovePar(TGo4FitParameter* par);
244 
249  virtual void Print(Option_t* option) const;
250 
254  void PrintPars() const;
255 
260  virtual void CollectParsTo(TGo4FitParsList & list);
261 
266  void ClearPars();
267 
268  protected:
270  TGo4FitParameter* InsertPar(TGo4FitParameter* par, Int_t indx);
271  void SetParsOwner(TGo4FitNamed* iOwner);
272 
273  void ClearParsBlocking();
274 
275  virtual TGo4FitParameter* Get(Int_t n) { return (n>=0) && (n<NumPars()) ? (TGo4FitParameter*) fxPars.At(n) : 0 ; }
276  TGo4FitParameter* Find(const char* ParName);
277  TGo4FitParameter* Find(const char* OwnerFullName, const char* ParName);
279  Bool_t RemoveParByIndex(Int_t indx);
280 
281  private:
282  TOrdCollection fxPars;
283 
288 
292  /*# TGo4FitParameter lnkTGo4FitParsList; */
293  ClassDef(TGo4FitParsList,1)
294 };
295 #endif // TGO4FITPARSLIST_H
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 * FindPar(const char *OwnerFullName, const char *ParName)
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()
virtual void Print(Option_t *option) const
void SetParsOwner(TGo4FitNamed *iOwner)
TOrdCollection fxPars
virtual Bool_t SetParRange(const char *ParName, Double_t RangeMin, Double_t RangeMax)
TGo4FitParameter * FindPar(TGo4FitParameter *par)
virtual Int_t NumPars()
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)
virtual Bool_t GetParRange(const char *ParName, Double_t &RangeMin, Double_t &RangeMax)
TGo4FitParameter * Find(const char *ParName)
Bool_t RemoveParByIndex(Int_t indx)
Int_t GetParIndex(const TGo4FitParameter *par)
virtual Bool_t GetParFixed(const char *ParName)
virtual void RememberPars()
virtual ~TGo4FitParsList()
virtual bool CanRollbackPars()
void PrintPars() const
virtual TGo4FitParameter * Get(Int_t n)
void GetParsValues(Double_t *pars)
virtual void CollectParsTo(TGo4FitParsList &list)
TGo4FitParameter * AddPar(TGo4FitParameter *par)
Double_t GetParValue(const char *ParName)
const char * GetParName(Int_t n)
void SetParsValues(Double_t *pars)