CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
12 // system include files
13 #include <memory>
14 
15 // user include files
18 
21 
23 
25 
27 {
28  produces<reco::CaloMuonCollection>();
29  inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
30  muonToken_ = consumes<reco::CaloMuonCollection>(inputCollection);
31 }
32 
34 {
35 }
36 
38 {
40  iEvent.getByToken(muonToken_,iMuons);
41  std::auto_ptr<reco::CaloMuonCollection> oMuons( new reco::CaloMuonCollection );
42  for ( reco::CaloMuonCollection::const_iterator muon = iMuons->begin();
43  muon != iMuons->end(); ++muon )
44  oMuons->push_back( *muon );
45  iEvent.put(oMuons);
46 }
47 
48 //define this as a plug-in
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::InputTag inputCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::vector< CaloMuon > CaloMuonCollection
collection of Muon objects
Definition: MuonFwd.h:27
int iEvent
Definition: GenABIO.cc:230
CaloMuonProducer(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_