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 // $Id: CaloMuonProducer.cc,v 1.4 2009/09/07 04:49:15 dmytro Exp $
9 //
10 //
11 
12 
13 // system include files
14 #include <memory>
15 
16 // user include files
19 
22 
24 
28 
30 {
31  produces<reco::CaloMuonCollection>();
32  inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
33 }
34 
36 {
37 }
38 
40 {
42  iEvent.getByLabel(inputCollection,iMuons);
43  std::auto_ptr<reco::CaloMuonCollection> oMuons( new reco::CaloMuonCollection );
44  for ( reco::CaloMuonCollection::const_iterator muon = iMuons->begin();
45  muon != iMuons->end(); ++muon )
46  oMuons->push_back( *muon );
47  iEvent.put(oMuons);
48 }
49 
50 //define this as a plug-in
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
edm::InputTag inputCollection
#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:243
CaloMuonProducer(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355