Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4Fit/TGo4FitParsList.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4FITPARSLIST_H
00017 #define TGO4FITPARSLIST_H
00018 
00019 #include "TString.h"
00020 #include "TOrdCollection.h"
00021 #include "TGo4FitParameter.h"
00022 #include "TGo4FitNamed.h"
00023 
00029 class TGo4FitParsList: public TGo4FitNamed {
00030    public:
00031 
00035       TGo4FitParsList();
00036 
00040       TGo4FitParsList(Bool_t IsParsOwned);
00041 
00045       TGo4FitParsList(const char* Name, const char* Title, Bool_t IsParsOwned);
00046 
00050       virtual ~TGo4FitParsList();
00051 
00055       virtual Int_t NumPars() { return fxPars.GetSize(); }
00056 
00061       TGo4FitParameter* GetPar(Int_t n) { return Get(n);  }
00062 
00067       Int_t GetParIndex(const TGo4FitParameter* par);
00068 
00073       TGo4FitParameter* FindPar(const char* ParName) { return Find(ParName); }
00074 
00079       TGo4FitParameter* FindPar(const char* OwnerFullName, const char* ParName) { return Find(OwnerFullName,ParName); }
00080 
00085       TGo4FitParameter* FindPar(TGo4FitParameter* par) { return Find(par); }
00086 
00091       Double_t GetParValue(const char* ParName);
00092 
00097       Bool_t SetParValue(const char* ParName, Double_t iValue);
00098 
00103       void GetParsValues(Double_t* pars);
00104 
00108       void SetParsValues(Double_t* pars);
00109 
00114       Double_t GetParError(const char* ParName);
00115 
00120       Bool_t SetParError(const char* ParName, Double_t iError);
00121 
00125       virtual Bool_t SetParFixed(const char* ParName, Bool_t iFixed = kTRUE);
00126 
00131       virtual Bool_t GetParFixed(const char* ParName);
00132 
00136       Int_t NumFixedPars();
00137 
00141       Int_t NumFreePars();
00142 
00147       virtual Bool_t SetParRange(const char* ParName, Double_t RangeMin, Double_t RangeMax);
00148 
00153       virtual Bool_t GetParRange(const char* ParName, Double_t& RangeMin, Double_t& RangeMax);
00154 
00159       virtual Bool_t SetParEpsilon(const char* ParName, Double_t Epsilon);
00160 
00165       virtual Bool_t GetParEpsilon(const char* ParName, Double_t& Epsilon);
00166 
00170       void SetParName(Int_t n, const char* name);
00171 
00176       const char* GetParName(Int_t n);
00177 
00182       const char* GetParFullName(Int_t n);
00183 
00190       void SetParsNames(const char* name0 = "Par0", const char* name1 = "Par1",
00191                         const char* name2 = "Par2", const char* name3 = "Par3",
00192                         const char* name4 = "Par4", const char* name5 = "Par5",
00193                         const char* name6 = "Par6", const char* name7 = "Par7",
00194                         const char* name8 = "Par8", const char* name9 = "Par9");
00195 
00202       void SetParsValues(Double_t par0 = 0., Double_t par1 = 0., Double_t par2 = 0., Double_t par3 = 0., Double_t par4 = 0.,
00203                          Double_t par5 = 0., Double_t par6 = 0., Double_t par7 = 0., Double_t par8 = 0., Double_t par9 = 0.);
00204 
00209       virtual void MemorizePars();
00210 
00214       virtual bool CanRollbackPars() { return fbCanRollbackPars; }
00215 
00219       virtual void RememberPars();
00220 
00224       Bool_t IsAllParsFixed();
00225 
00230       TGo4FitParameter* CreatePar(const char* ParName, const char* Title, Double_t iValue = 0);
00231 
00237       Bool_t RemovePar(const char* name);
00238 
00244       Bool_t RemovePar(TGo4FitParameter* par);
00245 
00250       virtual void Print(Option_t* option) const;
00251 
00255       void PrintPars() const;
00256 
00261       virtual void CollectParsTo(TGo4FitParsList & list);
00262 
00267       void ClearPars();
00268 
00269    protected:
00270       TGo4FitParameter* AddPar(TGo4FitParameter* par);
00271       TGo4FitParameter* InsertPar(TGo4FitParameter* par, Int_t indx);
00272       void SetParsOwner(TGo4FitNamed* iOwner);
00273 
00274       void ClearParsBlocking();
00275 
00276       virtual TGo4FitParameter* Get(Int_t n) { return (n>=0) && (n<NumPars()) ? (TGo4FitParameter*) fxPars.At(n) : 0 ; }
00277       TGo4FitParameter* Find(const char* ParName);
00278       TGo4FitParameter* Find(const char* OwnerFullName, const char* ParName);
00279       TGo4FitParameter* Find(TGo4FitParameter* par);
00280       Bool_t RemoveParByIndex(Int_t indx);
00281 
00282     private:
00283       TOrdCollection fxPars;              
00284       
00288       Bool_t fbCanRollbackPars;                        
00289 
00293       /*#  TGo4FitParameter lnkTGo4FitParsList; */
00294     ClassDef(TGo4FitParsList,1)
00295 };
00296 #endif // TGO4FITPARSLIST_H
00297 
00298 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:57 2005 for Go4-v2.10-5 by doxygen1.2.15