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();
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
reco::parser::ExpressionCondition::cond_
SelectorPtr cond_
Definition: ExpressionCondition.h:35
reco::parser::ExpressionCondition::false_
ExpressionPtr false_
Definition: ExpressionCondition.h:34
SelectorStack.h
edm::ObjectWithDict
Definition: ObjectWithDict.h:17
writedatasetfile.parser
parser
Definition: writedatasetfile.py:7
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
ExpressionBase.h
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
reco::parser::ExpressionBase
Definition: ExpressionBase.h:21
ExpressionStack.h
reco::parser::ExpressionCondition::value
double value(const edm::ObjectWithDict &o) const override
Definition: ExpressionCondition.h:21
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition: ExpressionBase.h:25
reco::parser::SelectorPtr
std::shared_ptr< SelectorBase > SelectorPtr
Definition: SelectorPtr.h:18
reco::parser::ExpressionStack
std::vector< std::shared_ptr< ExpressionBase > > ExpressionStack
Definition: ExpressionStack.h:19
reco::parser::ExpressionCondition::true_
ExpressionPtr true_
Definition: ExpressionCondition.h:34
reco::parser::ExpressionCondition::ExpressionCondition
ExpressionCondition(ExpressionStack &expStack, SelectorStack &selStack)
Definition: ExpressionCondition.h:24
reco::parser::ExpressionCondition
Definition: ExpressionCondition.h:20
SelectorBase.h
reco::parser::SelectorStack
std::vector< SelectorPtr > SelectorStack
Definition: SelectorStack.h:18