CommonTools
UtilAlgos
interface
EventSelectorAdapter.h
Go to the documentation of this file.
1
#ifndef CommonTools_UtilAlgos_EventSelectorAdapter_h
2
#define CommonTools_UtilAlgos_EventSelectorAdapter_h
3
16
#include "
FWCore/Framework/interface/global/EDFilter.h
"
17
#include "
FWCore/Framework/interface/Event.h
"
18
#include "
FWCore/Framework/interface/EventSetup.h
"
19
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
20
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
21
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
22
23
template
<
typename
T>
24
class
EventSelectorAdapter
:
public
edm::global::EDFilter
<> {
25
public
:
26
// constructor
27
explicit
EventSelectorAdapter
(
const
edm::ParameterSet
&
cfg
) :
eventSelector_
(
cfg
,
consumesCollector
()) {}
28
29
// destructor
30
~EventSelectorAdapter
()
override
{}
31
32
static
void
fillDescriptions
(
edm::ConfigurationDescriptions
& descriptions) {
33
edm::ParameterSetDescription
desc;
34
T::fillPSetDescription
(desc);
35
descriptions.
addWithDefaultLabel
(desc);
36
}
37
38
private
:
39
bool
filter
(
edm::StreamID
,
edm::Event
& evt,
const
edm::EventSetup
& es)
const override
{
40
return
eventSelector_
(evt, es);
41
}
42
43
T
eventSelector_
;
44
};
45
46
#endif
ConfigurationDescriptions.h
edm::StreamID
Definition:
StreamID.h:30
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition:
EDConsumerBase.cc:71
EventSelectorAdapter::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition:
EventSelectorAdapter.h:32
EventSelectorAdapter::EventSelectorAdapter
EventSelectorAdapter(const edm::ParameterSet &cfg)
Definition:
EventSelectorAdapter.h:27
ParameterSetDescription.h
EventSelectorAdapter::eventSelector_
T eventSelector_
Definition:
EventSelectorAdapter.h:43
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
EventSelectorAdapter::filter
bool filter(edm::StreamID, edm::Event &evt, const edm::EventSetup &es) const override
Definition:
EventSelectorAdapter.h:39
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
reco::modules::fillPSetDescription
void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition:
ParameterAdapter.h:34
edm::EventSetup
Definition:
EventSetup.h:57
looper.cfg
cfg
Definition:
looper.py:297
T
long double T
Definition:
Basic3DVectorLD.h:48
EventSetup.h
edm::global::EDFilter
Definition:
EDFilter.h:32
EventSelectorAdapter
Definition:
EventSelectorAdapter.h:24
EventSelectorAdapter::~EventSelectorAdapter
~EventSelectorAdapter() override
Definition:
EventSelectorAdapter.h:30
ParameterSet.h
edm::Event
Definition:
Event.h:73
EDFilter.h
edm::ConfigurationDescriptions::addWithDefaultLabel
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:87
Generated for CMSSW Reference Manual by
1.8.16