AmpTools
AmpParameter Class Reference

#include <AmpParameter.h>

Public Member Functions

 AmpParameter (const string &arg)
 
 AmpParameter ()
 
 AmpParameter (const AmpParameter &ampPar)
 
AmpParameteroperator= (const AmpParameter &ampPar)
 
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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AmpParameter() [1/3]

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.

Parameters
[in]argstring argument that is interpreted as described above
See also
setValue

Definition at line 44 of file AmpParameter.cc.

◆ AmpParameter() [2/3]

AmpParameter::AmpParameter ( )
inline

The default constructor.

Definition at line 78 of file AmpParameter.h.

◆ AmpParameter() [3/3]

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.

Here is the call graph for this function:

Member Function Documentation

◆ hasExternalPtr()

bool AmpParameter::hasExternalPtr ( ) const
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.

Here is the caller graph for this function:

◆ name()

string AmpParameter::name ( ) const
inline

A function to return the string name of this parameter.

Definition at line 94 of file AmpParameter.h.

Here is the caller graph for this function:

◆ operator double()

AmpParameter::operator double ( ) const
inline

An operator for interpreting the class as a double.

Definition at line 105 of file AmpParameter.h.

◆ operator=()

AmpParameter & AmpParameter::operator= ( const AmpParameter ampPar)

The assignment operator (similar to the copy constructor).

Definition at line 88 of file AmpParameter.cc.

Here is the call graph for this function:

◆ operator==()

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.

Here is the call graph for this function:

◆ setExternalValue()

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.

Parameters
[in]ptrthe memory location of the intended value of the parameter
See also
Amplitude::setParPtr
AmplitudeManager::setAmpParPtr

Definition at line 129 of file AmpParameter.cc.

◆ setName()

void AmpParameter::setName ( const string &  name)
inline

A function to change the name of the parmeter.

Parameters
[in]namethe new name of the parameter

Definition at line 145 of file AmpParameter.h.

◆ setValue()

void AmpParameter::setValue ( double  val)

A function to set the value of the parameter.

Parameters
[in]valthe desired value of the parameter
See also
Amplitude::setParValue
AmplitudeManager::setAmpParValue

Definition at line 136 of file AmpParameter.cc.

◆ valPtr()

const double* AmpParameter::valPtr ( ) const
inline

A function that returns a const pointer to the value of the parameter.

Definition at line 116 of file AmpParameter.h.

Here is the caller graph for this function:

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