CMS 3D CMS Logo

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

#include <CaloMuonProducer.h>

Inheritance diagram for CaloMuonProducer:
edm::stream::EDProducer<>

Public Member Functions

 CaloMuonProducer (const edm::ParameterSet &)
 
 ~CaloMuonProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

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

Private Attributes

edm::InputTag inputCollection
 
edm::EDGetTokenT
< reco::CaloMuonCollection
muonToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 21 of file CaloMuonProducer.h.

Constructor & Destructor Documentation

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

Definition at line 24 of file CaloMuonProducer.cc.

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

24  {
25  produces<reco::CaloMuonCollection>();
26  inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
27  muonToken_ = consumes<reco::CaloMuonCollection>(inputCollection);
28 }
edm::InputTag inputCollection
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CaloMuonProducer::~CaloMuonProducer ( )
override

Definition at line 30 of file CaloMuonProducer.cc.

30 {}

Member Function Documentation

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

Definition at line 32 of file CaloMuonProducer.cc.

References edm::Event::getByToken(), eostools::move(), HLT_FULL_cff::muon, muonToken_, and edm::Event::put().

32  {
34  iEvent.getByToken(muonToken_, iMuons);
35  auto oMuons = std::make_unique<reco::CaloMuonCollection>();
36  for (reco::CaloMuonCollection::const_iterator muon = iMuons->begin(); muon != iMuons->end(); ++muon)
37  oMuons->push_back(*muon);
38  iEvent.put(std::move(oMuons));
39 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_
def move
Definition: eostools.py:511

Member Data Documentation

edm::InputTag CaloMuonProducer::inputCollection
private

Definition at line 28 of file CaloMuonProducer.h.

Referenced by CaloMuonProducer().

edm::EDGetTokenT<reco::CaloMuonCollection> CaloMuonProducer::muonToken_
private

Definition at line 29 of file CaloMuonProducer.h.

Referenced by CaloMuonProducer(), and produce().