test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HGCDigiProducer.cc
Go to the documentation of this file.
9 
12  theDigitizer_(new HGCDigitizer(pset, iC)) {
13  if (theDigitizer_->producesEEDigis())
14  mixMod.produces<HGCEEDigiCollection>(theDigitizer_->digiCollection());
15  if (theDigitizer_->producesHEfrontDigis() ||
16  theDigitizer_->producesHEbackDigis() )
17  mixMod.produces<HGCHEDigiCollection>(theDigitizer_->digiCollection());
18 }
19 
22  theDigitizer_(new HGCDigitizer(pset, iC)) {
23 }
24 
26 
28  theDigitizer_->initializeEvent(event, es);
29 }
30 
32  theDigitizer_->finalizeEvent(event, es, randomEngine(event.streamID()));
33 }
34 
36  theDigitizer_->accumulate(event, es, randomEngine(event.streamID()));
37 }
38 
40  theDigitizer_->accumulate(event, es, randomEngine(streamID));
41 }
42 
44  theDigitizer_->beginRun(es);
45 }
46 
48  theDigitizer_->endRun();
49 }
50 
51 CLHEP::HepRandomEngine* HGCDigiProducer::randomEngine(edm::StreamID const& streamID) {
52  unsigned int index = streamID.value();
53  if(index >= randomEngines_.size()) {
54  randomEngines_.resize(index + 1, nullptr);
55  }
56  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
57  if(!ptr) {
59  ptr = &rng->getEngine(streamID);
60  randomEngines_[index] = ptr;
61  }
62  return ptr;
63 }
64 
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
std::vector< CLHEP::HepRandomEngine * > randomEngines_
HGCDigiProducer(edm::ParameterSet const &pset, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
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
virtual void accumulate(edm::Event const &, edm::EventSetup const &) override
std::unique_ptr< HGCDigitizer > theDigitizer_
unsigned int value() const
Definition: StreamID.h:46
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &) const =0
Use this engine in event methods.
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
#define DEFINE_DIGI_ACCUMULATOR(type)
StreamID streamID() const
Definition: Event.h:79
virtual void finalizeEvent(edm::Event &, edm::EventSetup const &) override
virtual void initializeEvent(edm::Event const &, edm::EventSetup const &) override
Definition: Run.h:43