#include <Worker.h>
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 () |
ModuleDescription const * | descPtr () const |
ModuleDescription const & | description () const |
template<typename T > | |
bool | doWork (typename T::MyPrincipal &, EventSetup const &c, CPUTimer *const timer, 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) const =0 |
virtual Types | moduleType () const =0 |
Worker & | operator= (Worker const &)=delete |
void | pathFinished (EventPrincipal &) |
void | postDoEvent (EventPrincipal &) |
void | postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren) |
void | preForkReleaseResources () |
void | reset () |
void | respondToCloseInputFile (FileBlock const &fb) |
void | respondToOpenInputFile (FileBlock const &fb) |
void | setActivityRegistry (boost::shared_ptr< ActivityRegistry > areg) |
void | setEarlyDeleteHelper (EarlyDeleteHelper *iHelper) |
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 |
virtual void | updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)=0 |
void | useStopwatch () |
Worker (ModuleDescription const &iMD, ExceptionToActionTable const *iActions) | |
Worker (Worker const &)=delete | |
virtual | ~Worker () |
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 | 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_ |
boost::shared_ptr < ActivityRegistry > | actReg_ |
boost::shared_ptr< cms::Exception > | cached_exception_ |
EarlyDeleteHelper * | earlyDeleteHelper_ |
ModuleCallingContext | moduleCallingContext_ |
State | state_ |
RunStopwatch::StopwatchPointer | stopwatch_ |
int | timesExcept_ |
int | timesFailed_ |
int | timesPassed_ |
int | timesRun_ |
int | timesVisited_ |
Friends | |
template<typename O > | |
class | workerhelper::CallImpl |
enum edm::Worker::State |
Enumerator | |
---|---|
Ready | |
Pass | |
Fail | |
Exception |
enum edm::Worker::Types |
Enumerator | |
---|---|
kAnalyzer | |
kFilter | |
kProducer | |
kOutputModule |
edm::Worker::Worker | ( | ModuleDescription const & | iMD, |
ExceptionToActionTable const * | iActions | ||
) |
Definition at line 71 of file Worker.cc.
|
delete |
|
inlineprotected |
void edm::Worker::beginJob | ( | void | ) |
Definition at line 105 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().
void edm::Worker::beginStream | ( | StreamID | id, |
StreamContext & | streamContext | ||
) |
Definition at line 137 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().
|
inline |
Definition at line 117 of file Worker.h.
References timesExcept_, timesFailed_, timesPassed_, timesRun_, and timesVisited_.
Referenced by edm::StreamSchedule::clearCounters().
|
inline |
Definition at line 98 of file Worker.h.
References moduleCallingContext_, and edm::ModuleCallingContext::moduleDescription().
|
inline |
Definition at line 97 of file Worker.h.
References moduleCallingContext_, and edm::ModuleCallingContext::moduleDescription().
Referenced by edm::UnscheduledCallProducer::addWorker(), beginJob(), beginStream(), endJob(), endStream(), edm::fillModuleInPathSummary(), edm::fillModuleInPathTimingSummary(), edm::StreamSchedule::fillWorkers(), edm::fillWorkerSummaryAux(), and edm::fillWorkerTimingSummaryAux().
bool edm::Worker::doWork | ( | typename T::MyPrincipal & | ep, |
EventSetup const & | c, | ||
CPUTimer *const | timer, | ||
StreamID | stream, | ||
ParentContext const & | parentContext, | ||
typename T::Context const * | context | ||
) |
Definition at line 397 of file Worker.h.
References alignCSCRings::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(), 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_, stopwatch_, timesExcept_, timesFailed_, timesPassed_, timesRun_, timesVisited_, edm::ModuleCallingContext::type(), and edm::convertException::wrap().
Referenced by edm::WorkerInPath::runWorker().
void edm::Worker::endJob | ( | void | ) |
Definition at line 121 of file Worker.cc.
References actReg_, cms::Exception::addContext(), description(), Exception, implEndJob(), edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), state_, and edm::convertException::wrap().
void edm::Worker::endStream | ( | StreamID | id, |
StreamContext & | streamContext | ||
) |
Definition at line 161 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().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
Referenced by beginJob().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
Referenced by beginStream().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
Referenced by edm::workerhelper::CallImpl< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin > >::call().
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
|
protectedpure virtual |
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
Referenced by endJob().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
Referenced by endStream().
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by postForkReacquireResources().
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by preForkReleaseResources().
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by respondToCloseInputFile().
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by respondToOpenInputFile().
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by doWork().
|
pure virtual |
Implemented in edm::WorkerT< T >.
|
pure virtual |
Implemented in edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, and edm::WorkerT< T >.
Referenced by edm::WorkerManager::addToUnscheduledWorkers(), and edm::StreamSchedule::fillWorkers().
void edm::Worker::pathFinished | ( | EventPrincipal & | iEvent | ) |
Definition at line 189 of file Worker.cc.
References earlyDeleteHelper_, and edm::EarlyDeleteHelper::pathFinished().
void edm::Worker::postDoEvent | ( | EventPrincipal & | iEvent | ) |
Definition at line 194 of file Worker.cc.
References earlyDeleteHelper_, and edm::EarlyDeleteHelper::moduleRan().
Referenced by edm::WorkerT< T >::implDo().
|
inline |
Definition at line 90 of file Worker.h.
References implPostForkReacquireResources().
Referenced by edm::Schedule::postForkReacquireResources().
|
inline |
Definition at line 89 of file Worker.h.
References implPreForkReleaseResources().
Referenced by edm::Schedule::preForkReleaseResources().
|
inline |
Definition at line 92 of file Worker.h.
Referenced by edm::WorkerManager::resetAll().
|
protected |
Definition at line 99 of file Worker.cc.
References moduleCallingContext_, edm::ModuleCallingContext::parent(), edm::ModuleCallingContext::previousModuleOnThread(), edm::ModuleCallingContext::state(), and groupFilesInBlocks::temp.
Referenced by edm::WorkerT< T >::setModule().
|
inline |
Definition at line 87 of file Worker.h.
References implRespondToCloseInputFile().
Referenced by edm::Schedule::respondToCloseInputFile().
|
inline |
Definition at line 86 of file Worker.h.
References implRespondToOpenInputFile().
Referenced by edm::Schedule::respondToOpenInputFile().
void edm::Worker::setActivityRegistry | ( | boost::shared_ptr< ActivityRegistry > | areg | ) |
void edm::Worker::setEarlyDeleteHelper | ( | EarlyDeleteHelper * | iHelper | ) |
|
inline |
|
inline |
Definition at line 113 of file Worker.h.
References stopwatch_.
Referenced by edm::fillWorkerTimingSummaryAux().
|
inline |
Definition at line 127 of file Worker.h.
References timesExcept_.
Referenced by edm::fillWorkerSummaryAux().
|
inline |
Definition at line 126 of file Worker.h.
References timesFailed_.
Referenced by edm::fillWorkerSummaryAux().
|
inline |
|
inline |
Definition at line 125 of file Worker.h.
References timesPassed_.
Referenced by edm::fillWorkerSummaryAux(), and timesPass().
|
inline |
Definition at line 123 of file Worker.h.
References timesRun_.
Referenced by edm::fillWorkerSummaryAux(), and edm::fillWorkerTimingSummaryAux().
|
inline |
Definition at line 124 of file Worker.h.
References timesVisited_.
Referenced by edm::fillWorkerSummaryAux(), and edm::fillWorkerTimingSummaryAux().
|
pure virtual |
Implemented in edm::WorkerT< T >.
void edm::Worker::useStopwatch | ( | ) |
Definition at line 185 of file Worker.cc.
References stopwatch_.
Referenced by edm::WorkerManager::addToAllWorkers().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
|
friend |
|
private |
|
private |
Definition at line 189 of file Worker.h.
Referenced by activityRegistry(), beginJob(), beginStream(), doWork(), endJob(), endStream(), and setActivityRegistry().
|
private |
|
private |
Definition at line 191 of file Worker.h.
Referenced by pathFinished(), postDoEvent(), and setEarlyDeleteHelper().
|
private |
Definition at line 184 of file Worker.h.
Referenced by beginStream(), descPtr(), description(), doWork(), endStream(), and resetModuleDescription().
|
private |
Definition at line 182 of file Worker.h.
Referenced by beginJob(), beginStream(), doWork(), endJob(), endStream(), reset(), and state().
|
private |
Definition at line 175 of file Worker.h.
Referenced by doWork(), timeCpuReal(), and useStopwatch().
|
private |
Definition at line 181 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesExcept().
|
private |
Definition at line 180 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesFailed().
|
private |
Definition at line 179 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesPassed().
|
private |
Definition at line 177 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesRun().
|
private |
Definition at line 178 of file Worker.h.
Referenced by clearCounters(), doWork(), and timesVisited().