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
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, boost::shared_ptr< SimWatcher > &oWatcher, boost::shared_ptr< SimProducer > &oProd) const
 
 SimWatcherMaker ()
 
- Public Member Functions inherited from SimWatcherMakerBase
 SimWatcherMakerBase ()
 
virtual ~SimWatcherMakerBase ()
 

Private Member Functions

boost::shared_ptr< SimProducergetSimProducer (SimProducer *, boost::shared_ptr< T > &iProd) const
 
boost::shared_ptr< SimProducergetSimProducer (void *, boost::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 32 of file SimWatcherMaker.h.

Constructor & Destructor Documentation

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

Definition at line 36 of file SimWatcherMaker.h.

36 {}

Member Function Documentation

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

Definition at line 55 of file SimWatcherMaker.h.

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

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

Definition at line 59 of file SimWatcherMaker.h.

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

Implements SimWatcherMakerBase.

Definition at line 39 of file SimWatcherMaker.h.

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

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