GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4FitParameter.cxx
Go to the documentation of this file.
1 // $Id: TGo4FitParameter.cxx 933 2013-01-29 15:27:58Z 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 für 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 #include "TGo4FitParameter.h"
15 
16 #include "Riostream.h"
17 #include "TGo4FitParsList.h"
18 
20  Reset();
21 }
22 
23 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue) : TGo4FitNamed(name,title) {
24  Reset();
25  fdValue = iValue;
26 }
27 
28 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax) : TGo4FitNamed(name,title) {
29  Reset();
30  fdValue = iValue;
31  SetRange(iRangeMin,iRangeMax);
32 }
33 
34 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iEpsilon) : TGo4FitNamed(name,title) {
35  Reset();
36  fdValue = iValue;
37  SetEpsilon(iEpsilon);
38 }
39 
40 TGo4FitParameter::TGo4FitParameter(const char* name, const char* title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax, Double_t iEpsilon) : TGo4FitNamed(name,title) {
41  Reset();
42  fdValue = iValue;
43  SetRange(iRangeMin,iRangeMax);
44  SetEpsilon(iEpsilon);
45 }
46 
47 void TGo4FitParameter::SetRange(Double_t iRangeMin, Double_t iRangeMax) {
48  fbRange=kTRUE;
49  fdRangeMin = iRangeMin;
50  fdRangeMax = iRangeMax;
51  if (fdRangeMin==fdRangeMax) { fdValue = fdRangeMin; fbFixed = kTRUE; } else
54 }
55 
57 }
58 
59 void TGo4FitParameter::Print(Option_t* option) const
60 {
61  std::cout << " Name: " << ((TGo4FitParameter*) this) -> GetFullName();
62  std::cout << " value=" << fdValue << " error = " << fdError;
63  if (GetFixed()) std::cout << " fixed";
64  if (fbRange) std::cout << " range=[" << fdRangeMin << "," << fdRangeMax << "]";
65  if (fbEpsilon) std::cout << " epsilon=" << fdEpsilon;
66  std::cout << std::endl;
67 }
68 
70 {
71  fdValue = 0.;
72  fdError = 0.;
73  fbFixed = kFALSE;
74  fbEpsilon = kFALSE;
75  fdEpsilon = .000001;
76  fbRange = kFALSE;
77  fdRangeMin = 0.;
78  fdRangeMax = 0.;
79  fbBlocked = kFALSE;
80  fdRememberedValue = 0.;
81 }
Bool_t GetFixed() const
const char * GetFullName()
virtual ~TGo4FitParameter()
Double_t fdRememberedValue
virtual void Print(Option_t *option) const
void SetEpsilon(Double_t iEpsilon)
void SetRange(Double_t iRangeMin, Double_t iRangeMax)