CMS 3D CMS Logo

FTLDigiProducer.cc
Go to the documentation of this file.
9 
10 //
12  edm::ProducesCollector producesCollector,
15  std::vector<std::string> psetNames;
16 
17  pset.getParameterSetNames(psetNames);
18 
19  for (const auto& psname : psetNames) {
20  const auto& ps = pset.getParameterSet(psname);
21  const std::string& digitizerName = ps.getParameter<std::string>("digitizerName");
22  theDigitizers_.emplace_back(FTLDigitizerFactory::get()->create(digitizerName, ps, producesCollector, iC));
23  }
24 }
25 
26 //
28 
29 //
32  randomEngine_ = &rng->getEngine(event.streamID());
33  for (auto& digitizer : theDigitizers_) {
34  digitizer->initializeEvent(event, es);
35  }
36 }
37 
38 //
40  for (auto& digitizer : theDigitizers_) {
41  digitizer->finalizeEvent(event, es, randomEngine_);
42  }
43  randomEngine_ = nullptr; // to prevent access outside event
44 }
45 
46 //
48  for (auto& digitizer : theDigitizers_) {
49  digitizer->accumulate(event, es, randomEngine_);
50  }
51 }
52 
54  edm::EventSetup const& es,
55  edm::StreamID const& streamID) {
56  for (auto& digitizer : theDigitizers_) {
57  digitizer->accumulate(event, es, randomEngine_);
58  }
59 }
60 
61 //
63  for (auto& digitizer : theDigitizers_) {
64  digitizer->beginRun(es);
65  }
66 }
67 
68 //
70  for (auto& digitizer : theDigitizers_) {
71  digitizer->endRun();
72  }
73 }
void initializeEvent(edm::Event const &, edm::EventSetup const &) override
~FTLDigiProducer() override
def create(alignables, pedeDump, additionalData, outputFile, config)
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
CLHEP::HepRandomEngine * randomEngine_
void beginRun(edm::Run const &, edm::EventSetup const &) override
void finalizeEvent(edm::Event &, edm::EventSetup const &) override
ParameterSet const & getParameterSet(std::string const &) const
FTLDigiProducer(edm::ParameterSet const &pset, edm::ProducesCollector, edm::ConsumesCollector &iC)
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
StreamID streamID() const
Definition: Event.h:96
void accumulate(edm::Event const &, edm::EventSetup const &) override
size_t getParameterSetNames(std::vector< std::string > &output, bool trackiness=true) const
Definition: event.py:1
Definition: Run.h:45
void endRun(edm::Run const &, edm::EventSetup const &) override