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)) {}
const std::string & name() const
Definition: Parameter.h:12
std::string name_
Definition: Parameter.h:26
Definition: value.py:1
std::shared_ptr< double > value_
Definition: Parameter.h:27

Member Function Documentation

◆ name()

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

Definition at line 12 of file Parameter.h.

References name_.

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

12 { return name_; }
std::string name_
Definition: Parameter.h:26

◆ operator double()

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

Definition at line 15 of file Parameter.h.

References value().

15 { return value(); }
double value() const
Definition: Parameter.h:13

◆ operator std::shared_ptr< double >()

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

Definition at line 19 of file Parameter.h.

References value_.

19 { return value_; }
std::shared_ptr< double > value_
Definition: Parameter.h:27

◆ operator()() [1/3]

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

Definition at line 14 of file Parameter.h.

References value_.

14 { return *value_; }
std::shared_ptr< double > value_
Definition: Parameter.h:27

◆ operator()() [2/3]

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

Definition at line 16 of file Parameter.h.

References value_.

16 { return *value_; }
std::shared_ptr< double > value_
Definition: Parameter.h:27

◆ operator()() [3/3]

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

Definition at line 17 of file Parameter.h.

References value_.

17 { return *value_; }
std::shared_ptr< double > value_
Definition: Parameter.h:27

◆ operator=()

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

Definition at line 20 of file Parameter.h.

References value(), and value_.

20  {
21  *value_ = value;
22  return *this;
23  }
double value() const
Definition: Parameter.h:13
std::shared_ptr< double > value_
Definition: Parameter.h:27

◆ ptr()

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

Definition at line 18 of file Parameter.h.

References value_.

Referenced by root::tf1_t().

18 { return value_; }
std::shared_ptr< double > value_
Definition: Parameter.h:27

◆ value()

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

Definition at line 13 of file Parameter.h.

References value_.

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

13 { return *value_; }
std::shared_ptr< double > value_
Definition: Parameter.h:27

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().