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::ProducerBase &producer, edm::ConsumesCollector &&iC)
 
 PreMixingMuonWorker (const edm::ParameterSet &ps, edm::ProducerBase &producer, 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::ProducerBase producer,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 17 of file PreMixingMuonWorker.h.

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

17 : PreMixingMuonWorker(ps, producer, iC) {}
PreMixingMuonWorker(const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
template<typename DigiCollection >
PreMixingMuonWorker< DigiCollection >::PreMixingMuonWorker ( const edm::ParameterSet ps,
edm::ProducerBase producer,
edm::ConsumesCollector iC 
)

Definition at line 38 of file PreMixingMuonWorker.h.

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

38  :
39  signalToken_(iC.consumes<DigiCollection>(ps.getParameter<edm::InputTag>("digiTagSig"))),
40  pileupTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
41  collectionDM_(ps.getParameter<std::string>("collectionDM"))
42 {
43  producer.produces<DigiCollection>(collectionDM_);
44 }
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
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 55 of file PreMixingMuonWorker.h.

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

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

55  {
57  pep.getByLabel(pileupTag_, digis);
58  for(const auto& elem: *digis) {
59  accumulated_->put(elem.second, elem.first);
60  }
61 }
std::unique_ptr< DigiCollection > accumulated_
def elem(elemtype, innerHTML='', html_class='', kwargs)
Definition: HTMLExport.py:18
template<typename DigiCollection >
void PreMixingMuonWorker< DigiCollection >::addSignals ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements PreMixingWorker.

Definition at line 47 of file PreMixingMuonWorker.h.

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

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

47  {
49  iEvent.getByToken(signalToken_, digis);
50 
51  accumulated_ = std::make_unique<DigiCollection>(*digis); // for signal we can just copy
52 }
std::unique_ptr< DigiCollection > accumulated_
int iEvent
Definition: GenABIO.cc:230
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 21 of file PreMixingMuonWorker.h.

21 {}
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 24 of file PreMixingMuonWorker.h.

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

24  {
25  put(iEvent);
26  }
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 64 of file PreMixingMuonWorker.h.

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

64  {
66 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
std::unique_ptr< DigiCollection > accumulated_
def move(src, dest)
Definition: eostools.py:510

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