CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
SimWatcherMaker< T > Class Template Reference

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

Inheritance diagram for SimWatcherMaker< T >:
SimWatcherMakerBase

Public Member Functions

virtual void make (const edm::ParameterSet &p, SimActivityRegistry &reg, std::shared_ptr< SimWatcher > &oWatcher, std::shared_ptr< SimProducer > &oProd) const
 
 SimWatcherMaker ()
 
- Public Member Functions inherited from SimWatcherMakerBase
 SimWatcherMakerBase ()
 
virtual ~SimWatcherMakerBase ()
 

Private Member Functions

std::shared_ptr< SimProducergetSimProducer (SimProducer *, std::shared_ptr< T > &iProd) const
 
std::shared_ptr< SimProducergetSimProducer (void *, std::shared_ptr< T > &iProd) const
 

Detailed Description

template<class T>
class SimWatcherMaker< T >

Description: Makes a particular type of SimWatcher

Usage: <usage>

Definition at line 31 of file SimWatcherMaker.h.

Constructor & Destructor Documentation

template<class T >
SimWatcherMaker< T >::SimWatcherMaker ( )
inline

Definition at line 35 of file SimWatcherMaker.h.

35 {}

Member Function Documentation

template<class T >
std::shared_ptr<SimProducer> SimWatcherMaker< T >::getSimProducer ( SimProducer ,
std::shared_ptr< T > &  iProd 
) const
inlineprivate

Definition at line 54 of file SimWatcherMaker.h.

Referenced by SimWatcherMaker< T >::make().

54  {
55  return std::shared_ptr<SimProducer>(iProd);
56  }
template<class T >
std::shared_ptr<SimProducer> SimWatcherMaker< T >::getSimProducer ( void *  ,
std::shared_ptr< T > &  iProd 
) const
inlineprivate

Definition at line 58 of file SimWatcherMaker.h.

58  {
59  return std::shared_ptr<SimProducer>();
60  }
template<class T >
virtual void SimWatcherMaker< T >::make ( const edm::ParameterSet p,
SimActivityRegistry reg,
std::shared_ptr< SimWatcher > &  oWatcher,
std::shared_ptr< SimProducer > &  oProd 
) const
inlinevirtual

Implements SimWatcherMakerBase.

Definition at line 38 of file SimWatcherMaker.h.

References SimActivityRegistryEnroller::enroll(), SimWatcherMaker< T >::getSimProducer(), and AlCaHLTBitMon_ParallelJobs::p.

43  {
44  auto returnValue = std::make_shared<T>(p);
45  SimActivityRegistryEnroller::enroll(reg, returnValue.get());
46  oWatcher = returnValue;
47 
48  //If this is also a SimProducer, set the value
49  oProd = this->getSimProducer(returnValue.get(), returnValue);
50  }
static void enroll(SimActivityRegistry &iReg, T *iObj)
std::shared_ptr< SimProducer > getSimProducer(SimProducer *, std::shared_ptr< T > &iProd) const