CMS 3D CMS Logo

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(); expStack.pop_back();
26  true_ = expStack.back(); expStack.pop_back();
27  cond_ = selStack.back(); selStack.pop_back();
28  }
29  private:
32  };
33  }
34 }
35 
36 #endif
double value(const edm::ObjectWithDict &o) const override
boost::shared_ptr< ExpressionBase > ExpressionPtr
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
fixed size matrix