CMS 3D CMS Logo

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
pat::SelectorByFlags::SelectorByFlags
SelectorByFlags()
Definition: PatSelectorByFlags.h:9
pat::SelectorByFlags::SelectorByFlags
SelectorByFlags(uint32_t maskToTest)
Definition: PatSelectorByFlags.h:10
pat::SelectorByFlags::mask_
uint32_t mask_
Definition: PatSelectorByFlags.h:16
pat::SelectorByFlags
Definition: PatSelectorByFlags.h:7
pat::Flags::test
static bool test(uint32_t val, uint32_t mask)
Definition: Flags.h:28
pat::SelectorByFlags::operator()
bool operator()(const reco::Candidate &c) const
Definition: PatSelectorByFlags.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pat
Definition: HeavyIon.h:7
reco::Candidate
Definition: Candidate.h:27
Flags.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
pat::SelectorByFlags::operator()
bool operator()(const reco::Candidate *c) const
Definition: PatSelectorByFlags.h:14