CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
root::helper::RootFunctionAdapter< F, args > Struct Template Reference

#include <RootFunctionAdapter.h>

Public Member Functions

void addParameter (const std::shared_ptr< double > &par)
 
size_t numberOfParameters () const
 
double operator() (const double *var) const
 
 RootFunctionAdapter ()
 
 RootFunctionAdapter (F &f)
 
void setParameters (const double *pars)
 

Private Attributes

Ff_
 
std::vector< std::shared_ptr< double > > pars_
 

Detailed Description

template<typename F, unsigned int args>
struct root::helper::RootFunctionAdapter< F, args >

Definition at line 12 of file RootFunctionAdapter.h.

Constructor & Destructor Documentation

◆ RootFunctionAdapter() [1/2]

template<typename F, unsigned int args>
root::helper::RootFunctionAdapter< F, args >::RootFunctionAdapter ( )
inline

Definition at line 13 of file RootFunctionAdapter.h.

13 : f_(nullptr) {}

◆ RootFunctionAdapter() [2/2]

template<typename F, unsigned int args>
root::helper::RootFunctionAdapter< F, args >::RootFunctionAdapter ( F f)
inline

Definition at line 14 of file RootFunctionAdapter.h.

14 : f_(&f) {}

Member Function Documentation

◆ addParameter()

template<typename F, unsigned int args>
void root::helper::RootFunctionAdapter< F, args >::addParameter ( const std::shared_ptr< double > &  par)
inline

◆ numberOfParameters()

template<typename F, unsigned int args>
size_t root::helper::RootFunctionAdapter< F, args >::numberOfParameters ( ) const
inline

Definition at line 22 of file RootFunctionAdapter.h.

22 { return pars_.size(); }

References root::helper::RootFunctionAdapter< F, args >::pars_.

◆ operator()()

template<typename F, unsigned int args>
double root::helper::RootFunctionAdapter< F, args >::operator() ( const double *  var) const
inline

◆ setParameters()

template<typename F, unsigned int args>
void root::helper::RootFunctionAdapter< F, args >::setParameters ( const double *  pars)
inline

Definition at line 16 of file RootFunctionAdapter.h.

16  {
17  for (size_t i = 0; i < pars_.size(); ++i) {
18  *pars_[i] = pars[i];
19  }
20  }

References mps_fire::i, and root::helper::RootFunctionAdapter< F, args >::pars_.

Member Data Documentation

◆ f_

template<typename F, unsigned int args>
F* root::helper::RootFunctionAdapter< F, args >::f_
private

◆ pars_

template<typename F, unsigned int args>
std::vector<std::shared_ptr<double> > root::helper::RootFunctionAdapter< F, args >::pars_
private
mps_fire.i
i
Definition: mps_fire.py:428
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
root::helper::RootFunctionAdapter::pars_
std::vector< std::shared_ptr< double > > pars_
Definition: RootFunctionAdapter.h:26
root::helper::RootFunctionAdapter::f_
F * f_
Definition: RootFunctionAdapter.h:25
trigObjTnPSource_cfi.var
var
Definition: trigObjTnPSource_cfi.py:21
relativeConstraints.value
value
Definition: relativeConstraints.py:53