CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PatSelectorByFlags.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_PatUtils_interface_PatSelectorByFlags_h
2 #define PhysicsTools_PatUtils_interface_PatSelectorByFlags_h
3 
5 
6 namespace pat {
8  public:
9  SelectorByFlags() : mask_(0) { }
10  SelectorByFlags(uint32_t maskToTest) : mask_(~maskToTest) {}
11  SelectorByFlags(const std::string &bitToTest) ;
12  SelectorByFlags(const std::vector<std::string> bitsToTest) ;
13  bool operator()(const reco::Candidate &c) const { return pat::Flags::test(c, mask_); }
14  bool operator()(const reco::Candidate *c) const { return (c == 0 ? false : pat::Flags::test(*c, mask_)); }
15  private:
16  uint32_t mask_;
17  };
18 }
19 #endif
static bool test(uint32_t val, uint32_t mask)
Definition: Flags.h:28
SelectorByFlags(uint32_t maskToTest)
bool operator()(const reco::Candidate *c) const
bool operator()(const reco::Candidate &c) const