Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4FitParameter.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TGo4FitParameter.h"
00017 
00018 #include "Riostream.h"
00019 
00020 #include "TGo4FitParsList.h"
00021 
00022 TGo4FitParameter::TGo4FitParameter() : TGo4FitNamed() {
00023     Reset();
00024 }
00025 
00026 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue) : TGo4FitNamed(name,title) {
00027     Reset();
00028     fdValue = iValue;
00029 }
00030 
00031 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax) : TGo4FitNamed(name,title) {
00032     Reset();
00033     fdValue = iValue;
00034     SetRange(iRangeMin,iRangeMax);
00035 }
00036 
00037 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iEpsilon) : TGo4FitNamed(name,title) {
00038     Reset();
00039     fdValue = iValue;
00040     SetEpsilon(iEpsilon);
00041 }
00042 
00043 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax, Double_t iEpsilon) : TGo4FitNamed(name,title) {
00044     Reset();
00045     fdValue = iValue;
00046     SetRange(iRangeMin,iRangeMax);
00047     SetEpsilon(iEpsilon);
00048 }
00049 
00050 void TGo4FitParameter::SetRange(Double_t iRangeMin, Double_t iRangeMax) {
00051    fbRange=kTRUE;
00052    fdRangeMin = iRangeMin;
00053    fdRangeMax = iRangeMax;
00054    if (fdRangeMin==fdRangeMax) { fdValue = fdRangeMin; fbFixed = kTRUE; } else
00055    if (fdValue<fdRangeMin) fdValue = fdRangeMin; else
00056    if (fdValue>fdRangeMax) fdValue = fdRangeMax;
00057 }
00058 
00059 TGo4FitParameter::~TGo4FitParameter() {
00060 }
00061 
00062 void TGo4FitParameter::Print(Option_t* option) const {
00063    cout << "   Name: " << ((TGo4FitParameter*) this) -> GetFullName();
00064    cout << "   value=" << fdValue << "  error = " << fdError;
00065    if (GetFixed()) cout << "  fixed";
00066    if (fbRange) cout << "   range=[" << fdRangeMin << "," << fdRangeMax << "]";
00067    if (fbEpsilon) cout << "  epsilon=" << fdEpsilon;
00068    cout << endl;
00069 //   cout << "   " << (void*) this << endl;
00070 }
00071 
00072 void TGo4FitParameter::Reset() {
00073   fdValue = 0.;
00074   fdError = 0.;
00075   fbFixed = kFALSE;
00076   fbEpsilon = kFALSE;
00077   fdEpsilon = .000001;
00078   fbRange = kFALSE;
00079   fdRangeMin = 0.;
00080   fdRangeMax = 0.;
00081   fbBlocked = kFALSE;
00082   fdRememberedValue = 0.;
00083 }
00084 
00085 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:12 2008 for Go4-v3.04-1 by  doxygen 1.4.2