CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PreMixingMTDWorker Class Reference
Inheritance diagram for PreMixingMTDWorker:
PreMixingWorker

Public Member Functions

void addPileups (const PileUpEventPrincipal &, const edm::EventSetup &ES) override
 
void addSignals (const edm::Event &e, const edm::EventSetup &ES) override
 
void beginRun (const edm::Run &run, const edm::EventSetup &ES) override
 
void endRun () override
 
void initializeEvent (const edm::Event &e, const edm::EventSetup &ES) override
 
PreMixingMTDWorkeroperator= (const PreMixingMTDWorker &)=delete
 
 PreMixingMTDWorker (const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
 
 PreMixingMTDWorker (const PreMixingMTDWorker &)=delete
 
void put (edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
 
 ~PreMixingMTDWorker () override=default
 
- Public Member Functions inherited from PreMixingWorker
virtual void addPileups (PileUpEventPrincipal const &pep, edm::EventSetup const &iSetup)=0
 
virtual void addSignals (edm::Event const &iEvent, edm::EventSetup const &iSetup)=0
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &iLumi, edm::EventSetup const &iSetup)
 
virtual void beginRun (edm::Run const &iRun, edm::EventSetup const &iSetup)
 
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)
 
virtual void initializeEvent (edm::Event const &iEvent, edm::EventSetup const &iSetup)=0
 
 PreMixingWorker ()=default
 
virtual void put (edm::Event &iEvent, edm::EventSetup const &iSetup, std::vector< PileupSummaryInfo > const &ps, int bunchSpacing)=0
 
virtual ~PreMixingWorker ()=default
 

Private Attributes

std::unique_ptr< MTDDigitizerBasedigitizer_
 
edm::InputTag pileInputTag_
 
edm::EDGetTokenT< PMTDSimAccumulatorsignalToken_
 

Detailed Description

Definition at line 19 of file PreMixingMTDWorker.cc.

Constructor & Destructor Documentation

PreMixingMTDWorker::PreMixingMTDWorker ( const edm::ParameterSet ps,
edm::ProducerBase producer,
edm::ConsumesCollector &&  iC 
)

Definition at line 42 of file PreMixingMTDWorker.cc.

42  :
44  pileInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
46  ps,iC,producer))
47 {}
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< PMTDSimAccumulator > signalToken_
std::unique_ptr< MTDDigitizerBase > digitizer_
def create(alignables, pedeDump, additionalData, outputFile, config)
edm::InputTag pileInputTag_
T get(const Candidate &c)
Definition: component.h:55
PreMixingMTDWorker::~PreMixingMTDWorker ( )
overridedefault
PreMixingMTDWorker::PreMixingMTDWorker ( const PreMixingMTDWorker )
delete

Member Function Documentation

void PreMixingMTDWorker::addPileups ( const PileUpEventPrincipal pep,
const edm::EventSetup ES 
)
override

Definition at line 63 of file PreMixingMTDWorker.cc.

References digitizer_, PileUpEventPrincipal::getByLabel(), cmsBatch::handle, and pileInputTag_.

Referenced by initializeEvent().

63  {
65  pep.getByLabel(pileInputTag_, handle);
66  digitizer_->accumulate(*handle);
67 }
std::unique_ptr< MTDDigitizerBase > digitizer_
edm::InputTag pileInputTag_
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
void PreMixingMTDWorker::addSignals ( const edm::Event e,
const edm::EventSetup ES 
)
override

Definition at line 57 of file PreMixingMTDWorker.cc.

References digitizer_, edm::Event::getByToken(), cmsBatch::handle, and signalToken_.

Referenced by initializeEvent().

57  {
59  e.getByToken(signalToken_, handle);
60  digitizer_->accumulate(*handle);
61 }
edm::EDGetTokenT< PMTDSimAccumulator > signalToken_
std::unique_ptr< MTDDigitizerBase > digitizer_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
void PreMixingMTDWorker::beginRun ( const edm::Run run,
const edm::EventSetup ES 
)
override

Definition at line 49 of file PreMixingMTDWorker.cc.

References digitizer_.

49  {
50  digitizer_->beginRun(ES);
51 }
std::unique_ptr< MTDDigitizerBase > digitizer_
void PreMixingMTDWorker::endRun ( )
overridevirtual

Reimplemented from PreMixingWorker.

Definition at line 53 of file PreMixingMTDWorker.cc.

References digitizer_.

53  {
54  digitizer_->endRun();
55 }
std::unique_ptr< MTDDigitizerBase > digitizer_
void PreMixingMTDWorker::initializeEvent ( const edm::Event e,
const edm::EventSetup ES 
)
inlineoverride

Definition at line 29 of file PreMixingMTDWorker.cc.

References addPileups(), addSignals(), MillePedeFileConverter_cfg::e, and put().

29 {}
PreMixingMTDWorker& PreMixingMTDWorker::operator= ( const PreMixingMTDWorker )
delete
void PreMixingMTDWorker::put ( edm::Event e,
const edm::EventSetup ES,
std::vector< PileupSummaryInfo > const &  ps,
int  bs 
)
override

Definition at line 69 of file PreMixingMTDWorker.cc.

References DEFINE_PREMIXING_WORKER, digitizer_, edm::RandomNumberGenerator::getEngine(), and edm::Event::streamID().

Referenced by initializeEvent().

69  {
71  digitizer_->finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
72 }
std::unique_ptr< MTDDigitizerBase > digitizer_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
StreamID streamID() const
Definition: Event.h:95

Member Data Documentation

std::unique_ptr<MTDDigitizerBase> PreMixingMTDWorker::digitizer_
private

Definition at line 39 of file PreMixingMTDWorker.cc.

Referenced by addPileups(), addSignals(), beginRun(), endRun(), and put().

edm::InputTag PreMixingMTDWorker::pileInputTag_
private

Definition at line 37 of file PreMixingMTDWorker.cc.

Referenced by addPileups().

edm::EDGetTokenT<PMTDSimAccumulator> PreMixingMTDWorker::signalToken_
private

Definition at line 35 of file PreMixingMTDWorker.cc.

Referenced by addSignals().