CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

edm::WorkerT< T > Class Template Reference

#include <WorkerT.h>

Inheritance diagram for edm::WorkerT< T >:
edm::Worker

List of all members.

Public Types

typedef T ModuleType
typedef WorkerT< TWorkerType

Public Member Functions

void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
void setModule (std::auto_ptr< T > &iModule)
 WorkerT (std::auto_ptr< T >, ModuleDescription const &, WorkerParams const &)
virtual ~WorkerT ()

Static Public Member Functions

template<typename ModType >
static std::auto_ptr< TmakeModule (ModuleDescription const &, ParameterSet const &pset)

Protected Member Functions

Tmodule ()
T const & module () const

Private Member Functions

virtual void implBeginJob ()
virtual bool implDoBegin (LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
virtual bool implDoBegin (EventPrincipal &ep, EventSetup const &c, CurrentProcessingContext const *cpc)
virtual bool implDoBegin (RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
virtual bool implDoEnd (RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)
virtual bool implDoEnd (EventPrincipal &ep, EventSetup const &c, CurrentProcessingContext const *cpc)
virtual bool implDoEnd (LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)
virtual void implEndJob ()
virtual void implPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
virtual void implPreForkReleaseResources ()
virtual void implRespondToCloseInputFile (FileBlock const &fb)
virtual void implRespondToCloseOutputFiles (FileBlock const &fb)
virtual void implRespondToOpenInputFile (FileBlock const &fb)
virtual void implRespondToOpenOutputFiles (FileBlock const &fb)
virtual std::string workerType () const

Private Attributes

std::auto_ptr< Tmodule_

Detailed Description

template<typename T>
class edm::WorkerT< T >

Definition at line 21 of file WorkerT.h.


Member Typedef Documentation

template<typename T>
typedef T edm::WorkerT< T >::ModuleType

Definition at line 23 of file WorkerT.h.

template<typename T>
typedef WorkerT<T> edm::WorkerT< T >::WorkerType

Definition at line 24 of file WorkerT.h.


Constructor & Destructor Documentation

template<typename T>
edm::WorkerT< T >::WorkerT ( std::auto_ptr< T ed,
ModuleDescription const &  md,
WorkerParams const &  wp 
) [inline]

Definition at line 82 of file WorkerT.h.

References edm::WorkerT< T >::module_, and edm::WorkerParams::reg_.

                                                                                            :
    Worker(md, wp),
    module_(ed) {
    assert(module_.get() != 0);
    module_->setModuleDescription(md);
    module_->registerAnyProducts(module_.get(), wp.reg_);
  }
template<typename T >
edm::WorkerT< T >::~WorkerT ( ) [virtual]

Definition at line 91 of file WorkerT.h.

                       {
  }

Member Function Documentation

template<typename T >
void edm::WorkerT< T >::implBeginJob ( ) [private, virtual]

Implements edm::Worker.

Definition at line 140 of file WorkerT.h.

References sistrip::module_.

                           {
    module_->doBeginJob();
  }
template<typename T >
bool edm::WorkerT< T >::implDoBegin ( RunPrincipal rp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [private, virtual]

Implements edm::Worker.

Definition at line 110 of file WorkerT.h.

References sistrip::module_.

                                                                                                    {
    return module_->doBeginRun(rp, c, cpc);
  }
template<typename T >
bool edm::WorkerT< T >::implDoBegin ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [private, virtual]

Implements edm::Worker.

Definition at line 122 of file WorkerT.h.

References sistrip::module_.

                                                                                                                 {
    return module_->doBeginLuminosityBlock(lbp, c, cpc);
  }
template<typename T >
bool edm::WorkerT< T >::implDoBegin ( EventPrincipal ep,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [private, virtual]

Implements edm::Worker.

Definition at line 96 of file WorkerT.h.

References sistrip::module_, getGTfromDQMFile::obj, edm::Worker::postDoEvent(), alignCSCRings::s, and edm::EventPrincipal::unscheduledHandler().

                                                                                                      {
    UnscheduledHandlerSentry s(ep.unscheduledHandler().get(), cpc);
    boost::shared_ptr<Worker> sentry(this,[&ep](Worker* obj) {obj->postDoEvent(ep);});
    return module_->doEvent(ep, c, cpc);
  }
template<typename T >
bool edm::WorkerT< T >::implDoEnd ( RunPrincipal rp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [private, virtual]

Implements edm::Worker.

Definition at line 116 of file WorkerT.h.

References sistrip::module_.

                                                                                                  {
    return module_->doEndRun(rp, c, cpc);
  }
template<typename T >
bool edm::WorkerT< T >::implDoEnd ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [private, virtual]

Implements edm::Worker.

Definition at line 128 of file WorkerT.h.

References sistrip::module_.

                                                                                                               {
    return module_->doEndLuminosityBlock(lbp, c, cpc);
  }
template<typename T >
bool edm::WorkerT< T >::implDoEnd ( EventPrincipal ep,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [private, virtual]

Implements edm::Worker.

Definition at line 104 of file WorkerT.h.

                                                                                           {
    return false;
  }
template<typename T >
void edm::WorkerT< T >::implEndJob ( ) [private, virtual]

Implements edm::Worker.

Definition at line 146 of file WorkerT.h.

References sistrip::module_.

                         {
    module_->doEndJob();
  }
template<typename T >
void edm::WorkerT< T >::implPostForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
) [private, virtual]

Implements edm::Worker.

Definition at line 182 of file WorkerT.h.

References sistrip::module_.

                                                                            {
    module_->doPostForkReacquireResources(iChildIndex, iNumberOfChildren);
  }  
template<typename T >
void edm::WorkerT< T >::implPreForkReleaseResources ( ) [private, virtual]

Implements edm::Worker.

Definition at line 176 of file WorkerT.h.

References sistrip::module_.

                                          {
    module_->doPreForkReleaseResources();
  }
template<typename T >
void edm::WorkerT< T >::implRespondToCloseInputFile ( FileBlock const &  fb) [private, virtual]

Implements edm::Worker.

Definition at line 158 of file WorkerT.h.

References sistrip::module_.

                                                             {
    module_->doRespondToCloseInputFile(fb);
  }
template<typename T >
void edm::WorkerT< T >::implRespondToCloseOutputFiles ( FileBlock const &  fb) [private, virtual]

Implements edm::Worker.

Definition at line 170 of file WorkerT.h.

References sistrip::module_.

                                                               {
    module_->doRespondToCloseOutputFiles(fb);
  }
template<typename T >
void edm::WorkerT< T >::implRespondToOpenInputFile ( FileBlock const &  fb) [private, virtual]

Implements edm::Worker.

Definition at line 152 of file WorkerT.h.

References sistrip::module_.

                                                            {
    module_->doRespondToOpenInputFile(fb);
  }
template<typename T >
void edm::WorkerT< T >::implRespondToOpenOutputFiles ( FileBlock const &  fb) [private, virtual]

Implements edm::Worker.

Definition at line 164 of file WorkerT.h.

References sistrip::module_.

                                                              {
    module_->doRespondToOpenOutputFiles(fb);
  }
template<typename T>
template<typename ModType >
static std::auto_ptr<T> edm::WorkerT< T >::makeModule ( ModuleDescription const &  ,
ParameterSet const &  pset 
) [inline, static]

Definition at line 32 of file WorkerT.h.

                                                               {
    std::auto_ptr<ModType> module = std::auto_ptr<ModType>(new ModType(pset));
    return std::auto_ptr<T>(module.release());
  }
template<typename T>
T& edm::WorkerT< T >::module ( ) [inline, protected]

Definition at line 50 of file WorkerT.h.

{return *module_;}
template<typename T>
T const& edm::WorkerT< T >::module ( ) const [inline, protected]

Definition at line 51 of file WorkerT.h.

{return *module_;}
template<typename T>
void edm::WorkerT< T >::setEventSelectionInfo ( std::map< std::string, std::vector< std::pair< std::string, int > > > const &  outputModulePathPositions,
bool  anyProductProduced 
) [inline]

Definition at line 44 of file WorkerT.h.

                                                        {
      module_->setEventSelectionInfo(outputModulePathPositions, anyProductProduced);
    }
template<typename T>
void edm::WorkerT< T >::setModule ( std::auto_ptr< T > &  iModule) [inline]

Definition at line 38 of file WorkerT.h.

                                           {
     module_ = iModule;
     module_->setModuleDescription(description());
     
  }
template<typename T >
std::string edm::WorkerT< T >::workerType ( ) const [private, virtual]

Implements edm::Worker.

Definition at line 134 of file WorkerT.h.

References sistrip::module_.

                               {
    return module_->workerType();
  }

Member Data Documentation

template<typename T>
std::auto_ptr<T> edm::WorkerT< T >::module_ [private]