CMS 3D CMS Logo

MTDDigiProducer.cc
Go to the documentation of this file.
8 
9 //
11  edm::ProducesCollector producesCollector,
14  std::vector<std::string> psetNames;
15 
16  pset.getParameterSetNames(psetNames);
17 
18  for (const auto& psname : psetNames) {
19  const auto& ps = pset.getParameterSet(psname);
20  const std::string& digitizerName = ps.getParameter<std::string>("digitizerName");
21  theDigitizers_.emplace_back(MTDDigitizerFactory::get()->create(digitizerName, ps, producesCollector, iC));
22  }
23 }
24 
25 //
27 
28 //
31  randomEngine_ = &rng->getEngine(event.streamID());
32  for (auto& digitizer : theDigitizers_) {
33  digitizer->initializeEvent(event, es);
34  }
35 }
36 
37 //
39  for (auto& digitizer : theDigitizers_) {
40  digitizer->finalizeEvent(event, es, randomEngine_);
41  }
42  randomEngine_ = nullptr; // to prevent access outside event
43 }
44 
45 //
47  for (auto& digitizer : theDigitizers_) {
48  digitizer->accumulate(event, es, randomEngine_);
49  }
50 }
51 
53  edm::EventSetup const& es,
54  edm::StreamID const& streamID) {
55  for (auto& digitizer : theDigitizers_) {
56  digitizer->accumulate(event, es, randomEngine_);
57  }
58 }
59 
60 //
62  for (auto& digitizer : theDigitizers_) {
63  digitizer->beginRun(es);
64  }
65 }
66 
67 //
69  for (auto& digitizer : theDigitizers_) {
70  digitizer->endRun();
71  }
72 }
edm::StreamID
Definition: StreamID.h:30
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
MTDDigiProducer::beginRun
void beginRun(edm::Run const &, edm::EventSetup const &) override
Definition: MTDDigiProducer.cc:61
MTDDigiProducer::theDigitizers_
std::vector< std::unique_ptr< MTDDigitizerBase > > theDigitizers_
Definition: MTDDigiProducer.h:39
edm::Run
Definition: Run.h:45
MTDDigiProducer::~MTDDigiProducer
~MTDDigiProducer() override
Definition: MTDDigiProducer.cc:26
RandomNumberGenerator.h
PileUpEventPrincipal
Definition: PileUpEventPrincipal.h:19
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
MTDDigiProducer::endRun
void endRun(edm::Run const &, edm::EventSetup const &) override
Definition: MTDDigiProducer.cc:68
MakerMacros.h
MTDDigiProducer::initializeEvent
void initializeEvent(edm::Event const &, edm::EventSetup const &) override
Definition: MTDDigiProducer.cc:29
Service.h
DigiAccumulatorMixMod
Definition: DigiAccumulatorMixMod.h:41
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
MTDDigiProducer::MTDDigiProducer
MTDDigiProducer(edm::ParameterSet const &pset, edm::ProducesCollector, edm::ConsumesCollector &iC)
Definition: MTDDigiProducer.cc:10
Event.h
edm::Service< edm::RandomNumberGenerator >
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
MTDDigiProducer::finalizeEvent
void finalizeEvent(edm::Event &, edm::EventSetup const &) override
Definition: MTDDigiProducer.cc:38
MTDDigiProducer::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: MTDDigiProducer.h:40
edm::ProducesCollector
Definition: ProducesCollector.h:43
MTDDigiProducer::accumulate
void accumulate(edm::Event const &, edm::EventSetup const &) override
Definition: MTDDigiProducer.cc:46
MTDDigiProducer.h
DigiAccumulatorMixModFactory.h
mtdDigitizer_cfi.digitizerName
digitizerName
Definition: mtdDigitizer_cfi.py:4
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
StreamID.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27