CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FTLDigiProducer Class Reference

#include <FTLDigiProducer.h>

Inheritance diagram for FTLDigiProducer:
DigiAccumulatorMixMod

Public Member Functions

void accumulate (edm::Event const &, edm::EventSetup const &) override
 
void accumulate (PileUpEventPrincipal const &, edm::EventSetup const &, edm::StreamID const &) override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
void finalizeEvent (edm::Event &, edm::EventSetup const &) override
 
 FTLDigiProducer (edm::ParameterSet const &pset, edm::ProducesCollector, edm::ConsumesCollector &iC)
 
 FTLDigiProducer (edm::ParameterSet const &pset, edm::ConsumesCollector &iC)
 
void initializeEvent (edm::Event const &, edm::EventSetup const &) override
 
 ~FTLDigiProducer () override
 
- 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 Attributes

CLHEP::HepRandomEngine * randomEngine_ = 0
 
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
 

Detailed Description

Definition at line 21 of file FTLDigiProducer.h.

Constructor & Destructor Documentation

FTLDigiProducer::FTLDigiProducer ( edm::ParameterSet const &  pset,
edm::ProducesCollector  producesCollector,
edm::ConsumesCollector iC 
)

Definition at line 11 of file FTLDigiProducer.cc.

References beamerCreator::create(), fastTimeDigitizer_cfi::digitizerName, timingPdfMaker::get, edm::ParameterSet::getParameterSet(), edm::ParameterSet::getParameterSetNames(), AlCaHLTBitMon_QueryRunRegistry::string, and theDigitizers_.

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 }
def create(alignables, pedeDump, additionalData, outputFile, config)
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
FTLDigiProducer::FTLDigiProducer ( edm::ParameterSet const &  pset,
edm::ConsumesCollector iC 
)
inline

Definition at line 24 of file FTLDigiProducer.h.

References Ecal2004TBTDCRanges_v1_cff::endRun, and Exception.

24  {
25  throw cms::Exception("DeprecatedConstructor")
26  << "Please make sure you're calling this with the threaded mixing module...";
27  }
FTLDigiProducer::~FTLDigiProducer ( )
override

Definition at line 27 of file FTLDigiProducer.cc.

27 {}

Member Function Documentation

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

Implements DigiAccumulatorMixMod.

Definition at line 47 of file FTLDigiProducer.cc.

References randomEngine_, and theDigitizers_.

47  {
48  for (auto& digitizer : theDigitizers_) {
49  digitizer->accumulate(event, es, randomEngine_);
50  }
51 }
CLHEP::HepRandomEngine * randomEngine_
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
Definition: event.py:1
void FTLDigiProducer::accumulate ( PileUpEventPrincipal const &  event,
edm::EventSetup const &  es,
edm::StreamID const &  streamID 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 53 of file FTLDigiProducer.cc.

References randomEngine_, and theDigitizers_.

55  {
56  for (auto& digitizer : theDigitizers_) {
57  digitizer->accumulate(event, es, randomEngine_);
58  }
59 }
CLHEP::HepRandomEngine * randomEngine_
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
Definition: event.py:1
void FTLDigiProducer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 62 of file FTLDigiProducer.cc.

References theDigitizers_.

62  {
63  for (auto& digitizer : theDigitizers_) {
64  digitizer->beginRun(es);
65  }
66 }
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 69 of file FTLDigiProducer.cc.

References theDigitizers_.

69  {
70  for (auto& digitizer : theDigitizers_) {
71  digitizer->endRun();
72  }
73 }
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::finalizeEvent ( edm::Event event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 39 of file FTLDigiProducer.cc.

References randomEngine_, and theDigitizers_.

39  {
40  for (auto& digitizer : theDigitizers_) {
41  digitizer->finalizeEvent(event, es, randomEngine_);
42  }
43  randomEngine_ = nullptr; // to prevent access outside event
44 }
CLHEP::HepRandomEngine * randomEngine_
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::initializeEvent ( edm::Event const &  event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 30 of file FTLDigiProducer.cc.

References edm::RandomNumberGenerator::getEngine(), randomEngine_, edm::Event::streamID(), and theDigitizers_.

30  {
32  randomEngine_ = &rng->getEngine(event.streamID());
33  for (auto& digitizer : theDigitizers_) {
34  digitizer->initializeEvent(event, es);
35  }
36 }
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
CLHEP::HepRandomEngine * randomEngine_
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
Definition: event.py:1

Member Data Documentation

CLHEP::HepRandomEngine* FTLDigiProducer::randomEngine_ = 0
private

Definition at line 40 of file FTLDigiProducer.h.

Referenced by accumulate(), finalizeEvent(), and initializeEvent().

std::vector<std::unique_ptr<FTLDigitizerBase> > FTLDigiProducer::theDigitizers_
private