CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
edm::Worker Class Referenceabstract

#include <Worker.h>

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

Public Types

enum  State { Ready, Pass, Fail, Exception }
 
enum  Types { kAnalyzer, kFilter, kProducer, kOutputModule }
 

Public Member Functions

void beginJob ()
 
void beginStream (StreamID id, StreamContext &streamContext)
 
void clearCounters ()
 
virtual std::vector< ConsumesInfoconsumesInfo () const =0
 
ModuleDescription const * descPtr () const
 
ModuleDescription const & description () const
 
template<typename T >
bool doWork (typename T::MyPrincipal const &, EventSetup const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context)
 
void endJob ()
 
void endStream (StreamID id, StreamContext &streamContext)
 
virtual void modulesDependentUpon (std::vector< const char * > &oModuleLabels, bool iPrint) const =0
 
virtual void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc) const =0
 
virtual Types moduleType () const =0
 
Workeroperator= (Worker const &)=delete
 
void pathFinished (EventPrincipal const &)
 
void postDoEvent (EventPrincipal const &)
 
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void preForkReleaseResources ()
 
void registerThinnedAssociations (ProductRegistry const &registry, ThinnedAssociationsHelper &helper)
 
void reset ()
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
void setActivityRegistry (std::shared_ptr< ActivityRegistry > areg)
 
void setEarlyDeleteHelper (EarlyDeleteHelper *iHelper)
 
State state () const
 
int timesExcept () const
 
int timesFailed () const
 
int timesPass () const
 
int timesPassed () const
 
int timesRun () const
 
int timesVisited () const
 
virtual void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)=0
 
 Worker (ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
 
 Worker (Worker const &)=delete
 
virtual ~Worker ()
 

Protected Member Functions

ActivityRegistryactivityRegistry ()
 
virtual void implBeginJob ()=0
 
virtual void implBeginStream (StreamID)=0
 
virtual bool implDo (EventPrincipal const &, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoBegin (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoBegin (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoEnd (RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoEnd (LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoPrePrefetchSelection (StreamID id, EventPrincipal const &ep, ModuleCallingContext const *mcc)=0
 
virtual bool implDoStreamBegin (StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoStreamBegin (StreamID id, LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoStreamEnd (StreamID id, RunPrincipal const &rp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual bool implDoStreamEnd (StreamID id, LuminosityBlockPrincipal const &lbp, EventSetup const &c, ModuleCallingContext const *mcc)=0
 
virtual void implEndJob ()=0
 
virtual void implEndStream (StreamID)=0
 
void resetModuleDescription (ModuleDescription const *)
 
virtual std::string workerType () const =0
 

Private Member Functions

virtual void implPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)=0
 
virtual void implPreForkReleaseResources ()=0
 
virtual void implRegisterThinnedAssociations (ProductRegistry const &, ThinnedAssociationsHelper &)=0
 
virtual void implRespondToCloseInputFile (FileBlock const &fb)=0
 
virtual void implRespondToOpenInputFile (FileBlock const &fb)=0
 
virtual void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const =0
 
virtual void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const =0
 
virtual std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const =0
 

Private Attributes

ExceptionToActionTable const * actions_
 
std::shared_ptr< ActivityRegistryactReg_
 
edm::propagate_const
< std::shared_ptr
< cms::Exception > > 
cached_exception_
 
edm::propagate_const
< EarlyDeleteHelper * > 
earlyDeleteHelper_
 
ModuleCallingContext moduleCallingContext_
 
State state_
 
int timesExcept_
 
int timesFailed_
 
int timesPassed_
 
int timesRun_
 
int timesVisited_
 

Friends

template<typename O >
class workerhelper::CallImpl
 

Detailed Description

Definition at line 68 of file Worker.h.

Member Enumeration Documentation

Enumerator
Ready 
Pass 
Fail 
Exception 

Definition at line 70 of file Worker.h.

Enumerator
kAnalyzer 
kFilter 
kProducer 
kOutputModule 

Definition at line 71 of file Worker.h.

Constructor & Destructor Documentation

edm::Worker::Worker ( ModuleDescription const &  iMD,
ExceptionToActionTable const *  iActions 
)

Definition at line 71 of file Worker.cc.

72  :
73  timesRun_(),
74  timesVisited_(),
75  timesPassed_(),
76  timesFailed_(),
77  timesExcept_(),
78  state_(Ready),
80  actions_(iActions),
82  actReg_(),
83  earlyDeleteHelper_(nullptr)
84  {
85  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
ExceptionToActionTable const * actions_
Definition: Worker.h:192
ModuleCallingContext moduleCallingContext_
Definition: Worker.h:190
int timesExcept_
Definition: Worker.h:187
int timesPassed_
Definition: Worker.h:185
edm::propagate_const< std::shared_ptr< cms::Exception > > cached_exception_
Definition: Worker.h:193
int timesRun_
Definition: Worker.h:183
int timesFailed_
Definition: Worker.h:186
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
Definition: Worker.h:197
State state_
Definition: Worker.h:188
int timesVisited_
Definition: Worker.h:184
edm::Worker::~Worker ( )
virtual

Definition at line 87 of file Worker.cc.

87  {
88  }
edm::Worker::Worker ( Worker const &  )
delete

Member Function Documentation

ActivityRegistry* edm::Worker::activityRegistry ( )
inlineprotected

Definition at line 166 of file Worker.h.

References actReg_.

166 { return actReg_.get(); }
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
void edm::Worker::beginJob ( void  )

Definition at line 104 of file Worker.cc.

References actReg_, cms::Exception::addContext(), description(), Exception, implBeginJob(), edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), state_, and edm::convertException::wrap().

Referenced by edm::WorkerManager::beginJob(), and edm::GlobalSchedule::replaceModule().

104  {
105  try {
106  convertException::wrap([&]() {
107  ModuleBeginJobSignalSentry cpp(actReg_.get(), description());
108  implBeginJob();
109  });
110  }
111  catch(cms::Exception& ex) {
112  state_ = Exception;
113  std::ostringstream ost;
114  ost << "Calling beginJob for module " << description().moduleName() << "/'" << description().moduleLabel() << "'";
115  ex.addContext(ost.str());
116  throw;
117  }
118  }
ModuleDescription const & description() const
Definition: Worker.h:100
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
std::string const & moduleName() const
std::string const & moduleLabel() const
virtual void implBeginJob()=0
void addContext(std::string const &context)
Definition: Exception.cc:227
auto wrap(F iFunc) -> decltype(iFunc())
State state_
Definition: Worker.h:188
void edm::Worker::beginStream ( StreamID  id,
StreamContext streamContext 
)

Definition at line 136 of file Worker.cc.

References actReg_, cms::Exception::addContext(), description(), Exception, implBeginStream(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::RunIndex::invalidRunIndex(), edm::StreamContext::kBeginStream, edm::ModuleCallingContext::kRunning, moduleCallingContext_, edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), edm::StreamContext::setEventID(), edm::StreamContext::setLuminosityBlockIndex(), edm::StreamContext::setRunIndex(), edm::ModuleCallingContext::setState(), edm::StreamContext::setTimestamp(), edm::StreamContext::setTransition(), state_, and edm::convertException::wrap().

Referenced by edm::StreamSchedule::replaceModule().

136  {
137  try {
138  convertException::wrap([&]() {
139  streamContext.setTransition(StreamContext::Transition::kBeginStream);
140  streamContext.setEventID(EventID(0, 0, 0));
141  streamContext.setRunIndex(RunIndex::invalidRunIndex());
142  streamContext.setLuminosityBlockIndex(LuminosityBlockIndex::invalidLuminosityBlockIndex());
143  streamContext.setTimestamp(Timestamp());
144  ParentContext parentContext(&streamContext);
145  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
147  ModuleBeginStreamSignalSentry beginSentry(actReg_.get(), streamContext, moduleCallingContext_);
148  implBeginStream(id);
149  });
150  }
151  catch(cms::Exception& ex) {
152  state_ = Exception;
153  std::ostringstream ost;
154  ost << "Calling beginStream for module " << description().moduleName() << "/'" << description().moduleLabel() << "'";
155  ex.addContext(ost.str());
156  throw;
157  }
158  }
ModuleDescription const & description() const
Definition: Worker.h:100
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
std::string const & moduleName() const
std::string const & moduleLabel() const
ModuleCallingContext moduleCallingContext_
Definition: Worker.h:190
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
static LuminosityBlockIndex invalidLuminosityBlockIndex()
void addContext(std::string const &context)
Definition: Exception.cc:227
virtual void implBeginStream(StreamID)=0
auto wrap(F iFunc) -> decltype(iFunc())
State state_
Definition: Worker.h:188
void edm::Worker::clearCounters ( )
inline

Definition at line 122 of file Worker.h.

References timesExcept_, timesFailed_, timesPassed_, timesRun_, and timesVisited_.

Referenced by edm::StreamSchedule::clearCounters().

122  {
124  }
int timesExcept_
Definition: Worker.h:187
int timesPassed_
Definition: Worker.h:185
int timesRun_
Definition: Worker.h:183
int timesFailed_
Definition: Worker.h:186
int timesVisited_
Definition: Worker.h:184
virtual std::vector<ConsumesInfo> edm::Worker::consumesInfo ( ) const
pure virtual
ModuleDescription const* edm::Worker::descPtr ( ) const
inline

Definition at line 101 of file Worker.h.

References moduleCallingContext_, and edm::ModuleCallingContext::moduleDescription().

ModuleCallingContext moduleCallingContext_
Definition: Worker.h:190
ModuleDescription const * moduleDescription() const
ModuleDescription const& edm::Worker::description ( ) const
inline
template<typename T >
bool edm::Worker::doWork ( typename T::MyPrincipal const &  ep,
EventSetup const &  c,
StreamID  stream,
ParentContext const &  parentContext,
typename T::Context const *  context 
)

Definition at line 452 of file Worker.h.

References mps_fire::action, actions_, actReg_, cached_exception_, cms::Exception::category(), Exception, Fail, edm::exception_actions::FailPath, edm::ExceptionToActionTable::find(), edm::ModuleCallingContext::getTopModuleCallingContext(), edm::exception_actions::IgnoreCompletely, edm::PathContext::isEndPath(), mps_monitormerge::items, itemsToGetFromEvent(), edm::ParentContext::kPlaceInPath, edm::ModuleCallingContext::kRunning, moduleCallingContext_, Pass, edm::PlaceInPathContext::pathContext(), edm::ModuleCallingContext::placeInPathContext(), edm::printCmsExceptionWarning(), edm::ProductHolderIndexAmbiguous, Ready, edm::exception_actions::Rethrow, edm::ModuleCallingContext::setState(), edm::exception_actions::SkipEvent, state_, timesExcept_, timesFailed_, timesPassed_, timesRun_, timesVisited_, edm::ModuleCallingContext::type(), and edm::convertException::wrap().

Referenced by edm::WorkerInPath::runWorker().

456  {
457 
458  if (T::isEvent_) {
459  ++timesVisited_;
460  }
461  bool rc = false;
462 
463  switch(state_) {
464  case Ready: break;
465  case Pass: return true;
466  case Fail: return false;
467  case Exception: {
468  cached_exception_->raise();
469  }
470  }
471 
472  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
473 
474  try {
475  convertException::wrap([&]() {
476 
477  if (T::isEvent_) {
478  ++timesRun_;
479 
480  //if have TriggerResults based selection we want to reject the event before doing prefetching
481  if( not workerhelper::CallImpl<T>::prePrefetchSelection(this,streamID,ep,&moduleCallingContext_) ) {
482  state_ = Pass;
483  ++timesPassed_;
484  rc = true;
485  return;
486  }
487  // Prefetch products the module declares it consumes (not including the products it maybe consumes)
488  std::vector<ProductHolderIndexAndSkipBit> const& items = itemsToGetFromEvent();
489  for(auto const& item : items) {
490  ProductHolderIndex productHolderIndex = item.productHolderIndex();
491  bool skipCurrentProcess = item.skipCurrentProcess();
492  if(productHolderIndex != ProductHolderIndexAmbiguous) {
493  ep.prefetch(productHolderIndex, skipCurrentProcess, &moduleCallingContext_);
494  }
495  }
496  }
497 
499  rc = workerhelper::CallImpl<T>::call(this,streamID,ep,es, actReg_.get(), &moduleCallingContext_, context);
500 
501  if (rc) {
502  state_ = Pass;
503  if (T::isEvent_) ++timesPassed_;
504  } else {
505  state_ = Fail;
506  if (T::isEvent_) ++timesFailed_;
507  }
508  });
509  }
510  catch(cms::Exception& ex) {
511 
512  // NOTE: the warning printed as a result of ignoring or failing
513  // a module will only be printed during the full true processing
514  // pass of this module
515 
516  // Get the action corresponding to this exception. However, if processing
517  // something other than an event (e.g. run, lumi) always rethrow.
519 
520  // If we are processing an endpath and the module was scheduled, treat SkipEvent or FailPath
521  // as IgnoreCompletely, so any subsequent OutputModules are still run.
522  // For unscheduled modules only treat FailPath as IgnoreCompletely but still allow SkipEvent to throw
523  ModuleCallingContext const* top_mcc = moduleCallingContext_.getTopModuleCallingContext();
524  if(top_mcc->type() == ParentContext::Type::kPlaceInPath &&
525  top_mcc->placeInPathContext()->pathContext()->isEndPath()) {
526 
529  }
530  switch(action) {
532  rc = true;
533  ++timesPassed_;
534  state_ = Pass;
535  exceptionContext<T>(ep, ex, &moduleCallingContext_);
536  edm::printCmsExceptionWarning("IgnoreCompletely", ex);
537  break;
538  default:
539  if (T::isEvent_) ++timesExcept_;
540  state_ = Exception;
541  cached_exception_ = std::shared_ptr<cms::Exception>(ex.clone()); // propagate_const<T> has no reset() function
542  cached_exception_->raise();
543  }
544  }
545  return rc;
546  }
ModuleCallingContext const * getTopModuleCallingContext() const
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
std::string const & category() const
Definition: Exception.cc:183
exception_actions::ActionCodes find(const std::string &category) const
unsigned int ProductHolderIndex
ExceptionToActionTable const * actions_
Definition: Worker.h:192
ModuleCallingContext moduleCallingContext_
Definition: Worker.h:190
int timesExcept_
Definition: Worker.h:187
int timesPassed_
Definition: Worker.h:185
edm::propagate_const< std::shared_ptr< cms::Exception > > cached_exception_
Definition: Worker.h:193
virtual std::vector< ProductHolderIndexAndSkipBit > const & itemsToGetFromEvent() const =0
int timesRun_
Definition: Worker.h:183
string action
Definition: mps_fire.py:28
int timesFailed_
Definition: Worker.h:186
auto wrap(F iFunc) -> decltype(iFunc())
State state_
Definition: Worker.h:188
int timesVisited_
Definition: Worker.h:184
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
void edm::Worker::endJob ( void  )

Definition at line 120 of file Worker.cc.

References actReg_, cms::Exception::addContext(), description(), Exception, implEndJob(), edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), state_, and edm::convertException::wrap().

120  {
121  try {
122  convertException::wrap([&]() {
123  ModuleEndJobSignalSentry cpp(actReg_.get(), description());
124  implEndJob();
125  });
126  }
127  catch(cms::Exception& ex) {
128  state_ = Exception;
129  std::ostringstream ost;
130  ost << "Calling endJob for module " << description().moduleName() << "/'" << description().moduleLabel() << "'";
131  ex.addContext(ost.str());
132  throw;
133  }
134  }
ModuleDescription const & description() const
Definition: Worker.h:100
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
std::string const & moduleName() const
std::string const & moduleLabel() const
virtual void implEndJob()=0
void addContext(std::string const &context)
Definition: Exception.cc:227
auto wrap(F iFunc) -> decltype(iFunc())
State state_
Definition: Worker.h:188
void edm::Worker::endStream ( StreamID  id,
StreamContext streamContext 
)

Definition at line 160 of file Worker.cc.

References actReg_, cms::Exception::addContext(), description(), Exception, implEndStream(), edm::LuminosityBlockIndex::invalidLuminosityBlockIndex(), edm::RunIndex::invalidRunIndex(), edm::StreamContext::kEndStream, edm::ModuleCallingContext::kRunning, moduleCallingContext_, edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), edm::StreamContext::setEventID(), edm::StreamContext::setLuminosityBlockIndex(), edm::StreamContext::setRunIndex(), edm::ModuleCallingContext::setState(), edm::StreamContext::setTimestamp(), edm::StreamContext::setTransition(), state_, and edm::convertException::wrap().

160  {
161  try {
162  convertException::wrap([&]() {
163  streamContext.setTransition(StreamContext::Transition::kEndStream);
164  streamContext.setEventID(EventID(0, 0, 0));
165  streamContext.setRunIndex(RunIndex::invalidRunIndex());
166  streamContext.setLuminosityBlockIndex(LuminosityBlockIndex::invalidLuminosityBlockIndex());
167  streamContext.setTimestamp(Timestamp());
168  ParentContext parentContext(&streamContext);
169  ModuleContextSentry moduleContextSentry(&moduleCallingContext_, parentContext);
171  ModuleEndStreamSignalSentry endSentry(actReg_.get(), streamContext, moduleCallingContext_);
172  implEndStream(id);
173  });
174  }
175  catch(cms::Exception& ex) {
176  state_ = Exception;
177  std::ostringstream ost;
178  ost << "Calling endStream for module " << description().moduleName() << "/'" << description().moduleLabel() << "'";
179  ex.addContext(ost.str());
180  throw;
181  }
182  }
ModuleDescription const & description() const
Definition: Worker.h:100
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
std::string const & moduleName() const
std::string const & moduleLabel() const
ModuleCallingContext moduleCallingContext_
Definition: Worker.h:190
static RunIndex invalidRunIndex()
Definition: RunIndex.cc:9
static LuminosityBlockIndex invalidLuminosityBlockIndex()
void addContext(std::string const &context)
Definition: Exception.cc:227
virtual void implEndStream(StreamID)=0
auto wrap(F iFunc) -> decltype(iFunc())
State state_
Definition: Worker.h:188
virtual void edm::Worker::implBeginJob ( )
protectedpure virtual

Implemented in edm::WorkerT< T >.

Referenced by beginJob().

virtual void edm::Worker::implBeginStream ( StreamID  )
protectedpure virtual

Implemented in edm::WorkerT< T >.

Referenced by beginStream().

virtual bool edm::Worker::implDo ( EventPrincipal const &  ,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual
virtual bool edm::Worker::implDoBegin ( RunPrincipal const &  rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual
virtual bool edm::Worker::implDoBegin ( LuminosityBlockPrincipal const &  lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual

Implemented in edm::WorkerT< T >.

virtual bool edm::Worker::implDoEnd ( RunPrincipal const &  rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual
virtual bool edm::Worker::implDoEnd ( LuminosityBlockPrincipal const &  lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual

Implemented in edm::WorkerT< T >.

virtual bool edm::Worker::implDoPrePrefetchSelection ( StreamID  id,
EventPrincipal const &  ep,
ModuleCallingContext const *  mcc 
)
protectedpure virtual
virtual bool edm::Worker::implDoStreamBegin ( StreamID  id,
RunPrincipal const &  rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual
virtual bool edm::Worker::implDoStreamBegin ( StreamID  id,
LuminosityBlockPrincipal const &  lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual

Implemented in edm::WorkerT< T >.

virtual bool edm::Worker::implDoStreamEnd ( StreamID  id,
RunPrincipal const &  rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual
virtual bool edm::Worker::implDoStreamEnd ( StreamID  id,
LuminosityBlockPrincipal const &  lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
protectedpure virtual

Implemented in edm::WorkerT< T >.

virtual void edm::Worker::implEndJob ( )
protectedpure virtual

Implemented in edm::WorkerT< T >.

Referenced by endJob().

virtual void edm::Worker::implEndStream ( StreamID  )
protectedpure virtual

Implemented in edm::WorkerT< T >.

Referenced by endStream().

virtual void edm::Worker::implPostForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
privatepure virtual

Implemented in edm::WorkerT< T >.

Referenced by postForkReacquireResources().

virtual void edm::Worker::implPreForkReleaseResources ( )
privatepure virtual

Implemented in edm::WorkerT< T >.

Referenced by preForkReleaseResources().

virtual void edm::Worker::implRegisterThinnedAssociations ( ProductRegistry const &  ,
ThinnedAssociationsHelper  
)
privatepure virtual

Implemented in edm::WorkerT< T >.

Referenced by registerThinnedAssociations().

virtual void edm::Worker::implRespondToCloseInputFile ( FileBlock const &  fb)
privatepure virtual

Implemented in edm::WorkerT< T >.

Referenced by respondToCloseInputFile().

virtual void edm::Worker::implRespondToOpenInputFile ( FileBlock const &  fb)
privatepure virtual

Implemented in edm::WorkerT< T >.

Referenced by respondToOpenInputFile().

virtual void edm::Worker::itemsMayGet ( BranchType  ,
std::vector< ProductHolderIndexAndSkipBit > &   
) const
privatepure virtual

Implemented in edm::WorkerT< T >.

virtual void edm::Worker::itemsToGet ( BranchType  ,
std::vector< ProductHolderIndexAndSkipBit > &   
) const
privatepure virtual

Implemented in edm::WorkerT< T >.

virtual std::vector<ProductHolderIndexAndSkipBit> const& edm::Worker::itemsToGetFromEvent ( ) const
privatepure virtual

Implemented in edm::WorkerT< T >.

Referenced by doWork().

virtual void edm::Worker::modulesDependentUpon ( std::vector< const char * > &  oModuleLabels,
bool  iPrint 
) const
pure virtual

Implemented in edm::WorkerT< T >.

virtual void edm::Worker::modulesWhoseProductsAreConsumed ( std::vector< ModuleDescription const * > &  modules,
ProductRegistry const &  preg,
std::map< std::string, ModuleDescription const * > const &  labelsToDesc 
) const
pure virtual

Implemented in edm::WorkerT< T >.

virtual Types edm::Worker::moduleType ( ) const
pure virtual
Worker& edm::Worker::operator= ( Worker const &  )
delete
void edm::Worker::pathFinished ( EventPrincipal const &  iEvent)

Definition at line 184 of file Worker.cc.

References earlyDeleteHelper_.

184  {
185  if(earlyDeleteHelper_) {
186  earlyDeleteHelper_->pathFinished(iEvent);
187  }
188  }
int iEvent
Definition: GenABIO.cc:230
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
Definition: Worker.h:197
void edm::Worker::postDoEvent ( EventPrincipal const &  iEvent)

Definition at line 189 of file Worker.cc.

References earlyDeleteHelper_.

Referenced by edm::WorkerT< T >::implDo().

189  {
190  if(earlyDeleteHelper_) {
191  earlyDeleteHelper_->moduleRan(iEvent);
192  }
193  }
int iEvent
Definition: GenABIO.cc:230
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
Definition: Worker.h:197
void edm::Worker::postForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
inline

Definition at line 92 of file Worker.h.

References implPostForkReacquireResources().

Referenced by edm::Schedule::postForkReacquireResources().

92 {implPostForkReacquireResources(iChildIndex, iNumberOfChildren);}
virtual void implPostForkReacquireResources(unsigned int iChildIndex, unsigned int iNumberOfChildren)=0
void edm::Worker::preForkReleaseResources ( )
inline

Definition at line 91 of file Worker.h.

References implPreForkReleaseResources().

Referenced by edm::Schedule::preForkReleaseResources().

virtual void implPreForkReleaseResources()=0
void edm::Worker::registerThinnedAssociations ( ProductRegistry const &  registry,
ThinnedAssociationsHelper helper 
)
inline

Definition at line 93 of file Worker.h.

References implRegisterThinnedAssociations().

virtual void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)=0
static Interceptor::Registry registry("Interceptor")
void edm::Worker::reset ( void  )
inline

Definition at line 95 of file Worker.h.

References Ready, and state_.

Referenced by edm::WorkerManager::resetAll().

95 { state_ = Ready; }
State state_
Definition: Worker.h:188
void edm::Worker::resetModuleDescription ( ModuleDescription const *  iDesc)
protected
void edm::Worker::respondToCloseInputFile ( FileBlock const &  fb)
inline

Definition at line 89 of file Worker.h.

References implRespondToCloseInputFile().

Referenced by edm::Schedule::respondToCloseInputFile().

virtual void implRespondToCloseInputFile(FileBlock const &fb)=0
void edm::Worker::respondToOpenInputFile ( FileBlock const &  fb)
inline

Definition at line 88 of file Worker.h.

References implRespondToOpenInputFile().

Referenced by edm::Schedule::respondToOpenInputFile().

virtual void implRespondToOpenInputFile(FileBlock const &fb)=0
void edm::Worker::setActivityRegistry ( std::shared_ptr< ActivityRegistry areg)

The signals are required to live longer than the last call to 'doWork' this was done to improve performance based on profiling

Definition at line 90 of file Worker.cc.

References actReg_, and edm::areg.

90  {
91  actReg_ = areg;
92  }
std::shared_ptr< ActivityRegistry > actReg_
Definition: Worker.h:195
areg
Definition: Schedule.cc:374
void edm::Worker::setEarlyDeleteHelper ( EarlyDeleteHelper iHelper)

Definition at line 94 of file Worker.cc.

References earlyDeleteHelper_.

94  {
95  earlyDeleteHelper_=iHelper;
96  }
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
Definition: Worker.h:197
State edm::Worker::state ( ) const
inline

Definition at line 131 of file Worker.h.

References state_.

131 { return state_; }
State state_
Definition: Worker.h:188
int edm::Worker::timesExcept ( ) const
inline

Definition at line 130 of file Worker.h.

References timesExcept_.

Referenced by edm::fillWorkerSummaryAux().

130 { return timesExcept_; }
int timesExcept_
Definition: Worker.h:187
int edm::Worker::timesFailed ( ) const
inline

Definition at line 129 of file Worker.h.

References timesFailed_.

Referenced by edm::fillWorkerSummaryAux().

129 { return timesFailed_; }
int timesFailed_
Definition: Worker.h:186
int edm::Worker::timesPass ( ) const
inline

Definition at line 133 of file Worker.h.

References timesPassed().

133 { return timesPassed(); } // for backward compatibility only - to be removed soon
int timesPassed() const
Definition: Worker.h:128
int edm::Worker::timesPassed ( ) const
inline

Definition at line 128 of file Worker.h.

References timesPassed_.

Referenced by edm::fillWorkerSummaryAux(), and timesPass().

128 { return timesPassed_; }
int timesPassed_
Definition: Worker.h:185
int edm::Worker::timesRun ( ) const
inline

Definition at line 126 of file Worker.h.

References timesRun_.

Referenced by edm::fillWorkerSummaryAux().

126 { return timesRun_; }
int timesRun_
Definition: Worker.h:183
int edm::Worker::timesVisited ( ) const
inline

Definition at line 127 of file Worker.h.

References timesVisited_.

Referenced by edm::fillWorkerSummaryAux().

127 { return timesVisited_; }
int timesVisited_
Definition: Worker.h:184
virtual void edm::Worker::updateLookup ( BranchType  iBranchType,
ProductHolderIndexHelper const &   
)
pure virtual

Implemented in edm::WorkerT< T >.

Referenced by edm::Schedule::changeModule().

virtual std::string edm::Worker::workerType ( ) const
protectedpure virtual

Implemented in edm::WorkerT< T >.

Friends And Related Function Documentation

template<typename O >
friend class workerhelper::CallImpl
friend

Definition at line 136 of file Worker.h.

Member Data Documentation

ExceptionToActionTable const* edm::Worker::actions_
private

Definition at line 192 of file Worker.h.

Referenced by doWork().

std::shared_ptr<ActivityRegistry> edm::Worker::actReg_
private
edm::propagate_const<std::shared_ptr<cms::Exception> > edm::Worker::cached_exception_
private

Definition at line 193 of file Worker.h.

Referenced by doWork().

edm::propagate_const<EarlyDeleteHelper*> edm::Worker::earlyDeleteHelper_
private

Definition at line 197 of file Worker.h.

Referenced by pathFinished(), postDoEvent(), and setEarlyDeleteHelper().

ModuleCallingContext edm::Worker::moduleCallingContext_
private

Definition at line 190 of file Worker.h.

Referenced by beginStream(), descPtr(), description(), doWork(), endStream(), and resetModuleDescription().

State edm::Worker::state_
private

Definition at line 188 of file Worker.h.

Referenced by beginJob(), beginStream(), doWork(), endJob(), endStream(), reset(), and state().

int edm::Worker::timesExcept_
private

Definition at line 187 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesExcept().

int edm::Worker::timesFailed_
private

Definition at line 186 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesFailed().

int edm::Worker::timesPassed_
private

Definition at line 185 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesPassed().

int edm::Worker::timesRun_
private

Definition at line 183 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesRun().

int edm::Worker::timesVisited_
private

Definition at line 184 of file Worker.h.

Referenced by clearCounters(), doWork(), and timesVisited().