test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ExpressionCondition.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_ExpressionCondition_h
2 #define CommonTools_Utils_ExpressionCondition_h
3 /* \class reco::parser::ExpressionCondition
4  *
5  * Unary Operator expression
6  *
7  * \author original version: Chris Jones, Cornell,
8  * adapted by Luca Lista, INFN
9  *
10  * \version $Revision: 1.2 $
11  *
12  */
16 
17 namespace reco {
18  namespace parser {
20  virtual double value(const edm::ObjectWithDict& o) const {
21  return (*cond_)(o) ? true_->value(o) : false_->value(o);
22  }
24  false_ = expStack.back(); expStack.pop_back();
25  true_ = expStack.back(); expStack.pop_back();
26  cond_ = selStack.back(); selStack.pop_back();
27  }
28  private:
31  };
32  }
33 }
34 
35 #endif
boost::shared_ptr< ExpressionBase > ExpressionPtr
virtual double value(const edm::ObjectWithDict &o) const
ExpressionCondition(ExpressionStack &expStack, SelectorStack &selStack)
std::vector< boost::shared_ptr< ExpressionBase > > ExpressionStack
std::vector< SelectorPtr > SelectorStack
Definition: SelectorStack.h:18
boost::shared_ptr< SelectorBase > SelectorPtr
Definition: SelectorPtr.h:17