CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PreMixingMuonWorker< DigiCollection > Class Template Reference

#include <PreMixingMuonWorker.h>

Inheritance diagram for PreMixingMuonWorker< DigiCollection >:
PreMixingWorker

Public Member Functions

void addPileups (PileUpEventPrincipal const &pep, edm::EventSetup const &iSetup) override
 
void addSignals (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void initializeEvent (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
 PreMixingMuonWorker (const edm::ParameterSet &ps, edm::ProducesCollector producesCollector, edm::ConsumesCollector &&iC)
 
 PreMixingMuonWorker (const edm::ParameterSet &ps, edm::ProducesCollector, edm::ConsumesCollector &iC)
 
void put (edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
 
void put (edm::Event &iEvent)
 
 ~PreMixingMuonWorker () override=default
 
- Public Member Functions inherited from PreMixingWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &iLumi, edm::EventSetup const &iSetup)
 
virtual void beginRun (edm::Run const &iRun, edm::EventSetup const &iSetup)
 
virtual void endRun ()
 
virtual void finalizeBunchCrossing (edm::Event &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
virtual void initializeBunchCrossing (edm::Event const &iEvent, edm::EventSetup const &iSetup, int bunchCrossing)
 
 PreMixingWorker ()=default
 
virtual ~PreMixingWorker ()=default
 

Private Attributes

std::unique_ptr< DigiCollection > accumulated_
 
std::string collectionDM_
 
edm::InputTag pileupTag_
 
edm::EDGetTokenT< DigiCollection > signalToken_
 

Detailed Description

template<typename DigiCollection>
class PreMixingMuonWorker< DigiCollection >

Definition at line 15 of file PreMixingMuonWorker.h.

Constructor & Destructor Documentation

◆ PreMixingMuonWorker() [1/2]

template<typename DigiCollection>
PreMixingMuonWorker< DigiCollection >::PreMixingMuonWorker ( const edm::ParameterSet ps,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 17 of file PreMixingMuonWorker.h.

20  : PreMixingMuonWorker(ps, producesCollector, iC) {}
PreMixingMuonWorker(const edm::ParameterSet &ps, edm::ProducesCollector producesCollector, edm::ConsumesCollector &&iC)

◆ PreMixingMuonWorker() [2/2]

template<typename DigiCollection >
PreMixingMuonWorker< DigiCollection >::PreMixingMuonWorker ( const edm::ParameterSet ps,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector iC 
)

Definition at line 45 of file PreMixingMuonWorker.h.

49  pileupTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
50  collectionDM_(ps.getParameter<std::string>("collectionDM")) {
51  producesCollector.produces<DigiCollection>(collectionDM_);
52 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
edm::EDGetTokenT< DigiCollection > signalToken_

◆ ~PreMixingMuonWorker()

template<typename DigiCollection>
PreMixingMuonWorker< DigiCollection >::~PreMixingMuonWorker ( )
overridedefault

Member Function Documentation

◆ addPileups()

template<typename DigiCollection >
void PreMixingMuonWorker< DigiCollection >::addPileups ( PileUpEventPrincipal const &  pep,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 63 of file PreMixingMuonWorker.h.

Referenced by PreMixingCSCWorker::addPileups().

63  {
65  pep.getByLabel(pileupTag_, digis);
66  for (const auto& elem : *digis) {
67  accumulated_->put(elem.second, elem.first);
68  }
69 }
std::unique_ptr< DigiCollection > accumulated_

◆ addSignals()

template<typename DigiCollection >
void PreMixingMuonWorker< DigiCollection >::addSignals ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 55 of file PreMixingMuonWorker.h.

Referenced by PreMixingCSCWorker::addSignals().

55  {
57  iEvent.getByToken(signalToken_, digis);
58 
59  accumulated_ = std::make_unique<DigiCollection>(*digis); // for signal we can just copy
60 }
std::unique_ptr< DigiCollection > accumulated_
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< DigiCollection > signalToken_

◆ initializeEvent()

template<typename DigiCollection>
void PreMixingMuonWorker< DigiCollection >::initializeEvent ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
inlineoverridevirtual

Implements PreMixingWorker.

Definition at line 24 of file PreMixingMuonWorker.h.

24 {}

◆ put() [1/2]

template<typename DigiCollection>
void PreMixingMuonWorker< DigiCollection >::put ( edm::Event iEvent,
edm::EventSetup const &  iSetup,
std::vector< PileupSummaryInfo > const &  ps,
int  bunchSpacing 
)
inlineoverridevirtual

Implements PreMixingWorker.

Definition at line 27 of file PreMixingMuonWorker.h.

Referenced by PreMixingMuonWorker< CSCWireDigiCollection >::put(), and PreMixingCSCWorker::put().

30  {
31  put(iEvent);
32  }
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
int iEvent
Definition: GenABIO.cc:224

◆ put() [2/2]

template<typename DigiCollection >
void PreMixingMuonWorker< DigiCollection >::put ( edm::Event iEvent)

Definition at line 72 of file PreMixingMuonWorker.h.

72  {
74 }
std::unique_ptr< DigiCollection > accumulated_
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ accumulated_

template<typename DigiCollection>
std::unique_ptr<DigiCollection> PreMixingMuonWorker< DigiCollection >::accumulated_
private

Definition at line 41 of file PreMixingMuonWorker.h.

◆ collectionDM_

template<typename DigiCollection>
std::string PreMixingMuonWorker< DigiCollection >::collectionDM_
private

◆ pileupTag_

template<typename DigiCollection>
edm::InputTag PreMixingMuonWorker< DigiCollection >::pileupTag_
private

Definition at line 38 of file PreMixingMuonWorker.h.

◆ signalToken_

template<typename DigiCollection>
edm::EDGetTokenT<DigiCollection> PreMixingMuonWorker< DigiCollection >::signalToken_
private

Definition at line 37 of file PreMixingMuonWorker.h.