CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
formulaParameterEvaluator.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: CommonTools/Utils
4 // Class : reco::formula::ParameterEvaluator
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Christopher Jones
10 // Created: Wed, 23 Sep 2015 18:06:29 GMT
11 //
12 
13 // system include files
14 
15 // user include files
17 
18 namespace reco {
19  namespace formula {
20  double ParameterEvaluator::evaluate(double const* /*iVariables*/, double const* iParameters) const {
21  return iParameters[m_index];
22  }
23  std::vector<std::string> ParameterEvaluator::abstractSyntaxTree() const {
24  return std::vector<std::string>{1, std::string("par[") + std::to_string(m_index) + "]"};
25  }
26  } // namespace formula
27 } // namespace reco
double evaluate(double const *iVariables, double const *iParameters) const final
std::vector< std::string > abstractSyntaxTree() const final