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.

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag inputCollection
edm::EDGetTokenT< reco::CaloMuonCollection > 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.

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

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 }
edm::EDGetTokenT< reco::CaloMuonCollection > muonToken_
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511

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().