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)
 
void put (edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
 
 ~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() [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 }

◆ ~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.

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

Referenced by PreMixingCSCWorker::addPileups().

◆ 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.

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

Referenced by PreMixingCSCWorker::addSignals().

◆ 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)

Definition at line 72 of file PreMixingMuonWorker.h.

72  {
74 }

◆ put() [2/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.

30  {
31  put(iEvent);
32  }

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

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.

PreMixingMuonWorker::collectionDM_
std::string collectionDM_
Definition: PreMixingMuonWorker.h:39
PreMixingMuonWorker::pileupTag_
edm::InputTag pileupTag_
Definition: PreMixingMuonWorker.h:38
edm::Handle
Definition: AssociativeIterator.h:50
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:49
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PreMixingMuonWorker::accumulated_
std::unique_ptr< DigiCollection > accumulated_
Definition: PreMixingMuonWorker.h:41
iEvent
int iEvent
Definition: GenABIO.cc:224
PreMixingMuonWorker::PreMixingMuonWorker
PreMixingMuonWorker(const edm::ParameterSet &ps, edm::ProducesCollector producesCollector, edm::ConsumesCollector &&iC)
Definition: PreMixingMuonWorker.h:17
edm::ProducesCollector::produces
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
Definition: ProducesCollector.h:52
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
siStripShotFilter_cfi.DigiCollection
DigiCollection
Definition: siStripShotFilter_cfi.py:6
eostools.move
def move(src, dest)
Definition: eostools.py:511
PreMixingMuonWorker::put
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
Definition: PreMixingMuonWorker.h:27
PreMixingMuonWorker::signalToken_
edm::EDGetTokenT< DigiCollection > signalToken_
Definition: PreMixingMuonWorker.h:37
edm::InputTag
Definition: InputTag.h:15