CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
CaloMuonProducer Class Reference

#include <CaloMuonProducer.h>

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

Public Member Functions

 CaloMuonProducer (const edm::ParameterSet &)
 
 ~CaloMuonProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

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

Private Attributes

edm::InputTag inputCollection
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

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.

30 {
31  produces<reco::CaloMuonCollection>();
32  inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
33 }
T getParameter(std::string const &) const
edm::InputTag inputCollection
CaloMuonProducer::~CaloMuonProducer ( )

Definition at line 35 of file CaloMuonProducer.cc.

36 {
37 }

Member Function Documentation

void CaloMuonProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 39 of file CaloMuonProducer.cc.

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

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 }
edm::InputTag inputCollection
std::vector< CaloMuon > CaloMuonCollection
collection of Muon objects
Definition: MuonFwd.h:27
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

Member Data Documentation

edm::InputTag CaloMuonProducer::inputCollection
private

Definition at line 27 of file CaloMuonProducer.h.

Referenced by CaloMuonProducer(), and produce().