CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
pat::SelectorByFlags Class Reference

#include <PatSelectorByFlags.h>

Public Member Functions

bool operator() (const reco::Candidate &c) const
 
bool operator() (const reco::Candidate *c) const
 
 SelectorByFlags ()
 
 SelectorByFlags (uint32_t maskToTest)
 
 SelectorByFlags (const std::string &bitToTest)
 
 SelectorByFlags (const std::vector< std::string > bitsToTest)
 

Private Attributes

uint32_t mask_
 

Detailed Description

Definition at line 7 of file PatSelectorByFlags.h.

Constructor & Destructor Documentation

pat::SelectorByFlags::SelectorByFlags ( )
inline

Definition at line 9 of file PatSelectorByFlags.h.

9 : mask_(0) { }
pat::SelectorByFlags::SelectorByFlags ( uint32_t  maskToTest)
inline

Definition at line 10 of file PatSelectorByFlags.h.

10 : mask_(~maskToTest) {}
pat::SelectorByFlags::SelectorByFlags ( const std::string &  bitToTest)
pat::SelectorByFlags::SelectorByFlags ( const std::vector< std::string >  bitsToTest)

Member Function Documentation

bool pat::SelectorByFlags::operator() ( const reco::Candidate c) const
inline

Definition at line 13 of file PatSelectorByFlags.h.

References mask_, and pat::Flags::test().

13 { return pat::Flags::test(c, mask_); }
static bool test(uint32_t val, uint32_t mask)
Definition: Flags.h:30
bool pat::SelectorByFlags::operator() ( const reco::Candidate c) const
inline

Definition at line 14 of file PatSelectorByFlags.h.

References mask_, and pat::Flags::test().

14 { return (c == 0 ? false : pat::Flags::test(*c, mask_)); }
static bool test(uint32_t val, uint32_t mask)
Definition: Flags.h:30

Member Data Documentation

uint32_t pat::SelectorByFlags::mask_
private

Definition at line 16 of file PatSelectorByFlags.h.

Referenced by operator()().