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
bool operator()(const edm::ObjectWithDict &o) const override
return true if the object is selected
std::shared_ptr< ComparisonBase > cmp_
std::shared_ptr< ExpressionBase > rhs_
fixed size matrix
std::shared_ptr< ExpressionBase > lhs_
BinarySelector(std::shared_ptr< ExpressionBase > lhs, std::shared_ptr< ComparisonBase > cmp, std::shared_ptr< ExpressionBase > rhs)