CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
funct::Parameter Class Reference

#include <Parameter.h>

Public Member Functions

const std::string & name () const
 
 operator double () const
 
 operator std::shared_ptr< double > () const
 
double operator() () const
 
double operator() (double) const
 
double operator() (double, double) const
 
Parameteroperator= (double value)
 
 Parameter (const std::string &name="undefined", double value=0)
 
std::shared_ptr< double > ptr () const
 
double value () const
 

Private Attributes

std::string name_
 
std::shared_ptr< double > value_
 

Detailed Description

Definition at line 8 of file Parameter.h.

Constructor & Destructor Documentation

◆ Parameter()

funct::Parameter::Parameter ( const std::string &  name = "undefined",
double  value = 0 
)
inlineexplicit

Definition at line 10 of file Parameter.h.

11  : name_(name), value_(new double(value)) {}

Member Function Documentation

◆ name()

const std::string& funct::Parameter::name ( void  ) const
inline

Definition at line 12 of file Parameter.h.

12 { return name_; }

References name_.

Referenced by config.CFG::__str__(), fit::RootMinuit< Function >::addParameter(), validation.Sample::digest(), and root::tf1_t().

◆ operator double()

funct::Parameter::operator double ( ) const
inline

Definition at line 15 of file Parameter.h.

15 { return value(); }

References value().

◆ operator std::shared_ptr< double >()

funct::Parameter::operator std::shared_ptr< double > ( ) const
inline

Definition at line 19 of file Parameter.h.

19 { return value_; }

References value_.

◆ operator()() [1/3]

double funct::Parameter::operator() ( ) const
inline

Definition at line 14 of file Parameter.h.

14 { return *value_; }

References value_.

◆ operator()() [2/3]

double funct::Parameter::operator() ( double  ) const
inline

Definition at line 16 of file Parameter.h.

16 { return *value_; }

References value_.

◆ operator()() [3/3]

double funct::Parameter::operator() ( double  ,
double   
) const
inline

Definition at line 17 of file Parameter.h.

17 { return *value_; }

References value_.

◆ operator=()

Parameter& funct::Parameter::operator= ( double  value)
inline

Definition at line 20 of file Parameter.h.

20  {
21  *value_ = value;
22  return *this;
23  }

References value(), and value_.

◆ ptr()

std::shared_ptr<double> funct::Parameter::ptr ( ) const
inline

Definition at line 18 of file Parameter.h.

18 { return value_; }

References value_.

Referenced by root::tf1_t().

◆ value()

double funct::Parameter::value ( void  ) const
inline

Definition at line 13 of file Parameter.h.

13 { return *value_; }

References value_.

Referenced by operator double(), and operator=().

Member Data Documentation

◆ name_

std::string funct::Parameter::name_
private

Definition at line 26 of file Parameter.h.

Referenced by name().

◆ value_

std::shared_ptr<double> funct::Parameter::value_
private

Definition at line 27 of file Parameter.h.

Referenced by operator std::shared_ptr< double >(), operator()(), operator=(), ptr(), and value().

funct::Parameter::name
const std::string & name() const
Definition: Parameter.h:12
funct::Parameter::value_
std::shared_ptr< double > value_
Definition: Parameter.h:27
funct::Parameter::value
double value() const
Definition: Parameter.h:13
value
Definition: value.py:1
funct::Parameter::name_
std::string name_
Definition: Parameter.h:26