![]() |
![]() |
#include <Worker.h>
Public Types | |
enum | State { Ready, Pass, Fail, Exception } |
Public Member Functions | |
void | beginJob () |
void | clearCounters () |
ModuleDescription const * | descPtr () const |
ModuleDescription const & | description () const |
template<typename T > | |
bool | doWork (typename T::MyPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc, CPUTimer *const timer) |
void | endJob () |
void | postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren) |
void | preForkReleaseResources () |
void | reset () |
void | respondToCloseInputFile (FileBlock const &fb) |
void | respondToCloseOutputFiles (FileBlock const &fb) |
void | respondToOpenInputFile (FileBlock const &fb) |
void | respondToOpenOutputFiles (FileBlock const &fb) |
void | setActivityRegistry (boost::shared_ptr< ActivityRegistry > areg) |
State | state () const |
std::pair< double, double > | timeCpuReal () const |
int | timesExcept () const |
int | timesFailed () const |
int | timesPass () const |
int | timesPassed () const |
int | timesRun () const |
int | timesVisited () const |
void | useStopwatch () |
Worker (ModuleDescription const &iMD, WorkerParams const &iWP) | |
virtual | ~Worker () |
Protected Member Functions | |
virtual void | implBeginJob ()=0 |
virtual bool | implDoBegin (EventPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc)=0 |
virtual bool | implDoBegin (RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)=0 |
virtual bool | implDoBegin (LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)=0 |
virtual bool | implDoEnd (EventPrincipal &, EventSetup const &c, CurrentProcessingContext const *cpc)=0 |
virtual bool | implDoEnd (RunPrincipal &rp, EventSetup const &c, CurrentProcessingContext const *cpc)=0 |
virtual bool | implDoEnd (LuminosityBlockPrincipal &lbp, EventSetup const &c, CurrentProcessingContext const *cpc)=0 |
virtual void | implEndJob ()=0 |
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 | implRespondToCloseInputFile (FileBlock const &fb)=0 |
virtual void | implRespondToCloseOutputFiles (FileBlock const &fb)=0 |
virtual void | implRespondToOpenInputFile (FileBlock const &fb)=0 |
virtual void | implRespondToOpenOutputFiles (FileBlock const &fb)=0 |
Private Attributes | |
ActionTable const * | actions_ |
boost::shared_ptr < ActivityRegistry > | actReg_ |
boost::shared_ptr< edm::Exception > | cached_exception_ |
ModuleDescription | md_ |
State | state_ |
RunStopwatch::StopwatchPointer | stopwatch_ |
int | timesExcept_ |
int | timesFailed_ |
int | timesPassed_ |
int | timesRun_ |
int | timesVisited_ |
enum edm::Worker::State |
Enumerator | |
---|---|
Ready | |
Pass | |
Fail | |
Exception |
edm::Worker::Worker | ( | ModuleDescription const & | iMD, |
WorkerParams const & | iWP | ||
) |
Definition at line 43 of file Worker.cc.
void edm::Worker::beginJob | ( | void | ) |
Definition at line 66 of file Worker.cc.
References actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, description(), cmsCodeRules.cppFunctionSkipper::exception, Exception, implBeginJob(), md_, asciidump::s, state_, edm::errors::StdException, edm::errors::Unknown, and workerType().
Referenced by edm::Schedule::beginJob(), and edm::Schedule::changeModule().
|
inline |
Definition at line 73 of file Worker.h.
References timesExcept_, timesFailed_, timesPassed_, timesRun_, and timesVisited_.
Referenced by edm::Schedule::clearCounters().
|
inline |
|
inline |
Definition at line 63 of file Worker.h.
References md_.
Referenced by edm::UnscheduledCallProducer::addWorker(), beginJob(), edm::Schedule::changeModule(), endJob(), edm::fillModuleInPathSummary(), edm::Schedule::fillWorkers(), edm::fillWorkerSummaryAux(), edm::WorkerMaker< T >::implSwapModule(), and edm::WorkerT< OutputModule >::setModule().
bool edm::Worker::doWork | ( | typename T::MyPrincipal & | ep, |
EventSetup const & | c, | ||
CurrentProcessingContext const * | cpc, | ||
CPUTimer *const | timer | ||
) |
Definition at line 156 of file Worker.h.
References alignmentValidation::action, actions_, actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, cmsCodeRules.cppFunctionSkipper::exception, Exception, Fail, edm::actions::FailModule, edm::actions::FailPath, edm::ActionTable::find(), edm::actions::IgnoreCompletely, implDoBegin(), implDoEnd(), edm::CurrentProcessingContext::isEndPath(), edm::CurrentProcessingContext::isUnscheduled(), md_, edm::errors::OtherCMS, Pass, Ready, edm::actions::Rethrow, cms::Exception::rootCause(), asciidump::s, edm::actions::SkipEvent, state_, edm::errors::StdException, stopwatch_, timesExcept_, timesFailed_, timesPassed_, timesRun_, timesVisited_, edm::errors::Unknown, and cms::Exception::what().
Referenced by edm::WorkerInPath::runWorker().
void edm::Worker::endJob | ( | void | ) |
Definition at line 138 of file Worker.cc.
References actReg_, edm::errors::BadAlloc, edm::errors::BadExceptionType, trackerHits::c, cached_exception_, description(), cmsCodeRules.cppFunctionSkipper::exception, Exception, implEndJob(), md_, asciidump::s, state_, edm::errors::StdException, edm::errors::Unknown, and workerType().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by beginJob().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by doWork().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by doWork().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by endJob().
|
privatepure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by postForkReacquireResources().
|
privatepure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by preForkReleaseResources().
|
privatepure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by respondToCloseInputFile().
|
privatepure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by respondToCloseOutputFiles().
|
privatepure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by respondToOpenInputFile().
|
privatepure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by respondToOpenOutputFiles().
|
inline |
Definition at line 59 of file Worker.h.
References implPostForkReacquireResources().
Referenced by edm::Schedule::postForkReacquireResources().
|
inline |
Definition at line 58 of file Worker.h.
References implPreForkReleaseResources().
Referenced by edm::Schedule::preForkReleaseResources().
|
inline |
Definition at line 61 of file Worker.h.
Referenced by edm::Schedule::resetAll().
|
inline |
Definition at line 54 of file Worker.h.
References implRespondToCloseInputFile().
Referenced by edm::Schedule::respondToCloseInputFile().
|
inline |
Definition at line 56 of file Worker.h.
References implRespondToCloseOutputFiles().
Referenced by edm::Schedule::respondToCloseOutputFiles().
|
inline |
Definition at line 53 of file Worker.h.
References implRespondToOpenInputFile().
Referenced by edm::Schedule::respondToOpenInputFile().
|
inline |
Definition at line 55 of file Worker.h.
References implRespondToOpenOutputFiles().
Referenced by edm::Schedule::respondToOpenOutputFiles().
void edm::Worker::setActivityRegistry | ( | boost::shared_ptr< ActivityRegistry > | areg | ) |
|
inline |
|
inline |
|
inline |
Definition at line 83 of file Worker.h.
References timesExcept_.
Referenced by edm::fillWorkerSummaryAux().
|
inline |
Definition at line 82 of file Worker.h.
References timesFailed_.
Referenced by edm::fillWorkerSummaryAux().
|
inline |
|
inline |
Definition at line 81 of file Worker.h.
References timesPassed_.
Referenced by edm::fillWorkerSummaryAux(), and timesPass().
|
inline |
Definition at line 79 of file Worker.h.
References timesRun_.
Referenced by edm::fillWorkerSummaryAux().
|
inline |
Definition at line 80 of file Worker.h.
References timesVisited_.
Referenced by edm::fillWorkerSummaryAux().
void edm::Worker::useStopwatch | ( | ) |
Definition at line 210 of file Worker.cc.
References stopwatch_.
Referenced by edm::Schedule::addToAllWorkers().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >, and edm::WorkerT< OutputModule >.
Referenced by beginJob(), and endJob().
|
private |
|
private |
Definition at line 127 of file Worker.h.
Referenced by beginJob(), doWork(), endJob(), and setActivityRegistry().
|
private |
Definition at line 125 of file Worker.h.
Referenced by beginJob(), doWork(), and endJob().
|
private |
Definition at line 123 of file Worker.h.
Referenced by beginJob(), descPtr(), description(), doWork(), and endJob().
|
private |
|
private |
Definition at line 114 of file Worker.h.
Referenced by doWork(), timeCpuReal(), and useStopwatch().
|
private |
Definition at line 120 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesExcept().
|
private |
Definition at line 119 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesFailed().
|
private |
Definition at line 118 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesPassed().
|
private |
Definition at line 116 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesRun().
|
private |
Definition at line 117 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesVisited().