CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Attributes
SimProducer Class Referenceabstract

#include <SimG4Core/Watcher/interface/SimProducer.h>

Inheritance diagram for SimProducer:
SimWatcher CaloSteppingAction DBremWatcher EcalSimHitsValidProducer HcalForwardAnalysis HcalTB02Analysis HcalTB04Analysis HcalTestAnalysis HGCalTBMBProducer HGCalTBPassive MaterialBudgetHcalProducer MaterialBudgetVolume RHStopTracer SimG4FluxProducer SimG4HcalValidation SimG4HGCalValidation simwatcher::BeginOfTrackCounter StoreSecondary TotemTestGem TrackingMaterialProducer

Public Member Functions

const SimProduceroperator= (const SimProducer &)=delete
 
virtual void produce (edm::Event &, const edm::EventSetup &)=0
 
void registerProducts (edm::ProducesCollector producesCollector)
 
 SimProducer ()
 
 SimProducer (const SimProducer &)=delete
 
- Public Member Functions inherited from SimWatcher
virtual void beginRun (edm::EventSetup const &)
 
bool isMT () const
 
const SimWatcheroperator= (const SimWatcher &)=delete
 
virtual void registerConsumes (edm::ConsumesCollector)
 
 SimWatcher ()
 
 SimWatcher (const SimWatcher &)=delete
 
virtual ~SimWatcher ()
 

Protected Member Functions

template<class T >
void produces ()
 
template<class T >
void produces (const std::string &instanceName)
 
- Protected Member Functions inherited from SimWatcher
void setMT (bool val)
 

Private Attributes

std::vector< std::shared_ptr< simproducer::ProductInfoBase > > m_info
 

Detailed Description

Description: a SimWatcher which puts data into the edm::Event

Usage: <usage>

Definition at line 64 of file SimProducer.h.

Constructor & Destructor Documentation

◆ SimProducer() [1/2]

SimProducer::SimProducer ( )
inline

Definition at line 66 of file SimProducer.h.

66 {}

◆ SimProducer() [2/2]

SimProducer::SimProducer ( const SimProducer )
delete

Member Function Documentation

◆ operator=()

const SimProducer& SimProducer::operator= ( const SimProducer )
delete

◆ produce()

virtual void SimProducer::produce ( edm::Event ,
const edm::EventSetup  
)
pure virtual

◆ produces() [1/2]

template<class T >
void SimProducer::produces ( )
inlineprotected

Definition at line 83 of file SimProducer.h.

83  {
84  produces<T>("");
85  }

◆ produces() [2/2]

template<class T >
void SimProducer::produces ( const std::string &  instanceName)
inlineprotected

Definition at line 88 of file SimProducer.h.

References m_info.

88  {
89  m_info.push_back(std::make_shared<simproducer::ProductInfo<T>>(instanceName));
90  }
std::vector< std::shared_ptr< simproducer::ProductInfoBase > > m_info
Definition: SimProducer.h:93

◆ registerProducts()

void SimProducer::registerProducts ( edm::ProducesCollector  producesCollector)
inline

Definition at line 70 of file SimProducer.h.

References m_info.

70  {
71  std::for_each(m_info.begin(),
72  m_info.end(),
73  [&producesCollector](std::shared_ptr<simproducer::ProductInfoBase> const &ptr) mutable {
74  ptr->registerProduct(producesCollector);
75  });
76  }
std::vector< std::shared_ptr< simproducer::ProductInfoBase > > m_info
Definition: SimProducer.h:93

Member Data Documentation

◆ m_info

std::vector<std::shared_ptr<simproducer::ProductInfoBase> > SimProducer::m_info
private

Definition at line 93 of file SimProducer.h.

Referenced by produces(), and registerProducts().