Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
CommonTools
UtilAlgos
interface
ObjectCountEventSelector.h
Go to the documentation of this file.
1
#ifndef CommonTools_UtilAlgos_ObjectCountEventSelector_h
2
#define CommonTools_UtilAlgos_ObjectCountEventSelector_h
3
16
#include "
FWCore/Framework/interface/Event.h
"
17
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
18
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
19
#include "
FWCore/Utilities/interface/InputTag.h
"
20
#include "
CommonTools/UtilAlgos/interface/ParameterAdapter.h
"
21
#include "
CommonTools/UtilAlgos/interface/CollectionFilterTrait.h
"
22
#include "
CommonTools/UtilAlgos/interface/EventSelectorBase.h
"
23
24
template
<
typename
C
,
25
typename
S
=
AnySelector
,
26
typename
N
=
MinNumberSelector
,
27
typename
CS =
typename
helper::CollectionFilterTrait<C, S, N>::type
>
28
class
ObjectCountEventSelector
:
public
EventSelectorBase
29
{
30
public
:
32
explicit
ObjectCountEventSelector
(
const
edm::ParameterSet
&
cfg
,
edm::ConsumesCollector
&& iC ) :
33
srcToken_
( iC.consumes<
C
>(cfg.
template
getParameter<edm::
InputTag
>(
"src"
) ) ),
34
select_
(
reco
::
modules
::
make
<
S
>( cfg, iC ) ),
35
sizeSelect_
(
reco
::
modules
::
make
<N>( cfg, iC ) ) {
36
}
37
38
bool
operator()
(
edm::Event
& evt,
const
edm::EventSetup
&)
const
{
39
edm::Handle<C>
source
;
40
evt.
getByToken
(
srcToken_
, source );
41
return
CS::filter
( * source,
select_
,
sizeSelect_
);
42
}
43
44
private
:
46
edm::EDGetTokenT<C>
srcToken_
;
47
49
S
select_
;
50
52
N
sizeSelect_
;
53
};
54
55
#endif
56
looper.cfg
tuple cfg
Definition:
looper.py:293
helper::CollectionFilter
Definition:
CollectionFilterTrait.h:14
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition:
Event.h:462
Event.h
edmConvertToStreamModule.modules
list modules
Definition:
edmConvertToStreamModule.py:120
ObjectCountEventSelector::ObjectCountEventSelector
ObjectCountEventSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
constructor
Definition:
ObjectCountEventSelector.h:32
edm::Handle
Definition:
AssociativeIterator.h:47
reco::modules::make
S make(const edm::ParameterSet &cfg)
Definition:
ParameterAdapter.h:24
MinNumberSelector
Definition:
MinNumberSelector.h:10
funct::C
C
Definition:
Factorize.h:141
alcazmumu_cfi.filter
tuple filter
Definition:
alcazmumu_cfi.py:34
dt_dqm_sourceclient_common_cff.reco
tuple reco
Definition:
dt_dqm_sourceclient_common_cff.py:107
EventSelectorBase
Definition:
EventSelectorBase.h:20
ObjectCountEventSelector
Definition:
ObjectCountEventSelector.h:28
edm::EDGetTokenT< C >
ParameterSet.h
HLT_25ns10e33_v2_cff.InputTag
tuple InputTag
Definition:
HLT_25ns10e33_v2_cff.py:58467
ObjectCountEventSelector::select_
S select_
object filter
Definition:
ObjectCountEventSelector.h:49
edm::EventSetup
Definition:
EventSetup.h:45
N
#define N
Definition:
blowfish.cc:9
ObjectCountEventSelector::sizeSelect_
N sizeSelect_
minimum number of entries in a collection
Definition:
ObjectCountEventSelector.h:52
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition:
Particle.cc:99
EventSelectorBase.h
CollectionFilterTrait.h
AnySelector
Definition:
AnySelector.h:10
InputTag.h
ObjectCountEventSelector::operator()
bool operator()(edm::Event &evt, const edm::EventSetup &) const
Definition:
ObjectCountEventSelector.h:38
ParameterAdapter.h
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::Event
Definition:
Event.h:65
ConsumesCollector.h
source
static std::string const source
Definition:
EdmProvDump.cc:43
svgfig.template
def template
Definition:
svgfig.py:520
ObjectCountEventSelector::srcToken_
edm::EDGetTokenT< C > srcToken_
source collection label
Definition:
ObjectCountEventSelector.h:46
edm::ConsumesCollector
Definition:
ConsumesCollector.h:39
Generated for CMSSW Reference Manual by
1.8.5