CMS 3D CMS Logo

BinarySelector.h
Go to the documentation of this file.
1 #ifndef CommonTools_Utils_BinarySelector_h
2 #define CommonTools_Utils_BinarySelector_h
3 /* \class reco::parser::BinarySelector
4  *
5  * Binary selector
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 {
19  struct BinarySelector : public SelectorBase {
20  BinarySelector(std::shared_ptr<ExpressionBase> lhs,
21  std::shared_ptr<ComparisonBase> cmp,
22  std::shared_ptr<ExpressionBase> rhs)
23  : lhs_(lhs), cmp_(cmp), rhs_(rhs) {}
24  bool operator()(const edm::ObjectWithDict& o) const override {
25  return cmp_->compare(lhs_->value(o), rhs_->value(o));
26  }
27  std::shared_ptr<ExpressionBase> lhs_;
28  std::shared_ptr<ComparisonBase> cmp_;
29  std::shared_ptr<ExpressionBase> rhs_;
30  };
31  } // namespace parser
32 } // namespace reco
33 
34 #endif
reco::parser::BinarySelector::lhs_
std::shared_ptr< ExpressionBase > lhs_
Definition: BinarySelector.h:27
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::BinarySelector::operator()
bool operator()(const edm::ObjectWithDict &o) const override
return true if the object is selected
Definition: BinarySelector.h:24
reco::parser::BinarySelector::cmp_
std::shared_ptr< ComparisonBase > cmp_
Definition: BinarySelector.h:28
reco::parser::BinarySelector
Definition: BinarySelector.h:19
fileCollector.cmp
cmp
Definition: fileCollector.py:125
reco::parser::BinarySelector::rhs_
std::shared_ptr< ExpressionBase > rhs_
Definition: BinarySelector.h:29
reco::parser::BinarySelector::BinarySelector
BinarySelector(std::shared_ptr< ExpressionBase > lhs, std::shared_ptr< ComparisonBase > cmp, std::shared_ptr< ExpressionBase > rhs)
Definition: BinarySelector.h:20
reco::parser::SelectorBase
Definition: SelectorBase.h:19
ComparisonBase.h
SelectorBase.h