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
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::InputTag inputCollection
~CaloMuonProducer() override
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_
int iEvent
Definition: GenABIO.cc:224
CaloMuonProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
def move(src, dest)
Definition: eostools.py:511