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

virtual Types moduleType () const override
template<>
Worker::Types moduleType () const
template<>
Worker::Types moduleType () const
template<>
Worker::Types moduleType () const
template<>
Worker::Types moduleType () const
template<>
Worker::Types moduleType () const
template<>
Worker::Types moduleType () const
template<>
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
void setEventSelectionInfo (std::map< std::string, std::vector< std::pair< std::string, int > > > const &outputModulePathPositions, bool anyProductProduced)
void setModule (std::unique_ptr< T > &&iModule)
virtual void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) override
 WorkerT (std::unique_ptr< T > &&, ModuleDescription const &, WorkerParams const &)
virtual ~WorkerT ()

Static Public Member Functions

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

Protected Member Functions

Tmodule ()
T const & module () const

Private Member Functions

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

Private Attributes

std::unique_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::unique_ptr< T > &&  ed,
ModuleDescription const &  md,
WorkerParams const &  wp 
) [inline]

Definition at line 19 of file WorkerT.cc.

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

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

Definition at line 28 of file WorkerT.cc.

                       {
  }

Member Function Documentation

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

Implements edm::Worker.

Definition at line 89 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 50 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 34 of file WorkerT.cc.

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

                                                                                                      {
    UnscheduledHandlerSentry s(getUnscheduledHandler(ep), 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 >::implDoBegin ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [inline, override, private, virtual]

Implements edm::Worker.

Definition at line 66 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 43 of file WorkerT.cc.

                                                                                           {
    return false;
  }
template<typename T >
bool edm::WorkerT< T >::implDoEnd ( RunPrincipal rp,
EventSetup const &  c,
CurrentProcessingContext const *  cpc 
) [inline, override, private, virtual]

Implements edm::Worker.

Definition at line 58 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 74 of file WorkerT.cc.

References sistrip::module_.

                                                                                                               {
    module_->doEndLuminosityBlock(lbp, c, cpc);
    return true;
  }
template<typename T >
void edm::WorkerT< T >::implEndJob ( ) [inline, override, private, virtual]

Implements edm::Worker.

Definition at line 96 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 138 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 131 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 110 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 124 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 103 of file WorkerT.cc.

References sistrip::module_.

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

Implements edm::Worker.

Definition at line 117 of file WorkerT.cc.

References sistrip::module_.

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

Definition at line 32 of file WorkerT.h.

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

Definition at line 54 of file WorkerT.h.

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

Definition at line 55 of file WorkerT.h.

{return *module_;}
template<typename T>
virtual Types edm::WorkerT< T >::moduleType ( ) const [override, virtual]

Implements edm::Worker.

template<>
Worker::Types edm::WorkerT< EDProducer >::moduleType ( ) const [virtual]

Implements edm::Worker.

Definition at line 165 of file WorkerT.cc.

{ return Worker::kProducer;}
template<>
Worker::Types edm::WorkerT< EDFilter >::moduleType ( ) const [virtual]

Implements edm::Worker.

Definition at line 167 of file WorkerT.cc.

References kFilter.

{ return Worker::kFilter;}
template<>
Worker::Types edm::WorkerT< edm::one::EDFilterBase >::moduleType ( ) const [virtual]

Implements edm::Worker.

Definition at line 173 of file WorkerT.cc.

References kFilter.

{ return Worker::kFilter;}
template<>
Worker::Types edm::WorkerT< EDAnalyzer >::moduleType ( ) const [virtual]

Implements edm::Worker.

Definition at line 163 of file WorkerT.cc.

{ return Worker::kAnalyzer;}
template<>
Worker::Types edm::WorkerT< OutputModule >::moduleType ( ) const [virtual]

Implements edm::Worker.

Definition at line 169 of file WorkerT.cc.

template<>
Worker::Types edm::WorkerT< edm::one::EDProducerBase >::moduleType ( ) const [virtual]

Implements edm::Worker.

Definition at line 171 of file WorkerT.cc.

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

Definition at line 150 of file WorkerT.cc.

                                                      {
    //do nothing for the regular case
  }
template<>
void edm::WorkerT< OutputModule >::setEventSelectionInfo ( std::map< std::string, std::vector< std::pair< std::string, int > > > const &  outputModulePathPositions,
bool  anyProductProduced 
)

Definition at line 157 of file WorkerT.cc.

References sistrip::module_.

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

Definition at line 38 of file WorkerT.h.

                                              {
    module_ = std::move(iModule);
     module_->setModuleDescription(description());
     
  }
template<typename T >
void edm::WorkerT< T >::updateLookup ( BranchType  iBranchType,
ProductHolderIndexHelper const &  iHelper 
) [override, virtual]

Implements edm::Worker.

Definition at line 144 of file WorkerT.cc.

References sistrip::module_.

                                                                         {
    module_->updateLookup(iBranchType,iHelper);
  }
template<typename T >
std::string edm::WorkerT< T >::workerType ( ) const [inline, override, private, virtual]

Implements edm::Worker.

Definition at line 82 of file WorkerT.cc.

References sistrip::module_.

                               {
    return module_->workerType();
  }

Member Data Documentation

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