GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitParameter.cxx
Go to the documentation of this file.
1 // $Id$
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 fuer 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 <iostream>
17 
19  Reset();
20 }
21 
22 TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue) : TGo4FitNamed(name,title) {
23  Reset();
24  fdValue = iValue;
25 }
26 
27 TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax) : TGo4FitNamed(name,title) {
28  Reset();
29  fdValue = iValue;
30  SetRange(iRangeMin,iRangeMax);
31 }
32 
33 TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue, Double_t iEpsilon) : TGo4FitNamed(name,title) {
34  Reset();
35  fdValue = iValue;
36  SetEpsilon(iEpsilon);
37 }
38 
39 TGo4FitParameter::TGo4FitParameter(const char *name, const char *title, Double_t iValue, Double_t iRangeMin, Double_t iRangeMax, Double_t iEpsilon) : TGo4FitNamed(name,title) {
40  Reset();
41  fdValue = iValue;
42  SetRange(iRangeMin,iRangeMax);
43  SetEpsilon(iEpsilon);
44 }
45 
46 void TGo4FitParameter::SetRange(Double_t iRangeMin, Double_t iRangeMax) {
47  fbRange=kTRUE;
48  fdRangeMin = iRangeMin;
49  fdRangeMax = iRangeMax;
50  if (fdRangeMin==fdRangeMax) { fdValue = fdRangeMin; fbFixed = kTRUE; } else
53 }
54 
56 }
57 
58 void TGo4FitParameter::Print(Option_t *option) const
59 {
60  std::cout << " Name: " << const_cast<TGo4FitParameter *>(this)->GetFullName();
61  std::cout << " value=" << fdValue << " error = " << fdError;
62  if (GetFixed()) std::cout << " fixed";
63  if (fbRange) std::cout << " range=[" << fdRangeMin << "," << fdRangeMax << "]";
64  if (fbEpsilon) std::cout << " epsilon=" << fdEpsilon;
65  std::cout << std::endl;
66 }
67 
69 {
70  fdValue = 0.;
71  fdError = 0.;
72  fbFixed = kFALSE;
73  fbEpsilon = kFALSE;
74  fdEpsilon = .000001;
75  fbRange = kFALSE;
76  fdRangeMin = 0.;
77  fdRangeMax = 0.;
78  fbBlocked = kFALSE;
79  fdRememberedValue = 0.;
80 }
const char * GetFullName()
virtual ~TGo4FitParameter()
Double_t fdRememberedValue
void Print(Option_t *option="") const override
Bool_t GetFixed() const
void SetEpsilon(Double_t iEpsilon)
void SetRange(Double_t iRangeMin, Double_t iRangeMax)