TGo4FitParameter.cxx

Go to the documentation of this file.
00001 // $Id: TGo4FitParameter.cxx 478 2009-10-29 12:26:09Z linev $
00002 //-----------------------------------------------------------------------
00003 //       The GSI Online Offline Object Oriented (Go4) Project
00004 //         Experiment Data Processing at EE department, GSI
00005 //-----------------------------------------------------------------------
00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
00007 //                     Planckstr. 1, 64291 Darmstadt, Germany
00008 // Contact:            http://go4.gsi.de
00009 //-----------------------------------------------------------------------
00010 // This software can be used under the license agreements as stated
00011 // in Go4License.txt file which is part of the distribution.
00012 //-----------------------------------------------------------------------
00013 
00014 #include "TGo4FitParameter.h"
00015 
00016 #include "Riostream.h"
00017 
00018 #include "TGo4FitParsList.h"
00019 
00020 TGo4FitParameter::TGo4FitParameter() : TGo4FitNamed() {
00021     Reset();
00022 }
00023 
00024 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue) : TGo4FitNamed(name,title) {
00025     Reset();
00026     fdValue = iValue;
00027 }
00028 
00029 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax) : TGo4FitNamed(name,title) {
00030     Reset();
00031     fdValue = iValue;
00032     SetRange(iRangeMin,iRangeMax);
00033 }
00034 
00035 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iEpsilon) : TGo4FitNamed(name,title) {
00036     Reset();
00037     fdValue = iValue;
00038     SetEpsilon(iEpsilon);
00039 }
00040 
00041 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax, Double_t iEpsilon) : TGo4FitNamed(name,title) {
00042     Reset();
00043     fdValue = iValue;
00044     SetRange(iRangeMin,iRangeMax);
00045     SetEpsilon(iEpsilon);
00046 }
00047 
00048 void TGo4FitParameter::SetRange(Double_t iRangeMin, Double_t iRangeMax) {
00049    fbRange=kTRUE;
00050    fdRangeMin = iRangeMin;
00051    fdRangeMax = iRangeMax;
00052    if (fdRangeMin==fdRangeMax) { fdValue = fdRangeMin; fbFixed = kTRUE; } else
00053    if (fdValue<fdRangeMin) fdValue = fdRangeMin; else
00054    if (fdValue>fdRangeMax) fdValue = fdRangeMax;
00055 }
00056 
00057 TGo4FitParameter::~TGo4FitParameter() {
00058 }
00059 
00060 void TGo4FitParameter::Print(Option_t* option) const {
00061    cout << "   Name: " << ((TGo4FitParameter*) this) -> GetFullName();
00062    cout << "   value=" << fdValue << "  error = " << fdError;
00063    if (GetFixed()) cout << "  fixed";
00064    if (fbRange) cout << "   range=[" << fdRangeMin << "," << fdRangeMax << "]";
00065    if (fbEpsilon) cout << "  epsilon=" << fdEpsilon;
00066    cout << endl;
00067 //   cout << "   " << (void*) this << endl;
00068 }
00069 
00070 void TGo4FitParameter::Reset() {
00071   fdValue = 0.;
00072   fdError = 0.;
00073   fbFixed = kFALSE;
00074   fbEpsilon = kFALSE;
00075   fdEpsilon = .000001;
00076   fbRange = kFALSE;
00077   fdRangeMin = 0.;
00078   fdRangeMax = 0.;
00079   fbBlocked = kFALSE;
00080   fdRememberedValue = 0.;
00081 }

Generated on Thu Oct 28 15:54:12 2010 for Go4-Fitpackagev4.04-2 by  doxygen 1.5.1