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::ProducerBase &mixMod, 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::ProducerBase mixMod,
edm::ConsumesCollector iC 
)

Definition at line 11 of file FTLDigiProducer.cc.

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

12  :
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(FTLDigitizerFactory::get()->create(digitizerName,ps,iC,mixMod));
22  }
23 }
def create(alignables, pedeDump, additionalData, outputFile, config)
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
T get(const Candidate &c)
Definition: component.h:55
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.

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

Definition at line 26 of file FTLDigiProducer.cc.

27 {
28 }

Member Function Documentation

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

Implements DigiAccumulatorMixMod.

Definition at line 50 of file FTLDigiProducer.cc.

References randomEngine_, and theDigitizers_.

51 {
52  for( auto& digitizer : theDigitizers_ ) {
53  digitizer->accumulate(event, es, randomEngine_);
54  }
55 }
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 57 of file FTLDigiProducer.cc.

References randomEngine_, and theDigitizers_.

58 {
59  for( auto& digitizer : theDigitizers_ ) {
60  digitizer->accumulate(event, es, randomEngine_);
61  }
62 }
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 65 of file FTLDigiProducer.cc.

References theDigitizers_.

66 {
67  for( auto& digitizer : theDigitizers_ ) {
68  digitizer->beginRun(es);
69  }
70 }
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 73 of file FTLDigiProducer.cc.

References theDigitizers_.

74 {
75  for( auto& digitizer : theDigitizers_ ) {
76  digitizer->endRun();
77  }
78 }
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::finalizeEvent ( edm::Event event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 41 of file FTLDigiProducer.cc.

References randomEngine_, and theDigitizers_.

42 {
43  for( auto& digitizer : theDigitizers_ ) {
44  digitizer->finalizeEvent(event, es, randomEngine_);
45  }
46  randomEngine_ = nullptr; // to prevent access outside event
47 }
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 31 of file FTLDigiProducer.cc.

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

32 {
34  randomEngine_ = &rng->getEngine(event.streamID());
35  for( auto& digitizer : theDigitizers_ ) {
36  digitizer->initializeEvent(event, es);
37  }
38 }
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 39 of file FTLDigiProducer.h.

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

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