CMS 3D CMS Logo

Public Member Functions | Private Member Functions

SimWatcherMaker< T > Class Template Reference

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

Inheritance diagram for SimWatcherMaker< T >:
SimWatcherMakerBase

List of all members.

Public Member Functions

virtual void make (const edm::ParameterSet &p, SimActivityRegistry &reg, boost::shared_ptr< SimWatcher > &oWatcher, boost::shared_ptr< SimProducer > &oProd) const
 SimWatcherMaker ()

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.

{}

Member Function Documentation

template<class T >
boost::shared_ptr<SimProducer> SimWatcherMaker< T >::getSimProducer ( SimProducer ,
boost::shared_ptr< T > &  iProd 
) const [inline, private]

Definition at line 55 of file SimWatcherMaker.h.

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

                                                                   {
         return boost::shared_ptr<SimProducer>(iProd);
      }
template<class T >
boost::shared_ptr<SimProducer> SimWatcherMaker< T >::getSimProducer ( void *  ,
boost::shared_ptr< T > &  iProd 
) const [inline, private]

Definition at line 59 of file SimWatcherMaker.h.

                                                            {
         return boost::shared_ptr<SimProducer>();
      }
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 [inline, virtual]

Implements SimWatcherMakerBase.

Definition at line 39 of file SimWatcherMaker.h.

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

      {
        boost::shared_ptr<T> returnValue(new T(p));
        SimActivityRegistryEnroller::enroll(reg, returnValue.get());
        oWatcher = returnValue;

        //If this is also a SimProducer, set the value
        oProd = this->getSimProducer(returnValue.get(), returnValue);
      }