PhysicsTools
PatUtils
interface
PatSelectorByFlags.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_PatUtils_interface_PatSelectorByFlags_h
2
#define PhysicsTools_PatUtils_interface_PatSelectorByFlags_h
3
4
#include "
DataFormats/PatCandidates/interface/Flags.h
"
5
6
namespace
pat
{
7
class
SelectorByFlags
{
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
pat
Definition:
HeavyIon.h:7
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
reco::Candidate
Definition:
Candidate.h:27
Flags.h
c
auto & c
Definition:
CAHitNtupletGeneratorKernelsImpl.h:56
pat::SelectorByFlags::operator()
bool operator()(const reco::Candidate *c) const
Definition:
PatSelectorByFlags.h:14
Generated for CMSSW Reference Manual by
1.8.16