CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HGCDigiProducer Class Reference

#include <HGCDigiProducer.h>

Inheritance diagram for HGCDigiProducer:
DigiAccumulatorMixMod

Public Member Functions

virtual void accumulate (edm::Event const &, edm::EventSetup const &) override
 
virtual void accumulate (PileUpEventPrincipal const &, edm::EventSetup const &, edm::StreamID const &) override
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override
 
virtual void finalizeEvent (edm::Event &, edm::EventSetup const &) override
 
 HGCDigiProducer (edm::ParameterSet const &pset, edm::stream::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
 
 HGCDigiProducer (edm::ParameterSet const &pset, edm::ConsumesCollector &iC)
 
virtual void initializeEvent (edm::Event const &, edm::EventSetup const &) override
 
 ~HGCDigiProducer ()
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual PileupMixingContentgetEventPileupInfo ()
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual void StorePileupInformation (std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList, std::vector< edm::EventID > &eventList, int bunchSpace)
 
virtual ~DigiAccumulatorMixMod ()
 

Private Member Functions

CLHEP::HepRandomEngine * randomEngine (edm::StreamID const &streamID)
 

Private Attributes

std::vector
< CLHEP::HepRandomEngine * > 
randomEngines_
 
std::unique_ptr< HGCDigitizertheDigitizer_
 

Detailed Description

Definition at line 23 of file HGCDigiProducer.h.

Constructor & Destructor Documentation

HGCDigiProducer::HGCDigiProducer ( edm::ParameterSet const &  pset,
edm::stream::EDProducerBase mixMod,
edm::ConsumesCollector iC 
)

Definition at line 11 of file HGCDigiProducer.cc.

References theDigitizer_.

12  :
14  theDigitizer_(new HGCDigitizer(pset, iC) )
15 {
16  if( theDigitizer_->producesEEDigis() )
17  mixMod.produces<HGCEEDigiCollection>(theDigitizer_->digiCollection());
18  if( theDigitizer_->producesHEfrontDigis() || theDigitizer_->producesHEbackDigis() )
19  mixMod.produces<HGCHEDigiCollection>(theDigitizer_->digiCollection());
20 }
std::unique_ptr< HGCDigitizer > theDigitizer_
HGCDigiProducer::HGCDigiProducer ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC 
)

Definition at line 22 of file HGCDigiProducer.cc.

22  :
24  theDigitizer_(new HGCDigitizer(pset, iC)) {
25 }
std::unique_ptr< HGCDigitizer > theDigitizer_
HGCDigiProducer::~HGCDigiProducer ( )

Definition at line 28 of file HGCDigiProducer.cc.

29 {
30 }

Member Function Documentation

void HGCDigiProducer::accumulate ( edm::Event const &  event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 45 of file HGCDigiProducer.cc.

References randomEngine(), edm::Event::streamID(), and theDigitizer_.

46 {
47  theDigitizer_->accumulate(event, es, randomEngine(event.streamID()));
48 }
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::unique_ptr< HGCDigitizer > theDigitizer_
void HGCDigiProducer::accumulate ( PileUpEventPrincipal const &  event,
edm::EventSetup const &  es,
edm::StreamID const &  streamID 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 50 of file HGCDigiProducer.cc.

References randomEngine(), and theDigitizer_.

51 {
52  theDigitizer_->accumulate(event, es, randomEngine(streamID));
53 }
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::unique_ptr< HGCDigitizer > theDigitizer_
void HGCDigiProducer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 56 of file HGCDigiProducer.cc.

References theDigitizer_.

57 {
58  theDigitizer_->beginRun(es);
59 }
std::unique_ptr< HGCDigitizer > theDigitizer_
void HGCDigiProducer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 62 of file HGCDigiProducer.cc.

References theDigitizer_.

63 {
64  theDigitizer_->endRun();
65 }
std::unique_ptr< HGCDigitizer > theDigitizer_
void HGCDigiProducer::finalizeEvent ( edm::Event event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 39 of file HGCDigiProducer.cc.

References randomEngine(), edm::Event::streamID(), and theDigitizer_.

40 {
41  theDigitizer_->finalizeEvent(event, es, randomEngine(event.streamID()));
42 }
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
std::unique_ptr< HGCDigitizer > theDigitizer_
StreamID streamID() const
Definition: Event.h:80
void HGCDigiProducer::initializeEvent ( edm::Event const &  event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 33 of file HGCDigiProducer.cc.

References theDigitizer_.

34 {
35  theDigitizer_->initializeEvent(event, es);
36 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::unique_ptr< HGCDigitizer > theDigitizer_
CLHEP::HepRandomEngine * HGCDigiProducer::randomEngine ( edm::StreamID const &  streamID)
private

Definition at line 67 of file HGCDigiProducer.cc.

References edm::RandomNumberGenerator::getEngine(), cmsHarvester::index, randomEngines_, and edm::StreamID::value().

Referenced by accumulate(), and finalizeEvent().

67  {
68  unsigned int index = streamID.value();
69  if(index >= randomEngines_.size()) {
70  randomEngines_.resize(index + 1, nullptr);
71  }
72  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
73  if(!ptr) {
75  ptr = &rng->getEngine(streamID);
76  randomEngines_[index] = ptr;
77  }
78  return ptr;
79 }
std::vector< CLHEP::HepRandomEngine * > randomEngines_
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.

Member Data Documentation

std::vector<CLHEP::HepRandomEngine*> HGCDigiProducer::randomEngines_
private

Definition at line 39 of file HGCDigiProducer.h.

Referenced by randomEngine().

std::unique_ptr<HGCDigitizer> HGCDigiProducer::theDigitizer_
private