Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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/ParameterSet/interface/ParameterSet.h
"
18
#include "
FWCore/Utilities/interface/InputTag.h
"
19
#include "
CommonTools/UtilAlgos/interface/ParameterAdapter.h
"
20
#include "
CommonTools/UtilAlgos/interface/CollectionFilterTrait.h
"
21
#include "
CommonTools/UtilAlgos/interface/EventSelectorBase.h
"
22
23
template
<
typename
C
,
24
typename
S =
AnySelector
,
25
typename
N
=
MinNumberSelector
,
26
typename
CS =
typename
helper::CollectionFilterTrait<C, S, N>::type
>
27
class
ObjectCountEventSelector
:
public
EventSelectorBase
28
{
29
public
:
31
explicit
ObjectCountEventSelector
(
const
edm::ParameterSet
& cfg ) :
32
src_
( cfg.
template
getParameter<edm::InputTag>(
"src"
) ),
33
select_
(
reco
::modules::
make
<S>( cfg ) ),
34
sizeSelect_
(
reco
::modules::
make
<N>( cfg ) ) {
35
}
36
37
bool
operator()
(
edm::Event
& evt,
const
edm::EventSetup
&) {
38
edm::Handle<C>
source
;
39
evt.
getByLabel
(
src_
, source );
40
return
CS::filter
( * source,
select_
,
sizeSelect_
);
41
}
42
43
private
:
45
edm::InputTag
src_
;
46
48
S
select_
;
49
51
N
sizeSelect_
;
52
};
53
54
#endif
55
helper::CollectionFilter
Definition:
CollectionFilterTrait.h:14
Event.h
reco::modules::make
S make(const edm::ParameterSet &cfg)
Definition:
ParameterAdapter.h:17
MinNumberSelector
Definition:
MinNumberSelector.h:10
funct::C
C
Definition:
Factorize.h:141
alcazmumu_cfi.filter
tuple filter
Definition:
alcazmumu_cfi.py:34
edm::Handle
Definition:
AssociativeIterator.h:48
EventSelectorBase
Definition:
EventSelectorBase.h:20
ObjectCountEventSelector
Definition:
ObjectCountEventSelector.h:27
ParameterSet.h
L1Trigger_dataformats.reco
dictionary reco
Definition:
L1Trigger_dataformats.py:9
ObjectCountEventSelector::ObjectCountEventSelector
ObjectCountEventSelector(const edm::ParameterSet &cfg)
constructor
Definition:
ObjectCountEventSelector.h:31
ObjectCountEventSelector::select_
S select_
object filter
Definition:
ObjectCountEventSelector.h:48
edm::EventSetup
Definition:
EventSetup.h:44
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:361
ObjectCountEventSelector::operator()
bool operator()(edm::Event &evt, const edm::EventSetup &)
Definition:
ObjectCountEventSelector.h:37
N
#define N
Definition:
blowfish.cc:9
ObjectCountEventSelector::sizeSelect_
N sizeSelect_
minimum number of entries in a collection
Definition:
ObjectCountEventSelector.h:51
EventSelectorBase.h
CollectionFilterTrait.h
AnySelector
Definition:
AnySelector.h:10
edm::InputTag
Definition:
InputTag.h:17
InputTag.h
LaserTracksInput_cfi.source
tuple source
Definition:
LaserTracksInput_cfi.py:5
ParameterAdapter.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:56
ObjectCountEventSelector::src_
edm::InputTag src_
source collection label
Definition:
ObjectCountEventSelector.h:45
svgfig.template
def template
Definition:
svgfig.py:520
Generated for CMSSW Reference Manual by
1.8.5