CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 boost::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< boost::shared_ptr
< double > > 
pars_
 

Detailed Description

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

Definition at line 11 of file RootFunctionAdapter.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file RootFunctionAdapter.h.

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

Definition at line 13 of file RootFunctionAdapter.h.

13 : f_(&f) { }
double f[11][100]

Member Function Documentation

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

Definition at line 25 of file RootFunctionAdapter.h.

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

25  {
26  return pars_.size();
27  }
std::vector< boost::shared_ptr< double > > pars_
template<typename F, unsigned int args>
double root::helper::RootFunctionAdapter< F, args >::operator() ( const double *  var) const
inline
template<typename F, unsigned int args>
void root::helper::RootFunctionAdapter< F, args >::setParameters ( const double *  pars)
inline

Definition at line 17 of file RootFunctionAdapter.h.

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

17  {
18  for(size_t i = 0; i < pars_.size(); ++i) {
19  *pars_[i] = pars[i];
20  }
21  }
int i
Definition: DBlmapReader.cc:9
std::vector< boost::shared_ptr< double > > pars_

Member Data Documentation

template<typename F, unsigned int args>
F* root::helper::RootFunctionAdapter< F, args >::f_
private
template<typename F, unsigned int args>
std::vector<boost::shared_ptr<double> > root::helper::RootFunctionAdapter< F, args >::pars_
private