L1Trigger
L1TGEM
plugins
ME0TriggerProducer.cc
Go to the documentation of this file.
1
10
#include "
FWCore/Framework/interface/MakerMacros.h
"
11
#include "
FWCore/Framework/interface/ConsumesCollector.h
"
12
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
13
#include "
FWCore/Framework/interface/global/EDProducer.h
"
14
#include "
FWCore/Framework/interface/Event.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
16
#include "
FWCore/Utilities/interface/InputTag.h
"
17
#include "
FWCore/Framework/interface/ESHandle.h
"
18
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
19
#include "
L1Trigger/L1TGEM/interface/ME0TriggerBuilder.h
"
20
#include "
DataFormats/Common/interface/Handle.h
"
21
#include "
DataFormats/GEMDigi/interface/ME0PadDigiCollection.h
"
22
#include "
DataFormats/GEMDigi/interface/ME0TriggerDigiCollection.h
"
23
#include "
Geometry/Records/interface/MuonGeometryRecord.h
"
24
#include "
Geometry/GEMGeometry/interface/ME0Geometry.h
"
25
26
class
ME0TriggerBuilder
;
27
28
class
ME0TriggerProducer
:
public
edm::global::EDProducer
<> {
29
public
:
30
explicit
ME0TriggerProducer
(
const
edm::ParameterSet
&);
31
~ME0TriggerProducer
()
override
;
32
33
void
produce
(
edm::StreamID
,
edm::Event
&,
const
edm::EventSetup
&)
const override
;
34
35
private
:
36
edm::InputTag
me0PadDigis_
;
37
edm::EDGetTokenT<ME0PadDigiCollection>
me0_pad_token_
;
38
edm::ParameterSet
config_
;
39
};
40
41
ME0TriggerProducer::ME0TriggerProducer
(
const
edm::ParameterSet
& conf) {
42
me0PadDigis_
= conf.
getParameter
<
edm::InputTag
>(
"ME0PadDigis"
);
43
me0_pad_token_
= consumes<ME0PadDigiCollection>(
me0PadDigis_
);
44
config_
= conf;
45
46
// register what this produces
47
produces<ME0TriggerDigiCollection>();
48
}
49
50
ME0TriggerProducer::~ME0TriggerProducer
() {}
51
52
void
ME0TriggerProducer::produce
(
edm::StreamID
,
edm::Event
&
ev
,
const
edm::EventSetup
&
setup
)
const
{
53
edm::ESHandle<ME0Geometry>
h_me0;
54
setup
.get<
MuonGeometryRecord
>().
get
(h_me0);
55
56
edm::Handle<ME0PadDigiCollection>
me0PadDigis;
57
ev
.getByToken(
me0_pad_token_
, me0PadDigis);
58
const
ME0PadDigiCollection
* me0Pads = me0PadDigis.
product
();
59
60
// Create empty collection
61
std::unique_ptr<ME0TriggerDigiCollection> oc_trig(
new
ME0TriggerDigiCollection
);
62
63
std::unique_ptr<ME0TriggerBuilder> trigBuilder(
new
ME0TriggerBuilder
(
config_
));
64
trigBuilder->setME0Geometry(&*h_me0);
65
66
// Fill output collections if valid input collection is available.
67
trigBuilder->build(me0Pads, *oc_trig);
68
69
// Put collections in event.
70
ev
.put(
std::move
(oc_trig));
71
}
72
73
DEFINE_FWK_MODULE
(
ME0TriggerProducer
);
edm::StreamID
Definition:
StreamID.h:30
Handle.h
MessageLogger.h
ME0TriggerBuilder
Definition:
ME0TriggerBuilder.h:20
edm::Handle::product
T const * product() const
Definition:
Handle.h:70
ME0PadDigiCollection
ESHandle.h
edm::EDGetTokenT< ME0PadDigiCollection >
ME0TriggerProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition:
ME0TriggerProducer.cc:52
ME0TriggerDigiCollection.h
ME0TriggerProducer::me0_pad_token_
edm::EDGetTokenT< ME0PadDigiCollection > me0_pad_token_
Definition:
ME0TriggerProducer.cc:37
edm::Handle
Definition:
AssociativeIterator.h:50
singleTopDQM_cfi.setup
setup
Definition:
singleTopDQM_cfi.py:37
MakerMacros.h
ME0TriggerProducer
Definition:
ME0TriggerProducer.cc:28
ME0TriggerProducer::me0PadDigis_
edm::InputTag me0PadDigis_
Definition:
ME0TriggerProducer.cc:36
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
edm::ESHandle< ME0Geometry >
ME0TriggerBuilder.h
ME0PadDigiCollection.h
edm::global::EDProducer
Definition:
EDProducer.h:32
edm::ParameterSet
Definition:
ParameterSet.h:36
Event.h
edm::EventSetup
Definition:
EventSetup.h:57
ME0TriggerProducer::~ME0TriggerProducer
~ME0TriggerProducer() override
Definition:
ME0TriggerProducer.cc:50
get
#define get
InputTag.h
ME0TriggerProducer::config_
edm::ParameterSet config_
Definition:
ME0TriggerProducer.cc:38
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ME0Geometry.h
ME0TriggerDigiCollection
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
ev
bool ev
Definition:
Hydjet2Hadronizer.cc:95
ME0TriggerProducer::ME0TriggerProducer
ME0TriggerProducer(const edm::ParameterSet &)
Definition:
ME0TriggerProducer.cc:41
ConsumesCollector.h
ParameterSet.h
EDProducer.h
MuonGeometryRecord.h
edm::Event
Definition:
Event.h:73
MuonGeometryRecord
Definition:
MuonGeometryRecord.h:34
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16