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 }
edm::StreamID
Definition: StreamID.h:30
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
MTDDigiProducer::theDigitizers_
std::vector< std::unique_ptr< MTDDigitizerBase > > theDigitizers_
Definition: MTDDigiProducer.h:32
hgcalDigitizer_cfi.digitizer
digitizer
Definition: hgcalDigitizer_cfi.py:76
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
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:58
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:33
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