RecoMuon
MuonIdentification
plugins
CaloMuonProducer.cc
Go to the documentation of this file.
1
// -*- C++ -*-
2
//
3
// Package: CaloMuonProducer
4
// Class: CaloMuonProducer
5
//
6
// Original Author: Dmytro Kovalskyi
7
// Created: Wed Oct 3 16:29:03 CDT 2007
8
//
9
//
10
11
// system include files
12
#include <memory>
13
14
// user include files
15
#include "
FWCore/Framework/interface/Frameworkfwd.h
"
16
17
#include "
FWCore/Framework/interface/Event.h
"
18
#include "
FWCore/Framework/interface/MakerMacros.h
"
19
20
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
21
22
#include "
RecoMuon/MuonIdentification/plugins/CaloMuonProducer.h
"
23
24
CaloMuonProducer::CaloMuonProducer
(
const
edm::ParameterSet
& iConfig) {
25
produces<reco::CaloMuonCollection>();
26
inputCollection
= iConfig.
getParameter
<
edm::InputTag
>(
"inputCollection"
);
27
muonToken_
= consumes<reco::CaloMuonCollection>(
inputCollection
);
28
}
29
30
CaloMuonProducer::~CaloMuonProducer
() {}
31
32
void
CaloMuonProducer::produce
(
edm::Event
&
iEvent
,
const
edm::EventSetup
& iSetup) {
33
edm::Handle<reco::CaloMuonCollection>
iMuons;
34
iEvent
.getByToken(
muonToken_
, iMuons);
35
auto
oMuons = std::make_unique<reco::CaloMuonCollection>();
36
for
(reco::CaloMuonCollection::const_iterator
muon
= iMuons->begin();
muon
!= iMuons->end(); ++
muon
)
37
oMuons->push_back(*
muon
);
38
iEvent
.put(
std::move
(oMuons));
39
}
40
41
//define this as a plug-in
42
DEFINE_FWK_MODULE
(
CaloMuonProducer
);
CaloMuonProducer
Definition:
CaloMuonProducer.h:21
CaloMuonProducer::CaloMuonProducer
CaloMuonProducer(const edm::ParameterSet &)
Definition:
CaloMuonProducer.cc:24
muon
Definition:
MuonCocktails.h:17
CaloMuonProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition:
CaloMuonProducer.cc:32
edm::Handle
Definition:
AssociativeIterator.h:50
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition:
MakerMacros.h:16
HLT_FULL_cff.muon
muon
Definition:
HLT_FULL_cff.py:11710
edm::ParameterSet
Definition:
ParameterSet.h:47
Event.h
CaloMuonProducer::~CaloMuonProducer
~CaloMuonProducer() override
Definition:
CaloMuonProducer.cc:30
iEvent
int iEvent
Definition:
GenABIO.cc:224
edm::EventSetup
Definition:
EventSetup.h:58
CaloMuonProducer.h
CaloMuonProducer::muonToken_
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_
Definition:
CaloMuonProducer.h:29
eostools.move
def move(src, dest)
Definition:
eostools.py:511
Frameworkfwd.h
CaloMuonProducer::inputCollection
edm::InputTag inputCollection
Definition:
CaloMuonProducer.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition:
ParameterSet.h:303
ParameterSet.h
edm::Event
Definition:
Event.h:73
edm::InputTag
Definition:
InputTag.h:15
Generated for CMSSW Reference Manual by
1.8.16