CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::Parameter Class Reference

#include <Parameter.hh>

+ Inheritance diagram for Genfun::Parameter:

Public Member Functions

 Parameter (std::string name, double value, double lowerLimit=-1e100, double upperLimit=1e100)
 
 Parameter (const Parameter &right)
 
virtual ~Parameter ()
 
const Parameteroperator= (const Parameter &right)
 
const std::string & getName () const
 
virtual double getValue () const
 
double getLowerLimit () const
 
double getUpperLimit () const
 
void setValue (double value)
 
void setLowerLimit (double lowerLimit)
 
void setUpperLimit (double upperLimit)
 
void connectFrom (const AbsParameter *source)
 
virtual Parameterparameter ()
 
virtual const Parameterparameter () const
 
- Public Member Functions inherited from Genfun::AbsParameter
 AbsParameter ()
 
 AbsParameter (const AbsParameter &)
 
virtual ~AbsParameter ()
 
virtual double getValue () const =0
 
AbsParameterclone () const
 
virtual Parameterparameter ()
 
virtual const Parameterparameter () const
 

Detailed Description

Author

Definition at line 35 of file Parameter.hh.

Constructor & Destructor Documentation

◆ Parameter() [1/2]

Genfun::Parameter::Parameter ( std::string  name,
double  value,
double  lowerLimit = -1e100,
double  upperLimit = 1e100 
)

Definition at line 10 of file Parameter.cc.

10 :
11 _name(name),_value(value),_lowerLimit(lowerLimit),_upperLimit(upperLimit),_sourceParameter(NULL)
12{
13}

◆ Parameter() [2/2]

Genfun::Parameter::Parameter ( const Parameter right)

Definition at line 107 of file Parameter.cc.

107 :
108 AbsParameter(right),
109 _name(right._name),
110 _value(right._value),
111 _lowerLimit(right._lowerLimit),
112 _upperLimit(right._upperLimit),
113 _sourceParameter(right._sourceParameter)
114{
115}

◆ ~Parameter()

Genfun::Parameter::~Parameter ( )
virtual

Definition at line 15 of file Parameter.cc.

15 {
16}

Member Function Documentation

◆ connectFrom()

void Genfun::Parameter::connectFrom ( const AbsParameter source)

◆ getLowerLimit()

double Genfun::Parameter::getLowerLimit ( ) const

Definition at line 39 of file Parameter.cc.

40{
41 if (_sourceParameter) {
42 return -1E-100;
43 }
44 else {
45 return _lowerLimit;
46 }
47}

Referenced by Genfun::operator<<().

◆ getName()

const std::string & Genfun::Parameter::getName ( ) const

Definition at line 25 of file Parameter.cc.

25 {
26 return _name;
27}

Referenced by Genfun::operator<<().

◆ getUpperLimit()

double Genfun::Parameter::getUpperLimit ( ) const

Definition at line 49 of file Parameter.cc.

50{
51 if (_sourceParameter) {
52 return 1E100;
53 }
54 else {
55 return _upperLimit;
56 }
57}

Referenced by Genfun::operator<<().

◆ getValue()

◆ operator=()

const Parameter & Genfun::Parameter::operator= ( const Parameter right)

Definition at line 117 of file Parameter.cc.

117 {
118 if (this != &right) {
119 _name=right._name;
120 _value=right._value;
121 _lowerLimit=right._lowerLimit;
122 _upperLimit=right._upperLimit;
123 _sourceParameter=right._sourceParameter;
124 }
125 return *this;
126}

◆ parameter() [1/2]

virtual Parameter * Genfun::Parameter::parameter ( )
inlinevirtual

Reimplemented from Genfun::AbsParameter.

Definition at line 81 of file Parameter.hh.

81{return this;}

◆ parameter() [2/2]

virtual const Parameter * Genfun::Parameter::parameter ( ) const
inlinevirtual

Reimplemented from Genfun::AbsParameter.

Definition at line 82 of file Parameter.hh.

82{return this;}

◆ setLowerLimit()

void Genfun::Parameter::setLowerLimit ( double  lowerLimit)

Definition at line 71 of file Parameter.cc.

72{
73 if (_sourceParameter) {
74 std::cerr
75 << "Warning: Parameter is connected. Function has no effect."
76 << std::endl;
77 }
78 else {
79 _lowerLimit=lowerLimit;
80 }
81}

◆ setUpperLimit()

void Genfun::Parameter::setUpperLimit ( double  upperLimit)

Definition at line 83 of file Parameter.cc.

84{
85 if (_sourceParameter) {
86 std::cerr
87 << "Warning: Parameter is connected. Function has no effect."
88 << std::endl;
89 }
90 else {
91 _upperLimit=upperLimit;
92 }
93}

◆ setValue()

void Genfun::Parameter::setValue ( double  value)

Definition at line 59 of file Parameter.cc.

60{
61 if (_sourceParameter) {
62 std::cerr
63 << "Warning: Parameter is connected. Function has no effect."
64 << std::endl;
65 }
66 else {
67 _value=value;
68 }
69}

Referenced by Genfun::Erf::partial().


The documentation for this class was generated from the following files: