CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  */
17 
18 namespace reco {
19  namespace parser {
21  double value(const edm::ObjectWithDict& o) const override {
22  return (*cond_)(o) ? true_->value(o) : false_->value(o);
23  }
25  false_ = expStack.back();
26  expStack.pop_back();
27  true_ = expStack.back();
28  expStack.pop_back();
29  cond_ = selStack.back();
30  selStack.pop_back();
31  }
32 
33  private:
36  };
37  } // namespace parser
38 } // namespace reco
39 
40 #endif
std::shared_ptr< ExpressionBase > ExpressionPtr
ExpressionCondition(ExpressionStack &expStack, SelectorStack &selStack)
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
std::vector< SelectorPtr > SelectorStack
Definition: SelectorStack.h:18
double value(const edm::ObjectWithDict &o) const override
std::shared_ptr< SelectorBase > SelectorPtr
Definition: SelectorPtr.h:18