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
 
 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::CaloMuonCollectionmuonToken_
 

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::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:11725
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