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

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.

Referenced by PreMixingMuonWorker< CSCWireDigiCollection >::PreMixingMuonWorker().

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

Definition at line 45 of file PreMixingMuonWorker.h.

References PreMixingMuonWorker< DigiCollection >::collectionDM_, siStripShotFilter_cfi::DigiCollection, and edm::ProducesCollector::produces().

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
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
edm::EDGetTokenT< DigiCollection > signalToken_
template<typename DigiCollection>
PreMixingMuonWorker< DigiCollection >::~PreMixingMuonWorker ( )
overridedefault

Member Function Documentation

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.

References PreMixingMuonWorker< DigiCollection >::accumulated_, HTMLExport::elem(), PileUpEventPrincipal::getByLabel(), and PreMixingMuonWorker< DigiCollection >::pileupTag_.

Referenced by PreMixingMuonWorker< CSCWireDigiCollection >::initializeEvent().

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_
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:19
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.

References PreMixingMuonWorker< DigiCollection >::accumulated_, edm::Event::getByToken(), and PreMixingMuonWorker< DigiCollection >::signalToken_.

Referenced by PreMixingMuonWorker< CSCWireDigiCollection >::initializeEvent().

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_
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 {}
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().

30  {
31  put(iEvent);
32  }
void put(edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing) override
template<typename DigiCollection >
void PreMixingMuonWorker< DigiCollection >::put ( edm::Event iEvent)

Definition at line 72 of file PreMixingMuonWorker.h.

References PreMixingMuonWorker< DigiCollection >::accumulated_, PreMixingMuonWorker< DigiCollection >::collectionDM_, eostools::move(), and edm::Event::put().

72  {
74 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
std::unique_ptr< DigiCollection > accumulated_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

template<typename DigiCollection>
std::unique_ptr<DigiCollection> PreMixingMuonWorker< DigiCollection >::accumulated_
private
template<typename DigiCollection>
std::string PreMixingMuonWorker< DigiCollection >::collectionDM_
private
template<typename DigiCollection>
edm::InputTag PreMixingMuonWorker< DigiCollection >::pileupTag_
private
template<typename DigiCollection>
edm::EDGetTokenT<DigiCollection> PreMixingMuonWorker< DigiCollection >::signalToken_
private