#include <Worker.h>
Classes | |
class | RunModuleTask |
class | TransitionIDValue |
class | TransitionIDValueBase |
Public Types | |
enum | State { Ready, Pass, Fail, Exception } |
enum | Types { kAnalyzer, kFilter, kProducer, kOutputModule } |
Public Member Functions | |
void | addedToPath () |
void | beginJob () |
void | beginStream (StreamID id, StreamContext &streamContext) |
void | callWhenDoneAsync (WaitingTask *task) |
void | clearCounters () |
virtual std::vector< ConsumesInfo > | consumesInfo () 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) |
template<typename T > | |
void | doWorkAsync (WaitingTask *task, typename T::MyPrincipal const &, EventSetup const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context) |
template<typename T > | |
void | doWorkNoPrefetchingAsync (WaitingTask *task, 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 | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc) const =0 |
virtual Types | moduleType () const =0 |
Worker & | operator= (Worker const &)=delete |
void | postDoEvent (EventPrincipal const &) |
void | postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren) |
void | preForkReleaseResources () |
void | registerThinnedAssociations (ProductRegistry const ®istry, ThinnedAssociationsHelper &helper) |
void | reset () |
virtual void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies)=0 |
void | respondToCloseInputFile (FileBlock const &fb) |
void | respondToOpenInputFile (FileBlock const &fb) |
void | setActivityRegistry (std::shared_ptr< ActivityRegistry > areg) |
void | setEarlyDeleteHelper (EarlyDeleteHelper *iHelper) |
void | skipOnPath () |
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, ProductResolverIndexHelper const &)=0 |
Worker (ModuleDescription const &iMD, ExceptionToActionTable const *iActions) | |
Worker (Worker const &)=delete | |
virtual | ~Worker () |
Private Member Functions | |
void | emitPostModuleEventPrefetchingSignal () |
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< ProductResolverIndexAndSkipBit > &) const =0 |
virtual std::vector< ProductResolverIndex > const & | itemsShouldPutInEvent () const =0 |
virtual void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const =0 |
virtual std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType) const =0 |
virtual void | preActionBeforeRunEventAsync (WaitingTask *iTask, ModuleCallingContext const &moduleCallingContext, Principal const &iPrincipal) const =0 |
void | prefetchAsync (WaitingTask *, ParentContext const &parentContext, Principal const &) |
template<typename T > | |
bool | runModule (typename T::MyPrincipal const &, EventSetup const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context) |
template<typename T > | |
void | runModuleAfterAsyncPrefetch (std::exception_ptr const *iEPtr, typename T::MyPrincipal const &ep, EventSetup const &es, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context) |
virtual SerialTaskQueueChain * | serializeRunModule ()=0 |
template<bool IS_EVENT> | |
std::exception_ptr | setException (std::exception_ptr iException) |
template<bool IS_EVENT> | |
bool | setFailed () |
template<bool IS_EVENT> | |
bool | setPassed () |
bool | shouldRethrowException (std::exception_ptr iPtr, ParentContext const &parentContext, bool isEvent, TransitionIDValueBase const &iID) const |
Static Private Member Functions | |
static void | exceptionContext (cms::Exception &ex, ModuleCallingContext const *mcc) |
Private Attributes | |
ExceptionToActionTable const * | actions_ |
std::shared_ptr< ActivityRegistry > | actReg_ |
std::exception_ptr | cached_exception_ |
edm::propagate_const< EarlyDeleteHelper * > | earlyDeleteHelper_ |
ModuleCallingContext | moduleCallingContext_ |
std::atomic< int > | numberOfPathsLeftToRun_ |
int | numberOfPathsOn_ |
std::atomic< State > | state_ |
std::atomic< int > | timesExcept_ |
std::atomic< int > | timesFailed_ |
std::atomic< int > | timesPassed_ |
std::atomic< int > | timesRun_ |
std::atomic< int > | timesVisited_ |
edm::WaitingTaskList | waitingTasks_ |
std::atomic< bool > | workStarted_ |
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 72 of file Worker.cc.
|
delete |
|
inlineprotected |
Definition at line 206 of file Worker.h.
References edm::exceptionContext(), and benchmark_cfg::fb.
Referenced by edm::WorkerT< T >::implDo().
|
inline |
void edm::Worker::beginJob | ( | void | ) |
Definition at line 245 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 277 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 107 of file Worker.h.
References bk::beginJob().
|
inline |
|
pure virtual |
Implemented in edm::WorkerT< T >.
Referenced by edm::PathsAndConsumesOfModules::doConsumesInfo().
|
inline |
Definition at line 133 of file Worker.h.
|
inline |
Definition at line 132 of file Worker.h.
Referenced by beginJob(), beginStream(), endJob(), endStream(), edm::fillModuleInPathSummary(), edm::StreamSchedule::fillWorkers(), edm::fillWorkerSummaryAux(), edm::WorkerT< T >::resolvePutIndicies(), and shouldRethrowException().
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 712 of file Worker.h.
References Fail, edm::ServiceRegistry::instance(), edm::ModuleCallingContext::kInvalid, edm::ModuleCallingContext::kPrefetching, edm::make_empty_waiting_task(), Pass, edm::ServiceRegistry::presentToken(), mps_fire::queue, Ready, and edm::ModuleCallingContext::setContext().
Referenced by edm::WorkerInPath::runWorker().
void edm::Worker::doWorkAsync | ( | WaitingTask * | task, |
typename T::MyPrincipal const & | ep, | ||
EventSetup const & | c, | ||
StreamID | stream, | ||
ParentContext const & | parentContext, | ||
typename T::Context const * | context | ||
) |
Definition at line 615 of file Worker.h.
References edm::ModuleCallingContext::kPrefetching, and edm::ModuleCallingContext::setContext().
Referenced by edm::WorkerInPath::runWorkerAsync().
void edm::Worker::doWorkNoPrefetchingAsync | ( | WaitingTask * | task, |
typename T::MyPrincipal const & | principal, | ||
EventSetup const & | c, | ||
StreamID | stream, | ||
ParentContext const & | parentContext, | ||
typename T::Context const * | context | ||
) |
Definition at line 674 of file Worker.h.
References edm::ServiceRegistry::instance(), edm::make_functor_task(), edm::ServiceRegistry::presentToken(), cmsRelvalreport::principal(), and mps_fire::queue.
Referenced by edm::WorkerInPath::runWorkerAsync().
|
inlineprivate |
Definition at line 301 of file Worker.h.
void edm::Worker::endJob | ( | void | ) |
Definition at line 261 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 301 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().
|
staticprivate |
Definition at line 99 of file Worker.cc.
References cms::Exception::addContext(), edm::exceptionContext(), edm::ModuleCallingContext::globalContext(), edm::ModuleCallingContext::internalContext(), edm::ParentContext::kGlobal, edm::ParentContext::kInternal, edm::ParentContext::kModule, edm::ParentContext::kPlaceInPath, edm::ModuleCallingContext::kPrefetching, edm::ParentContext::kStream, edm::InternalContext::moduleCallingContext(), edm::ModuleCallingContext::moduleCallingContext(), edm::ModuleCallingContext::moduleDescription(), edm::ModuleDescription::moduleLabel(), edm::ModuleDescription::moduleName(), or, edm::PlaceInPathContext::pathContext(), edm::PathContext::pathName(), edm::ModuleCallingContext::placeInPathContext(), edm::ModuleCallingContext::state(), edm::PathContext::streamContext(), edm::ModuleCallingContext::streamContext(), and edm::ModuleCallingContext::type().
|
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 |
|
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 >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by prefetchAsync().
|
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 >, edm::WorkerT< T >, and edm::WorkerT< T >.
Referenced by edm::WorkerManager::addToUnscheduledWorkers(), and edm::StreamSchedule::fillWorkers().
void edm::Worker::postDoEvent | ( | EventPrincipal const & | iEvent | ) |
Definition at line 331 of file Worker.cc.
References earlyDeleteHelper_.
Referenced by edm::WorkerT< T >::implDo().
|
inline |
Definition at line 119 of file Worker.h.
Referenced by edm::Schedule::postForkReacquireResources().
|
privatepure virtual |
Implemented in edm::WorkerT< T >.
Referenced by prefetchAsync().
|
private |
Definition at line 205 of file Worker.cc.
References actReg_, edm::Principal::branchType(), edm::ModuleCallingContext::getStreamContext(), edm::InEvent, mps_monitormerge::items, itemsToGetFrom(), edm::ModuleCallingContext::kPrefetching, moduleCallingContext_, preActionBeforeRunEventAsync(), edm::Principal::prefetchAsync(), edm::ProductResolverIndexAmbiguous, and edm::ModuleCallingContext::setContext().
|
inline |
Definition at line 118 of file Worker.h.
Referenced by edm::Schedule::preForkReleaseResources().
|
inline |
Definition at line 120 of file Worker.h.
|
inline |
Definition at line 122 of file Worker.h.
References Ready.
Referenced by edm::WorkerManager::resetAll().
|
protected |
Definition at line 239 of file Worker.cc.
References moduleCallingContext_, edm::ModuleCallingContext::parent(), edm::ModuleCallingContext::previousModuleOnThread(), edm::ModuleCallingContext::state(), and groupFilesInBlocks::temp.
Referenced by edm::WorkerT< T >::setModule().
|
pure virtual |
Implemented in edm::WorkerT< T >.
|
inline |
Definition at line 116 of file Worker.h.
Referenced by edm::Schedule::respondToCloseInputFile().
|
inline |
Definition at line 115 of file Worker.h.
Referenced by edm::Schedule::respondToOpenInputFile().
|
private |
Definition at line 828 of file Worker.h.
References edm::exceptionContext(), edm::EventSetup::get(), and edm::convertException::wrap().
|
private |
Definition at line 646 of file Worker.h.
References edm::ModuleCallingContext::kInvalid, and edm::ModuleCallingContext::setContext().
Referenced by edm::Worker::RunModuleTask< T >::execute().
|
privatepure virtual |
void edm::Worker::setActivityRegistry | ( | std::shared_ptr< ActivityRegistry > | areg | ) |
void edm::Worker::setEarlyDeleteHelper | ( | EarlyDeleteHelper * | iHelper | ) |
Definition at line 235 of file Worker.cc.
References earlyDeleteHelper_.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
private |
Definition at line 157 of file Worker.cc.
References mps_alisetup::action, actions_, cms::Exception::category(), description(), edm::exception_actions::FailPath, edm::ExceptionToActionTable::find(), edm::ModuleCallingContext::getTopModuleCallingContext(), edm::exception_actions::IgnoreCompletely, edm::PathContext::isEndPath(), edm::ModuleCallingContext::kInvalid, edm::ParentContext::kPlaceInPath, edm::PlaceInPathContext::pathContext(), edm::ModuleCallingContext::placeInPathContext(), edm::printCmsExceptionWarning(), edm::exception_actions::Rethrow, edm::exception_actions::SkipEvent, edm::ModuleCallingContext::type(), and edm::convertException::wrap().
void edm::Worker::skipOnPath | ( | ) |
Definition at line 325 of file Worker.cc.
References cached_exception_, edm::WaitingTaskList::doneWaiting(), numberOfPathsLeftToRun_, and waitingTasks_.
Referenced by edm::WorkerInPath::skipWorker().
|
inline |
Definition at line 171 of file Worker.h.
Referenced by edm::WorkerInPath::checkResultsOfRunWorker().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in edm::WorkerT< T >.
Referenced by edm::Schedule::changeModule().
|
protectedpure virtual |
Implemented in edm::WorkerT< T >.
|
friend |
|
private |
Definition at line 406 of file Worker.h.
Referenced by shouldRethrowException().
|
private |
Definition at line 409 of file Worker.h.
Referenced by beginJob(), beginStream(), endJob(), endStream(), prefetchAsync(), and setActivityRegistry().
|
private |
Definition at line 407 of file Worker.h.
Referenced by skipOnPath().
|
private |
Definition at line 411 of file Worker.h.
Referenced by postDoEvent(), and setEarlyDeleteHelper().
|
private |
Definition at line 404 of file Worker.h.
Referenced by beginStream(), endStream(), prefetchAsync(), and resetModuleDescription().
|
private |
Definition at line 402 of file Worker.h.
Referenced by skipOnPath().
|
private |
Definition at line 400 of file Worker.h.
Referenced by beginJob(), beginStream(), endJob(), and endStream().
|
private |
Definition at line 413 of file Worker.h.
Referenced by skipOnPath().