CMS 3D CMS Logo

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

#include <SimWatcherMaker.h>

Inheritance diagram for SimWatcherMaker< T >:
SimWatcherMakerBase

Public Member Functions

void make (const edm::ParameterSet &p, SimActivityRegistry &reg, std::shared_ptr< SimWatcher > &oWatcher, std::shared_ptr< SimProducer > &oProd) const override
 
 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 >

SimG4Core/Watcher/interface/SimWatcherMaker.h

Description: Makes a particular type of SimWatcher

Usage: <usage>

Definition at line 32 of file SimWatcherMaker.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file SimWatcherMaker.h.

34 {}

Member Function Documentation

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

Definition at line 50 of file SimWatcherMaker.h.

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

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

Definition at line 53 of file SimWatcherMaker.h.

53  {
54  return std::shared_ptr<SimProducer>();
55  }
template<class T >
void SimWatcherMaker< T >::make ( const edm::ParameterSet p,
SimActivityRegistry reg,
std::shared_ptr< SimWatcher > &  oWatcher,
std::shared_ptr< SimProducer > &  oProd 
) const
inlineoverridevirtual

Implements SimWatcherMakerBase.

Definition at line 37 of file SimWatcherMaker.h.

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

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