CMS 3D CMS Logo

ExpressionBinaryOperator.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_ExpressionBinaryOperator_h
2 #define CommonTools_Utils_ExpressionBinaryOperator_h
3 /* \class reco::parser::ExpressionBinaryOperator
4  *
5  * Binary Operator expression
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted by Luca Lista, INFN
9  *
10  * \version $Revision: 1.2 $
11  *
12  */
15 
16 namespace reco {
17  namespace parser {
18  template <typename Op>
20  double value(const edm::ObjectWithDict& o) const override { return op_((*lhs_).value(o), (*rhs_).value(o)); }
22  rhs_ = expStack.back();
23  expStack.pop_back();
24  lhs_ = expStack.back();
25  expStack.pop_back();
26  }
27 
28  private:
29  Op op_;
31  };
32  } // namespace parser
33 } // namespace reco
34 
35 #endif
reco::parser::ExpressionBinaryOperator::lhs_
ExpressionPtr lhs_
Definition: ExpressionBinaryOperator.h:30
edm::ObjectWithDict
Definition: ObjectWithDict.h:17
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
ExpressionBase.h
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:42
reco::parser::ExpressionBase
Definition: ExpressionBase.h:21
reco::parser::ExpressionBinaryOperator::value
double value(const edm::ObjectWithDict &o) const override
Definition: ExpressionBinaryOperator.h:20
ExpressionStack.h
reco::parser::ExpressionBinaryOperator
Definition: ExpressionBinaryOperator.h:19
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition: ExpressionBase.h:25
reco::parser::ExpressionStack
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
Definition: ExpressionStack.h:19
reco::parser::ExpressionBinaryOperator::rhs_
ExpressionPtr rhs_
Definition: ExpressionBinaryOperator.h:30
reco::parser::ExpressionBinaryOperator::ExpressionBinaryOperator
ExpressionBinaryOperator(ExpressionStack &expStack)
Definition: ExpressionBinaryOperator.h:21
reco::parser::ExpressionBinaryOperator::op_
Op op_
Definition: ExpressionBinaryOperator.h:29