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  */
16 
17 namespace reco {
18  namespace parser {
20  double value(const edm::ObjectWithDict& o) const override {
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
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