CMS 3D CMS Logo

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

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

Inheritance diagram for SimProducer:
SimWatcher CaloSteppingAction EcalSimHitsValidProducer HcalForwardAnalysis HcalTB02Analysis HcalTB04Analysis HGCPassive RHStopTracer SimG4FluxProducer SimG4HcalValidation SimG4HGCalValidation simwatcher::BeginOfTrackCounter StoreSecondary TotemTestGem TrackingMaterialProducer

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)=0
 
void registerProducts (edm::ProducesCollector producesCollector)
 
 SimProducer ()
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 

Protected Member Functions

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

Private Member Functions

const SimProduceroperator= (const SimProducer &)=delete
 
 SimProducer (const SimProducer &)=delete
 

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 )
privatedelete

Member Function Documentation

◆ operator=()

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

◆ 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 86 of file SimProducer.h.

86  {
87  produces<T>("");
88  }

◆ produces() [2/2]

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

Definition at line 91 of file SimProducer.h.

91  {
92  m_info.push_back(std::make_shared<simproducer::ProductInfo<T>>(instanceName));
93  }

References MuonErrorMatrixAdjuster_cfi::instanceName, and m_info.

◆ registerProducts()

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

Definition at line 76 of file SimProducer.h.

76  {
77  std::for_each(m_info.begin(),
78  m_info.end(),
79  [&producesCollector](std::shared_ptr<simproducer::ProductInfoBase> const &ptr) mutable {
80  ptr->registerProduct(producesCollector);
81  });
82  }

References m_info.

Member Data Documentation

◆ m_info

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

Definition at line 101 of file SimProducer.h.

Referenced by produces(), and registerProducts().

simproducer::ProductInfo
Definition: SimProducer.h:54
SimProducer::m_info
std::vector< std::shared_ptr< simproducer::ProductInfoBase > > m_info
Definition: SimProducer.h:101
MuonErrorMatrixAdjuster_cfi.instanceName
instanceName
Definition: MuonErrorMatrixAdjuster_cfi.py:16