CMS 3D CMS Logo

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 (const std::string &bitToTest)
 
 SelectorByFlags (const std::vector< std::string > bitsToTest)
 
 SelectorByFlags (uint32_t maskToTest)
 

Private Attributes

uint32_t mask_
 

Detailed Description

Definition at line 7 of file PatSelectorByFlags.h.

Constructor & Destructor Documentation

◆ SelectorByFlags() [1/4]

pat::SelectorByFlags::SelectorByFlags ( )
inline

Definition at line 9 of file PatSelectorByFlags.h.

9 : mask_(0) { }

◆ SelectorByFlags() [2/4]

pat::SelectorByFlags::SelectorByFlags ( uint32_t  maskToTest)
inline

Definition at line 10 of file PatSelectorByFlags.h.

10 : mask_(~maskToTest) {}

◆ SelectorByFlags() [3/4]

pat::SelectorByFlags::SelectorByFlags ( const std::string &  bitToTest)

◆ SelectorByFlags() [4/4]

pat::SelectorByFlags::SelectorByFlags ( const std::vector< std::string >  bitsToTest)

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 13 of file PatSelectorByFlags.h.

13 { return pat::Flags::test(c, mask_); }

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

◆ operator()() [2/2]

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

Definition at line 14 of file PatSelectorByFlags.h.

14 { return (c == 0 ? false : pat::Flags::test(*c, mask_)); }

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

Member Data Documentation

◆ mask_

uint32_t pat::SelectorByFlags::mask_
private

Definition at line 16 of file PatSelectorByFlags.h.

Referenced by operator()().

pat::SelectorByFlags::mask_
uint32_t mask_
Definition: PatSelectorByFlags.h:16
pat::Flags::test
static bool test(uint32_t val, uint32_t mask)
Definition: Flags.h:28
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56