Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:45:42

0001 // -*- C++ -*-
0002 //
0003 // Package:     CommonTools/Utils
0004 // Class  :     reco::formula::ParameterEvaluator
0005 //
0006 // Implementation:
0007 //     [Notes on implementation]
0008 //
0009 // Original Author:  Christopher Jones
0010 //         Created:  Wed, 23 Sep 2015 18:06:29 GMT
0011 //
0012 
0013 // system include files
0014 
0015 // user include files
0016 #include "formulaParameterEvaluator.h"
0017 
0018 namespace reco {
0019   namespace formula {
0020     double ParameterEvaluator::evaluate(double const* /*iVariables*/, double const* iParameters) const {
0021       return iParameters[m_index];
0022     }
0023     std::vector<std::string> ParameterEvaluator::abstractSyntaxTree() const {
0024       return std::vector<std::string>{1, std::string("par[") + std::to_string(m_index) + "]"};
0025     }
0026   }  // namespace formula
0027 }  // namespace reco