CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ExpressionUnaryOperator.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_ExpressionUnaryOperator_h
2 #define CommonTools_Utils_ExpressionUnaryOperator_h
3 /* \class reco::parser::ExpressionUnaryOperator
4  *
5  * Unary Operator expression
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted to Reflex by Luca Lista, INFN
9  *
10  * \version $Revision: 1.1 $
11  *
12  */
15 
16 namespace reco {
17  namespace parser {
18  template<typename Op>
20  virtual double value(const Reflex::Object& o) const {
21  return op_((*exp_).value(o));
22  }
24  exp_ = expStack.back(); expStack.pop_back();
25  }
26  private:
27  Op op_;
29  };
30  }
31 }
32 
33 #endif
boost::shared_ptr< ExpressionBase > ExpressionPtr
virtual double value(const Reflex::Object &o) const
std::vector< boost::shared_ptr< ExpressionBase > > ExpressionStack
ExpressionUnaryOperator(ExpressionStack &expStack)