File indexing completed on 2024-04-06 12:11:31
0001
0002 #ifndef Fireworks_Core_FWExpressionEvaluator_h
0003 #define Fireworks_Core_FWExpressionEvaluator_h
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include <string>
0023 #include "FWCore/Reflection/interface/TypeWithDict.h"
0024
0025
0026 #include "CommonTools/Utils/interface/parser/ExpressionPtr.h"
0027 #include "CommonTools/Utils/interface/parser/ExpressionBase.h"
0028
0029
0030
0031 class FWExpressionEvaluator {
0032 public:
0033 FWExpressionEvaluator(const std::string& iExpression, const std::string& iClassName);
0034 virtual ~FWExpressionEvaluator();
0035
0036
0037
0038 const std::string& expression() const;
0039
0040 double evalExpression(const void*) const;
0041
0042
0043
0044
0045
0046 void setExpression(const std::string&);
0047 void setClassName(const std::string&);
0048
0049 private:
0050
0051
0052
0053
0054
0055 std::string m_expression;
0056 std::string m_className;
0057 reco::parser::ExpressionPtr m_expr;
0058 edm::TypeWithDict m_type;
0059 };
0060
0061 #endif