![]() |
AmpTools
|
#include <AmpParameter.h>
Public Member Functions | |
AmpParameter (const string &arg) | |
AmpParameter () | |
AmpParameter (const AmpParameter &Par) | |
AmpParameter & | operator= (const AmpParameter &Par) |
string | name () const |
bool | operator== (const AmpParameter &otherPar) const |
operator double () const | |
bool | hasExternalPtr () const |
const double * | valPtr () const |
void | setExternalValue (const double *ptr) |
void | setValue (double val) |
void | setName (const string &name) |
This class is used to track parameters that may be floating in Amplitudes. Each parameter must be a floating point number and have a name associated with it. The class defines a standard conversion to type double and allow the value for the paramter be defined by some external memory.
Definition at line 54 of file AmpParameter.h.
AmpParameter::AmpParameter | ( | const string & | arg | ) |
The constructor for the AmpParameter. This takes an argument that is constructed by the ConfigFileParser and it parses that string argument according to the following rules. If the first character of arg is "[" and the last character is "]" the substring inside of the square braces is interpreted as the name of the parameter and sets the default value to an arbitrary number (1E9 currently). If the string is not started and ended with braces it converts the string to a double and sets the converted value to the default value of the parameter with the name being the empty string.
[in] | arg | string argument that is interpreted as described above |
Definition at line 44 of file AmpParameter.cc.
|
inline |
The default constructor.
Definition at line 78 of file AmpParameter.h.
AmpParameter::AmpParameter | ( | const AmpParameter & | ampPar | ) |
A copy constructor. If the AmpParameter being copied points to external memory, the copy will also point to the same external memory.
Definition at line 70 of file AmpParameter.cc.
|
inline |
A function that returns a true if the AmpParameter is currently obtaining its value from some external source.
Definition at line 111 of file AmpParameter.h.
|
inline |
A function to return the string name of this parameter.
Definition at line 94 of file AmpParameter.h.
|
inline |
An operator for interpreting the class as a double.
Definition at line 105 of file AmpParameter.h.
AmpParameter & AmpParameter::operator= | ( | const AmpParameter & | ampPar | ) |
The assignment operator (similar to the copy constructor).
Definition at line 88 of file AmpParameter.cc.
bool AmpParameter::operator== | ( | const AmpParameter & | otherPar | ) | const |
An equivalence operator. For parameters with external values, this compares the values of the pointers.
Definition at line 108 of file AmpParameter.cc.
void AmpParameter::setExternalValue | ( | const double * | ptr | ) |
A function to tell the AmpParmaeter to find its value from some external location in memory. This is useful for fitting where the ParameterManager maintains this external memory.
[in] | ptr | the memory location of the intended value of the parameter |
Definition at line 129 of file AmpParameter.cc.
|
inline |
A function to change the name of the parmeter.
[in] | name | the new name of the parameter |
Definition at line 145 of file AmpParameter.h.
void AmpParameter::setValue | ( | double | val | ) |
A function to set the value of the parameter.
[in] | val | the desired value of the parameter |
Definition at line 136 of file AmpParameter.cc.
|
inline |
A function that returns a const pointer to the value of the parameter.
Definition at line 116 of file AmpParameter.h.