CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CaloMuonProducer Class Reference

#include <CaloMuonProducer.h>

Inheritance diagram for CaloMuonProducer:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 CaloMuonProducer (const edm::ParameterSet &)
 ~CaloMuonProducer ()

Private Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

edm::InputTag inputCollection

Detailed Description

Definition at line 20 of file CaloMuonProducer.h.


Constructor & Destructor Documentation

CaloMuonProducer::CaloMuonProducer ( const edm::ParameterSet iConfig) [explicit]

Definition at line 29 of file CaloMuonProducer.cc.

References edm::ParameterSet::getParameter(), and inputCollection.

{
   produces<reco::CaloMuonCollection>();
   inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
}
CaloMuonProducer::~CaloMuonProducer ( )

Definition at line 35 of file CaloMuonProducer.cc.

{
}

Member Function Documentation

void CaloMuonProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 39 of file CaloMuonProducer.cc.

References edm::Event::getByLabel(), inputCollection, metsig::muon, and edm::Event::put().

{
   edm::Handle<reco::CaloMuonCollection> iMuons;
   iEvent.getByLabel(inputCollection,iMuons);
   std::auto_ptr<reco::CaloMuonCollection> oMuons( new reco::CaloMuonCollection );
   for ( reco::CaloMuonCollection::const_iterator muon = iMuons->begin();
         muon != iMuons->end(); ++muon )
     oMuons->push_back( *muon );
   iEvent.put(oMuons);
}

Member Data Documentation

Definition at line 27 of file CaloMuonProducer.h.

Referenced by CaloMuonProducer(), and produce().