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

/Go4FitGUI/TGo4FitGUIOptions.cxx

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 #include "TGo4FitGUIOptions.h"
00017 
00018 TGo4FitGUIOptions::TGo4FitGUIOptions() : TObject(),
00019    fxFitter(0),
00020    fxWizDataName(), fxWizModelName(), fbWizShowAllModels(kTRUE), fiWizPageIndex(0),
00021    fbUseAmplEstim(kFALSE), fiNumMigradIter(0) {
00022 }
00023 
00024 TGo4FitGUIOptions::~TGo4FitGUIOptions() {
00025   if (fxFitter) delete fxFitter;
00026 }
00027 
00028 void TGo4FitGUIOptions::SetFitter(TGo4Fitter*f) {
00029    if (fxFitter) delete fxFitter;
00030    fxFitter = f;
00031 }
00032 
00033 TGo4Fitter* TGo4FitGUIOptions::TakeFitter() {
00034    TGo4Fitter* f = fxFitter;
00035    fxFitter = 0;
00036    return f;
00037 }
00038 
00039 TGo4FitData* TGo4FitGUIOptions::GetWizData() {
00040    TGo4Fitter* fitter = GetFitter();
00041    if (fitter) return fitter->FindData(GetWizDataName());
00042    return 0;
00043 }
00044 
00045 TGo4FitModel* TGo4FitGUIOptions::GetWizModel() {
00046    TGo4Fitter* fitter = GetFitter();
00047    if (fitter) return fitter->FindModel(GetWizModelName());
00048    return 0;
00049 }
00050 
00051 TGo4FitPeakFinder* TGo4FitGUIOptions::GetPeakFinder(Bool_t AutoCreate) {
00052    TGo4Fitter* fitter = GetFitter();
00053    if (fitter==0) return 0;
00054    for (Int_t n=0;n<fitter->GetNumActions();n++) {
00055       TGo4FitPeakFinder* finder = dynamic_cast<TGo4FitPeakFinder*> (fitter->GetAction(n));
00056       if (finder) return finder;
00057    }
00058 
00059    if (AutoCreate) {
00060       TGo4FitPeakFinder* finder = new TGo4FitPeakFinder("Finder", 0, kTRUE, 1);
00061       finder->SetPeakFinderType(2);
00062       fitter->AddActionAt(finder, 0);
00063       return finder;
00064    }
00065 
00066    return 0;
00067 }
00068 
00069 void TGo4FitGUIOptions::CopyFrom(TGo4FitGUIOptions& other, Bool_t CopyFitter) {
00070    if(fxFitter) delete fxFitter;
00071    fxFitter = 0;
00072    if (CopyFitter && (other.fxFitter!=0)) fxFitter = (TGo4Fitter*) other.fxFitter->Clone();
00073 
00074    fxWizDataName = other.fxWizDataName;
00075    fxWizModelName = other.fxWizModelName;
00076    fbWizShowAllModels = other.fbWizShowAllModels;
00077    fiWizPageIndex = other.fiWizPageIndex;
00078 
00079    fbUseAmplEstim = other.fbUseAmplEstim;
00080    fiNumMigradIter = other.fiNumMigradIter;
00081 }
00082 
00083 //----------------------------END OF GO4 SOURCE FILE ---------------------

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