test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
FTLDigiProducer Class Reference

#include <FTLDigiProducer.h>

Inheritance diagram for FTLDigiProducer:
DigiAccumulatorMixMod

Public Member Functions

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

CLHEP::HepRandomEngine * randomEngine (edm::StreamID const &streamID)
 

Private Attributes

std::vector
< CLHEP::HepRandomEngine * > 
randomEngines_
 
std::vector< std::unique_ptr
< FTLDigitizerBase > > 
theDigitizers_
 

Detailed Description

Definition at line 23 of file FTLDigiProducer.h.

Constructor & Destructor Documentation

FTLDigiProducer::FTLDigiProducer ( edm::ParameterSet const &  pset,
edm::stream::EDProducerBase mixMod,
edm::ConsumesCollector iC 
)

Definition at line 11 of file FTLDigiProducer.cc.

References reco::get(), edm::ParameterSet::getParameterSet(), edm::ParameterSet::getParameterSetNames(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, 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  auto temp = FTLDigitizerFactory::get()->create(digitizerName,ps,iC,mixMod);
22  theDigitizers_.emplace_back(temp);
23  }
24 }
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 26 of file FTLDigiProducer.h.

References Exception.

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

Definition at line 27 of file FTLDigiProducer.cc.

28 {
29 }

Member Function Documentation

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

Implements DigiAccumulatorMixMod.

Definition at line 48 of file FTLDigiProducer.cc.

References randomEngine(), edm::Event::streamID(), and theDigitizers_.

49 {
50  for( auto& digitizer : theDigitizers_ ) {
51  digitizer->accumulate(event, es, randomEngine(event.streamID()));
52  }
53 }
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::accumulate ( PileUpEventPrincipal const &  event,
edm::EventSetup const &  es,
edm::StreamID const &  streamID 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 55 of file FTLDigiProducer.cc.

References randomEngine(), and theDigitizers_.

56 {
57  for( auto& digitizer : theDigitizers_ ) {
58  digitizer->accumulate(event, es, randomEngine(streamID));
59  }
60 }
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
void FTLDigiProducer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  es 
)
overridevirtual

Reimplemented from DigiAccumulatorMixMod.

Definition at line 63 of file FTLDigiProducer.cc.

References theDigitizers_.

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

Reimplemented from DigiAccumulatorMixMod.

Definition at line 71 of file FTLDigiProducer.cc.

References theDigitizers_.

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

Implements DigiAccumulatorMixMod.

Definition at line 40 of file FTLDigiProducer.cc.

References randomEngine(), edm::Event::streamID(), and theDigitizers_.

41 {
42  for( auto& digitizer : theDigitizers_ ) {
43  digitizer->finalizeEvent(event, es, randomEngine(event.streamID()));
44  }
45 }
CLHEP::HepRandomEngine * randomEngine(edm::StreamID const &streamID)
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
StreamID streamID() const
Definition: Event.h:81
void FTLDigiProducer::initializeEvent ( edm::Event const &  event,
edm::EventSetup const &  es 
)
overridevirtual

Implements DigiAccumulatorMixMod.

Definition at line 32 of file FTLDigiProducer.cc.

References theDigitizers_.

33 {
34  for( auto& digitizer : theDigitizers_ ) {
35  digitizer->initializeEvent(event, es);
36  }
37 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::vector< std::unique_ptr< FTLDigitizerBase > > theDigitizers_
CLHEP::HepRandomEngine * FTLDigiProducer::randomEngine ( edm::StreamID const &  streamID)
private

Definition at line 78 of file FTLDigiProducer.cc.

References edm::RandomNumberGenerator::getEngine(), cmsHarvester::index, randomEngines_, rng, and edm::StreamID::value().

Referenced by accumulate(), and finalizeEvent().

78  {
79  unsigned int index = streamID.value();
80  if(index >= randomEngines_.size()) {
81  randomEngines_.resize(index + 1, nullptr);
82  }
83  CLHEP::HepRandomEngine* ptr = randomEngines_[index];
84  if(!ptr) {
86  ptr = &rng->getEngine(streamID);
87  randomEngines_[index] = ptr;
88  }
89  return ptr;
90 }
edm::Service< edm::RandomNumberGenerator > rng
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
std::vector< CLHEP::HepRandomEngine * > randomEngines_

Member Data Documentation

std::vector<CLHEP::HepRandomEngine*> FTLDigiProducer::randomEngines_
private

Definition at line 42 of file FTLDigiProducer.h.

Referenced by randomEngine().

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