CMS 3D CMS Logo

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

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

Private Attributes

edm::InputTag inputCollection
 
edm::EDGetTokenT< reco::CaloMuonCollectionmuonToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 21 of file CaloMuonProducer.h.

Constructor & Destructor Documentation

◆ CaloMuonProducer()

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

Definition at line 24 of file CaloMuonProducer.cc.

24  {
25  produces<reco::CaloMuonCollection>();
26  inputCollection = iConfig.getParameter<edm::InputTag>("inputCollection");
27  muonToken_ = consumes<reco::CaloMuonCollection>(inputCollection);
28 }

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

◆ ~CaloMuonProducer()

CaloMuonProducer::~CaloMuonProducer ( )
override

Definition at line 30 of file CaloMuonProducer.cc.

30 {}

Member Function Documentation

◆ produce()

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

Definition at line 32 of file CaloMuonProducer.cc.

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 }

References iEvent, eostools::move(), HLT_FULL_cff::muon, and muonToken_.

Member Data Documentation

◆ inputCollection

edm::InputTag CaloMuonProducer::inputCollection
private

Definition at line 28 of file CaloMuonProducer.h.

Referenced by CaloMuonProducer().

◆ muonToken_

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

Definition at line 29 of file CaloMuonProducer.h.

Referenced by CaloMuonProducer(), and produce().

muon
Definition: MuonCocktails.h:17
edm::Handle
Definition: AssociativeIterator.h:50
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11776
iEvent
int iEvent
Definition: GenABIO.cc:224
CaloMuonProducer::muonToken_
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_
Definition: CaloMuonProducer.h:29
eostools.move
def move(src, dest)
Definition: eostools.py:511
CaloMuonProducer::inputCollection
edm::InputTag inputCollection
Definition: CaloMuonProducer.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15