#include <MuonLinksProducer.h>
Public Member Functions | |
MuonLinksProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~MuonLinksProducer () |
Private Attributes | |
edm::InputTag | m_inputCollection |
Definition at line 27 of file MuonLinksProducer.h.
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.
{ }
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 ); }
Definition at line 36 of file MuonLinksProducer.h.
Referenced by MuonLinksProducer(), and produce().