CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

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_, and edm::ProducesCollector::produces().

48  : signalToken_(iC.consumes<DigiCollection>(ps.getParameter<edm::InputTag>("digiTagSig"))),
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)
ProductRegistryHelper::BranchAliasSetterT< ProductType > produces()
edm::EDGetTokenT< DigiCollection > signalToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 PileUpEventPrincipal::getByLabel().

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_
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 edm::Event::getByToken().

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_
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(), 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
template<typename DigiCollection >
void PreMixingMuonWorker< DigiCollection >::put ( edm::Event iEvent)

Definition at line 72 of file PreMixingMuonWorker.h.

References eostools::move(), and edm::Event::put().

72  {
74 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
std::unique_ptr< DigiCollection > accumulated_
def move
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

Definition at line 38 of file PreMixingMuonWorker.h.

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

Definition at line 37 of file PreMixingMuonWorker.h.