CMS 3D CMS Logo

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
16 
19 
21 
23 
25  produces<reco::CaloMuonCollection>();
26  inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
27  muonToken_ = consumes<reco::CaloMuonCollection>(inputCollection);
28 }
29 
31 
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
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:57
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