CMS 3D CMS Logo

Public Member Functions | Private Attributes

MuonLinksProducer Class Reference

#include <MuonLinksProducer.h>

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

List of all members.

Public Member Functions

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

Private Attributes

edm::InputTag m_inputCollection

Detailed Description

Definition at line 27 of file MuonLinksProducer.h.


Constructor & Destructor Documentation

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

Definition at line 34 of file MuonLinksProducer.cc.

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

{
   produces<reco::MuonTrackLinksCollection>();
   m_inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
}
MuonLinksProducer::~MuonLinksProducer ( ) [virtual]

Definition at line 40 of file MuonLinksProducer.cc.

{
}

Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 44 of file MuonLinksProducer.cc.

References edm::Event::getByLabel(), m_inputCollection, metsig::muon, patZpeak::muons, convertSQLitetoXML_cfg::output, and edm::Event::put().

{
   std::auto_ptr<reco::MuonTrackLinksCollection> output(new reco::MuonTrackLinksCollection());
   edm::Handle<reco::MuonCollection> muons; 
   iEvent.getByLabel(m_inputCollection, muons);
   
   for ( reco::MuonCollection::const_iterator muon = muons->begin(); 
         muon != muons->end(); ++muon )
     {
        if ( ! muon->isGlobalMuon() ) continue;
        output->push_back( reco::MuonTrackLinks( muon->track(), muon->standAloneMuon(), muon->combinedMuon() ) );
     }
   iEvent.put( output );
}

Member Data Documentation

Definition at line 36 of file MuonLinksProducer.h.

Referenced by MuonLinksProducer(), and produce().