CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
PreMixingHGCalWorker Class Reference
Inheritance diagram for PreMixingHGCalWorker:
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
 
PreMixingHGCalWorkeroperator= (const PreMixingHGCalWorker &)=delete
 
 PreMixingHGCalWorker (const edm::ParameterSet &ps, edm::ProducerBase &producer, edm::ConsumesCollector &&iC)
 
 PreMixingHGCalWorker (const PreMixingHGCalWorker &)=delete
 
void put (edm::Event &e, const edm::EventSetup &ES, std::vector< PileupSummaryInfo > const &ps, int bs) override
 
 ~PreMixingHGCalWorker () 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

HGCDigitizer digitizer_
 
edm::InputTag pileInputTag_
 
edm::EDGetTokenT< PHGCSimAccumulatorsignalToken_
 

Detailed Description

Definition at line 19 of file PreMixingHGCalWorker.cc.

Constructor & Destructor Documentation

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

Definition at line 42 of file PreMixingHGCalWorker.cc.

References HGCDigitizer::digiCollection(), digitizer_, and edm::ProductRegistryHelper::produces().

42  :
44  pileInputTag_(ps.getParameter<edm::InputTag>("pileInputTag")),
45  digitizer_(ps, iC)
46 {
48 }
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
std::string digiCollection()
Definition: HGCDigitizer.h:79
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_
PreMixingHGCalWorker::~PreMixingHGCalWorker ( )
overridedefault
PreMixingHGCalWorker::PreMixingHGCalWorker ( const PreMixingHGCalWorker )
delete

Member Function Documentation

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

Definition at line 64 of file PreMixingHGCalWorker.cc.

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

Referenced by initializeEvent().

64  {
66  pep.getByLabel(pileInputTag_, handle);
67  digitizer_.accumulate(*handle);
68 }
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
bool getByLabel(edm::InputTag const &tag, edm::Handle< T > &result) const
void PreMixingHGCalWorker::addSignals ( const edm::Event e,
const edm::EventSetup ES 
)
override

Definition at line 58 of file PreMixingHGCalWorker.cc.

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

Referenced by initializeEvent().

58  {
60  e.getByToken(signalToken_, handle);
61  digitizer_.accumulate(*handle);
62 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
void accumulate(edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
handle SimHit accumulation
edm::EDGetTokenT< PHGCSimAccumulator > signalToken_
void PreMixingHGCalWorker::beginRun ( const edm::Run run,
const edm::EventSetup ES 
)
override

Definition at line 50 of file PreMixingHGCalWorker.cc.

References HGCDigitizer::beginRun(), and digitizer_.

50  {
51  digitizer_.beginRun(ES);
52 }
void beginRun(const edm::EventSetup &es)
actions at the start/end of run
void PreMixingHGCalWorker::endRun ( )
overridevirtual

Reimplemented from PreMixingWorker.

Definition at line 54 of file PreMixingHGCalWorker.cc.

References digitizer_, and HGCDigitizer::endRun().

54  {
56 }
void PreMixingHGCalWorker::initializeEvent ( const edm::Event e,
const edm::EventSetup ES 
)
inlineoverride

Definition at line 29 of file PreMixingHGCalWorker.cc.

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

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

Definition at line 70 of file PreMixingHGCalWorker.cc.

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

Referenced by initializeEvent().

70  {
72  digitizer_.finalizeEvent(e, ES, &rng->getEngine(e.streamID()));
73 }
void finalizeEvent(edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
StreamID streamID() const
Definition: Event.h:95

Member Data Documentation

HGCDigitizer PreMixingHGCalWorker::digitizer_
private
edm::InputTag PreMixingHGCalWorker::pileInputTag_
private

Definition at line 37 of file PreMixingHGCalWorker.cc.

Referenced by addPileups().

edm::EDGetTokenT<PHGCSimAccumulator> PreMixingHGCalWorker::signalToken_
private

Definition at line 35 of file PreMixingHGCalWorker.cc.

Referenced by addSignals().