|
|
#include <Worker.h>
|
void | addedToPath () |
|
void | beginJob () |
|
void | beginStream (StreamID id, StreamContext &streamContext) |
|
void | callWhenDoneAsync (WaitingTask *task) |
|
void | clearCounters () |
|
virtual std::vector< ConsumesInfo > | consumesInfo () const =0 |
|
virtual void | convertCurrentProcessAlias (std::string const &processName)=0 |
|
ModuleDescription const * | descPtr () const |
|
ModuleDescription const & | description () const |
|
template<typename T > |
bool | doWork (typename T::MyPrincipal const &, EventSetupImpl const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context) |
|
template<typename T > |
void | doWorkAsync (WaitingTask *task, typename T::MyPrincipal const &, EventSetupImpl const &c, ServiceToken const &token, StreamID stream, ParentContext const &parentContext, typename T::Context const *context) |
|
template<typename T > |
void | doWorkNoPrefetchingAsync (WaitingTask *task, typename T::MyPrincipal const &, EventSetupImpl const &c, ServiceToken const &token, StreamID stream, ParentContext const &parentContext, typename T::Context const *context) |
|
void | endJob () |
|
void | endStream (StreamID id, StreamContext &streamContext) |
|
virtual SerialTaskQueue * | globalLuminosityBlocksQueue ()=0 |
|
virtual SerialTaskQueue * | globalRunsQueue ()=0 |
|
virtual bool | hasAccumulator () 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 |
|
Worker & | operator= (Worker const &)=delete |
|
void | postDoEvent (EventPrincipal const &) |
|
void | prePrefetchSelectionAsync (WaitingTask *task, ServiceToken const &, StreamID stream, EventPrincipal const *) |
|
void | prePrefetchSelectionAsync (WaitingTask *task, ServiceToken const &, StreamID stream, void const *) |
|
void | registerThinnedAssociations (ProductRegistry const ®istry, ThinnedAssociationsHelper &helper) |
|
void | reset () |
|
virtual void | resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, std::tuple< TypeID const *, const char *, edm::ProductResolverIndex >> const &iIndicies)=0 |
|
void | respondToCloseInputFile (FileBlock const &fb) |
|
void | respondToOpenInputFile (FileBlock const &fb) |
|
template<typename T > |
std::exception_ptr | runModuleDirectly (typename T::MyPrincipal const &ep, EventSetupImpl const &es, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context) |
|
void | setActivityRegistry (std::shared_ptr< ActivityRegistry > areg) |
|
void | setEarlyDeleteHelper (EarlyDeleteHelper *iHelper) |
|
void | skipOnPath (EventPrincipal const &iEvent) |
|
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 |
|
virtual void | updateLookup (eventsetup::ESRecordsToProxyIndices const &)=0 |
|
virtual bool | wantsGlobalLuminosityBlocks () const =0 |
|
virtual bool | wantsGlobalRuns () const =0 |
|
virtual bool | wantsStreamLuminosityBlocks () const =0 |
|
virtual bool | wantsStreamRuns () const =0 |
|
| Worker (ModuleDescription const &iMD, ExceptionToActionTable const *iActions) |
|
| Worker (Worker const &)=delete |
|
virtual | ~Worker () |
|
|
ActivityRegistry * | activityRegistry () |
|
virtual void | implBeginJob ()=0 |
|
virtual void | implBeginStream (StreamID)=0 |
|
virtual bool | implDo (EventPrincipal const &, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual void | implDoAcquire (EventPrincipal const &, EventSetupImpl const &c, ModuleCallingContext const *mcc, WaitingTaskWithArenaHolder &holder)=0 |
|
virtual bool | implDoBegin (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoBegin (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoEnd (LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoEnd (RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoPrePrefetchSelection (StreamID id, EventPrincipal const &ep, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoStreamBegin (StreamID id, LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoStreamBegin (StreamID id, RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoStreamEnd (StreamID id, LuminosityBlockPrincipal const &lbp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual bool | implDoStreamEnd (StreamID id, RunPrincipal const &rp, EventSetupImpl const &c, ModuleCallingContext const *mcc)=0 |
|
virtual void | implEndJob ()=0 |
|
virtual void | implEndStream (StreamID)=0 |
|
virtual bool | implNeedToRunSelection () const =0 |
|
virtual void | itemsToGetForSelection (std::vector< ProductResolverIndexAndSkipBit > &) const =0 |
|
void | resetModuleDescription (ModuleDescription const *) |
|
virtual std::string | workerType () const =0 |
|
|
void | emitPostModuleEventPrefetchingSignal () |
|
std::exception_ptr | handleExternalWorkException (std::exception_ptr const *iEPtr, ParentContext const &parentContext) |
|
virtual bool | hasAcquire () const =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 *, ServiceToken const &, ParentContext const &parentContext, Principal const &) |
|
void | runAcquire (EventPrincipal const &ep, EventSetupImpl const &es, ParentContext const &parentContext, WaitingTaskWithArenaHolder &holder) |
|
void | runAcquireAfterAsyncPrefetch (std::exception_ptr const *iEPtr, EventPrincipal const &ep, EventSetupImpl const &es, ParentContext const &parentContext, WaitingTaskWithArenaHolder holder) |
|
template<typename T > |
bool | runModule (typename T::MyPrincipal const &, EventSetupImpl const &c, StreamID stream, ParentContext const &parentContext, typename T::Context const *context) |
|
template<typename T > |
std::exception_ptr | runModuleAfterAsyncPrefetch (std::exception_ptr const *iEPtr, typename T::MyPrincipal const &ep, EventSetupImpl const &es, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context) |
|
virtual TaskQueueAdaptor | 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 |
|
Definition at line 83 of file Worker.h.
◆ State
Enumerator |
---|
Ready | |
Pass | |
Fail | |
Exception | |
Definition at line 85 of file Worker.h.
◆ Types
Enumerator |
---|
kAnalyzer | |
kFilter | |
kProducer | |
kOutputModule | |
Definition at line 86 of file Worker.h.
◆ Worker() [1/2]
◆ ~Worker()
◆ Worker() [2/2]
edm::Worker::Worker |
( |
Worker const & |
| ) |
|
|
delete |
◆ activityRegistry()
◆ addedToPath()
void edm::Worker::addedToPath |
( |
| ) |
|
|
inline |
◆ beginJob()
void edm::Worker::beginJob |
( |
void |
| ) |
|
◆ beginStream()
Definition at line 315 of file Worker.cc.
319 streamContext.setEventID(EventID(0, 0, 0));
323 ParentContext parentContext(&streamContext);
331 std::ostringstream ost;
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().
◆ callWhenDoneAsync()
void edm::Worker::callWhenDoneAsync |
( |
WaitingTask * |
task | ) |
|
|
inline |
◆ clearCounters()
void edm::Worker::clearCounters |
( |
| ) |
|
|
inline |
◆ consumesInfo()
virtual std::vector<ConsumesInfo> edm::Worker::consumesInfo |
( |
| ) |
const |
|
pure virtual |
◆ convertCurrentProcessAlias()
virtual void edm::Worker::convertCurrentProcessAlias |
( |
std::string const & |
processName | ) |
|
|
pure virtual |
◆ descPtr()
◆ description()
◆ doWork()
template<typename T >
bool edm::Worker::doWork |
( |
typename T::MyPrincipal const & |
ep, |
|
|
EventSetupImpl const & |
c, |
|
|
StreamID |
stream, |
|
|
ParentContext const & |
parentContext, |
|
|
typename T::Context const * |
context |
|
) |
| |
Definition at line 974 of file Worker.h.
979 if constexpr (T::isEvent_) {
996 bool expected =
false;
997 if (not
workStarted_.compare_exchange_strong(expected,
true)) {
1000 waitTask->increment_ref_count();
1004 waitTask->wait_for_all();
1022 auto resetContext = [](ModuleCallingContext* iContext) {
1027 if constexpr (T::isEvent_) {
1029 if (workerhelper::CallImpl<T>::needToRunSelection(
this)) {
1031 waitTask->set_ref_count(2);
1033 waitTask->decrement_ref_count();
1034 waitTask->wait_for_all();
1050 waitTask->set_ref_count(2);
1053 waitTask->decrement_ref_count();
1054 waitTask->wait_for_all();
1056 if (waitTask->exceptionPtr() !=
nullptr) {
1057 TransitionIDValue<typename T::MyPrincipal> idValue(
ep);
1059 setException<T::isEvent_>(*waitTask->exceptionPtr());
1063 setPassed<T::isEvent_>();
1071 prefetchSentry.release();
1074 queue.pushAndWait([&]() {
1078 CMS_SA_ALLOW try { rc = runModule<T>(
ep, es, streamID, parentContext, context); }
catch (...) {
1083 CMS_SA_ALLOW try { rc = runModule<T>(
ep, es, streamID, parentContext, context); }
catch (...) {
References actReg_, edm::WaitingTaskList::add(), cms::cuda::assert(), cached_exception_, CMS_SA_ALLOW, edm::WaitingTaskList::doneWaiting(), emitPostModuleEventPrefetchingSignal(), SiStripBadComponentsDQMServiceTemplate_cfg::ep, Exception, Fail, edm::ServiceRegistry::instance(), edm::ModuleCallingContext::kInvalid, edm::ModuleCallingContext::kPrefetching, edm::make_empty_waiting_task(), moduleCallingContext_, Pass, prefetchAsync(), prePrefetchSelectionAsync(), edm::ServiceRegistry::presentToken(), createBeamHaloJobs::queue, Ready, serializeRunModule(), edm::ModuleCallingContext::setContext(), shouldRethrowException(), state(), state_, timesVisited_, waitingTasks_, and workStarted_.
Referenced by edm::UnscheduledProductResolver::resolveProduct_().
◆ doWorkAsync()
Definition at line 831 of file Worker.h.
838 if (not workerhelper::CallImpl<T>::wantsTransition(
this)) {
843 bool expected =
false;
844 bool workStarted =
workStarted_.compare_exchange_strong(expected,
true);
847 if constexpr (T::isEvent_) {
855 if (workerhelper::CallImpl<T>::needToRunSelection(
this)) {
859 new (tbb::task::allocate_root()) RunModuleTask<T>(
this,
ep, es,
token, streamID, parentContext, context);
866 auto p = m_task.load();
868 tbb::task::destroy(*
p);
873 auto t = m_task.load();
874 m_task.store(
nullptr);
878 std::atomic<edm::WaitingTask*> m_task;
881 auto ownRunTask = std::make_shared<DestroyTask>(runTask);
884 [ownRunTask, parentContext, &
ep,
token,
this](std::exception_ptr
const*)
mutable {
891 new (tbb::task::allocate_root()) RunModuleTask<T>(
this,
ep, es,
token, streamID, parentContext, context);
892 if constexpr (T::isEvent_) {
894 WaitingTaskWithArenaHolder runTaskHolder(
895 new (tbb::task::allocate_root()) HandleExternalWorkExceptionTask(
this, moduleTask, parentContext));
896 moduleTask =
new (tbb::task::allocate_root())
897 AcquireTask<T>(
this,
ep, es,
token, parentContext,
std::move(runTaskHolder));
References edm::WaitingTaskList::add(), SiStripBadComponentsDQMServiceTemplate_cfg::ep, hasAcquire(), edm::ModuleCallingContext::kPrefetching, edm::make_waiting_task(), moduleCallingContext_, eostools::move(), AlCaHLTBitMon_ParallelJobs::p, prefetchAsync(), prePrefetchSelectionAsync(), fetchall_from_DQM_v2::release, edm::ModuleCallingContext::setContext(), OrderedSet::t, TrackValidation_cff::task, timesVisited_, unpackBuffers-CaloStage2::token, waitingTasks_, and workStarted_.
Referenced by edm::UnscheduledProductResolver::prefetchAsync_(), and edm::WorkerInPath::runWorkerAsync().
◆ doWorkNoPrefetchingAsync()
Definition at line 934 of file Worker.h.
941 if (not workerhelper::CallImpl<T>::wantsTransition(
this)) {
946 bool expected =
false;
947 auto workStarted =
workStarted_.compare_exchange_strong(expected,
true);
951 auto toDo = [
this, &principal, &es, streamID, parentContext, context, serviceToken]() {
952 std::exception_ptr exceptionPtr;
958 this->runModule<T>(principal, es, streamID, parentContext, context);
960 exceptionPtr = std::current_exception();
968 tbb::task::spawn(*taskToDo);
References edm::WaitingTaskList::add(), CMS_SA_ALLOW, edm::WaitingTaskList::doneWaiting(), edm::make_functor_task(), createBeamHaloJobs::queue, serializeRunModule(), TrackValidation_cff::task, waitingTasks_, and workStarted_.
Referenced by edm::WorkerInPath::runWorkerAsync().
◆ emitPostModuleEventPrefetchingSignal()
void edm::Worker::emitPostModuleEventPrefetchingSignal |
( |
| ) |
|
|
inlineprivate |
◆ endJob()
void edm::Worker::endJob |
( |
void |
| ) |
|
◆ endStream()
Definition at line 339 of file Worker.cc.
343 streamContext.setEventID(EventID(0, 0, 0));
347 ParentContext parentContext(&streamContext);
355 std::ostringstream ost;
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().
◆ exceptionContext()
Definition at line 104 of file Worker.cc.
105 ModuleCallingContext
const* imcc = mcc;
107 std::ostringstream iost;
109 iost <<
"Prefetching for module ";
111 iost <<
"Calling method for module ";
113 iost << imcc->moduleDescription()->moduleName() <<
"/'" << imcc->moduleDescription()->moduleLabel() <<
"'";
116 iost <<
" (probably inside some kind of mixing module)";
117 imcc = imcc->internalContext()->moduleCallingContext();
119 imcc = imcc->moduleCallingContext();
123 std::ostringstream ost;
125 ost <<
"Prefetching for module ";
127 ost <<
"Calling method for module ";
129 ost << imcc->moduleDescription()->moduleName() <<
"/'" << imcc->moduleDescription()->moduleLabel() <<
"'";
134 ost <<
"Running path '";
135 ost << imcc->placeInPathContext()->pathContext()->pathName() <<
"'";
137 auto streamContext = imcc->placeInPathContext()->pathContext()->streamContext();
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().
Referenced by handleExternalWorkException(), runAcquire(), and runModule().
◆ globalLuminosityBlocksQueue()
Implemented in 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::workerhelper::CallImpl< OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalEnd > >::enableGlobalQueue(), and edm::workerhelper::CallImpl< OccurrenceTraits< LuminosityBlockPrincipal, BranchActionGlobalBegin > >::pauseGlobalQueue().
◆ globalRunsQueue()
Implemented in 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::workerhelper::CallImpl< OccurrenceTraits< RunPrincipal, BranchActionGlobalEnd > >::enableGlobalQueue(), and edm::workerhelper::CallImpl< OccurrenceTraits< RunPrincipal, BranchActionGlobalBegin > >::pauseGlobalQueue().
◆ handleExternalWorkException()
std::exception_ptr edm::Worker::handleExternalWorkException |
( |
std::exception_ptr const * |
iEPtr, |
|
|
ParentContext const & |
parentContext |
|
) |
| |
|
private |
◆ hasAccumulator()
virtual bool edm::Worker::hasAccumulator |
( |
| ) |
const |
|
pure virtual |
◆ hasAcquire()
virtual bool edm::Worker::hasAcquire |
( |
| ) |
const |
|
privatepure virtual |
◆ implBeginJob()
virtual void edm::Worker::implBeginJob |
( |
| ) |
|
|
protectedpure virtual |
◆ implBeginStream()
virtual void edm::Worker::implBeginStream |
( |
StreamID |
| ) |
|
|
protectedpure virtual |
◆ implDo()
◆ implDoAcquire()
◆ implDoBegin() [1/2]
◆ implDoBegin() [2/2]
◆ implDoEnd() [1/2]
◆ implDoEnd() [2/2]
◆ implDoPrePrefetchSelection()
◆ implDoStreamBegin() [1/2]
◆ implDoStreamBegin() [2/2]
◆ implDoStreamEnd() [1/2]
◆ implDoStreamEnd() [2/2]
◆ implEndJob()
virtual void edm::Worker::implEndJob |
( |
| ) |
|
|
protectedpure virtual |
◆ implEndStream()
virtual void edm::Worker::implEndStream |
( |
StreamID |
| ) |
|
|
protectedpure virtual |
◆ implNeedToRunSelection()
virtual bool edm::Worker::implNeedToRunSelection |
( |
| ) |
const |
|
protectedpure virtual |
◆ implRegisterThinnedAssociations()
◆ implRespondToCloseInputFile()
virtual void edm::Worker::implRespondToCloseInputFile |
( |
FileBlock const & |
fb | ) |
|
|
privatepure virtual |
◆ implRespondToOpenInputFile()
virtual void edm::Worker::implRespondToOpenInputFile |
( |
FileBlock const & |
fb | ) |
|
|
privatepure virtual |
◆ itemsMayGet()
◆ itemsShouldPutInEvent()
◆ itemsToGet()
◆ itemsToGetForSelection()
◆ itemsToGetFrom()
◆ modulesWhoseProductsAreConsumed()
◆ moduleType()
virtual Types edm::Worker::moduleType |
( |
| ) |
const |
|
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 >, edm::WorkerT< T >, edm::WorkerT< T >, edm::WorkerT< T >, and edm::WorkerT< T >.
Referenced by edm::WorkerManager::addToUnscheduledWorkers(), and edm::StreamSchedule::fillWorkers().
◆ operator=()
◆ postDoEvent()
◆ preActionBeforeRunEventAsync()
◆ prefetchAsync()
Definition at line 199 of file Worker.cc.
204 std::vector<ProductResolverIndexAndSkipBit>
const&
items =
itemsToGetFrom(iPrincipal.branchType());
208 if (iPrincipal.branchType() ==
InEvent) {
213 iTask->increment_ref_count();
216 bool skipCurrentProcess =
item.skipCurrentProcess();
222 if (iPrincipal.branchType() ==
InEvent) {
226 if (0 == iTask->decrement_ref_count()) {
228 tbb::task::spawn(*iTask);
References actReg_, edm::Principal::branchType(), edm::ModuleCallingContext::getStreamContext(), edm::InEvent, B2GTnPMonitor_cfi::item, mps_monitormerge::items, itemsToGetFrom(), edm::ModuleCallingContext::kPrefetching, moduleCallingContext_, preActionBeforeRunEventAsync(), edm::Principal::prefetchAsync(), edm::ProductResolverIndexAmbiguous, edm::ModuleCallingContext::setContext(), and unpackBuffers-CaloStage2::token.
Referenced by doWork(), and doWorkAsync().
◆ prePrefetchSelectionAsync() [1/2]
Definition at line 232 of file Worker.cc.
236 successTask->increment_ref_count();
239 tbb::task::allocate_root(), [
id, successTask, iPrincipal,
this,
token](std::exception_ptr
const*) {
244 timesRun_.fetch_add(1, std::memory_order_relaxed);
248 if (0 == successTask->decrement_ref_count()) {
249 tbb::task::destroy(*successTask);
255 if (0 == successTask->decrement_ref_count()) {
256 tbb::task::spawn(*successTask);
262 std::vector<ProductResolverIndexAndSkipBit>
items;
267 bool skipCurrentProcess =
item.skipCurrentProcess();
272 choiceHolder.doneWaiting(std::exception_ptr{});
References CMS_SA_ALLOW, edm::WaitingTaskList::doneWaiting(), implDoPrePrefetchSelection(), B2GTnPMonitor_cfi::item, mps_monitormerge::items, itemsToGetForSelection(), edm::make_waiting_task(), moduleCallingContext_, edm::Principal::prefetchAsync(), edm::ProductResolverIndexAmbiguous, timesRun_, unpackBuffers-CaloStage2::token, and waitingTasks_.
Referenced by doWork(), and doWorkAsync().
◆ prePrefetchSelectionAsync() [2/2]
◆ registerThinnedAssociations()
◆ reset()
void edm::Worker::reset |
( |
void |
| ) |
|
|
inline |
◆ resetModuleDescription()
◆ resolvePutIndicies()
◆ respondToCloseInputFile()
void edm::Worker::respondToCloseInputFile |
( |
FileBlock const & |
fb | ) |
|
|
inline |
◆ respondToOpenInputFile()
void edm::Worker::respondToOpenInputFile |
( |
FileBlock const & |
fb | ) |
|
|
inline |
◆ runAcquire()
◆ runAcquireAfterAsyncPrefetch()
◆ runModule()
template<typename T >
bool edm::Worker::runModule |
( |
typename T::MyPrincipal const & |
ep, |
|
|
EventSetupImpl const & |
c, |
|
|
StreamID |
stream, |
|
|
ParentContext const & |
parentContext, |
|
|
typename T::Context const * |
context |
|
) |
| |
|
private |
◆ runModuleAfterAsyncPrefetch()
template<typename T >
std::exception_ptr edm::Worker::runModuleAfterAsyncPrefetch |
( |
std::exception_ptr const * |
iEPtr, |
|
|
typename T::MyPrincipal const & |
ep, |
|
|
EventSetupImpl const & |
es, |
|
|
StreamID |
streamID, |
|
|
ParentContext const & |
parentContext, |
|
|
typename T::Context const * |
context |
|
) |
| |
|
private |
Definition at line 906 of file Worker.h.
912 std::exception_ptr exceptionPtr;
915 TransitionIDValue<typename T::MyPrincipal> idValue(
ep);
917 exceptionPtr = *iEPtr;
918 setException<T::isEvent_>(exceptionPtr);
920 setPassed<T::isEvent_>();
925 CMS_SA_ALLOW try { runModule<T>(
ep, es, streamID, parentContext, context); }
catch (...) {
926 exceptionPtr = std::current_exception();
References cms::cuda::assert(), CMS_SA_ALLOW, edm::WaitingTaskList::doneWaiting(), SiStripBadComponentsDQMServiceTemplate_cfg::ep, edm::ModuleCallingContext::kInvalid, moduleCallingContext_, edm::ModuleCallingContext::setContext(), shouldRethrowException(), and waitingTasks_.
Referenced by edm::Worker::RunModuleTask< T >::execute().
◆ runModuleDirectly()
template<typename T >
std::exception_ptr edm::Worker::runModuleDirectly |
( |
typename T::MyPrincipal const & |
ep, |
|
|
EventSetupImpl const & |
es, |
|
|
StreamID |
streamID, |
|
|
ParentContext const & |
parentContext, |
|
|
typename T::Context const * |
context |
|
) |
| |
◆ serializeRunModule()
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 >, and edm::WorkerT< T >.
Referenced by doWork(), doWorkNoPrefetchingAsync(), and edm::Worker::RunModuleTask< T >::execute().
◆ setActivityRegistry()
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 102 of file Worker.cc.
References actReg_.
◆ setEarlyDeleteHelper()
◆ setException()
template<bool IS_EVENT>
std::exception_ptr edm::Worker::setException |
( |
std::exception_ptr |
iException | ) |
|
|
inlineprivate |
◆ setFailed()
template<bool IS_EVENT>
bool edm::Worker::setFailed |
( |
| ) |
|
|
inlineprivate |
◆ setPassed()
template<bool IS_EVENT>
bool edm::Worker::setPassed |
( |
| ) |
|
|
inlineprivate |
◆ shouldRethrowException()
Definition at line 156 of file Worker.cc.
183 ModuleCallingContext
const* top_mcc = tempContext.getTopModuleCallingContext();
185 top_mcc->placeInPathContext()->pathContext()->isEndPath()) {
References writedatasetfile::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().
Referenced by doWork(), runAcquire(), runAcquireAfterAsyncPrefetch(), runModule(), and runModuleAfterAsyncPrefetch().
◆ skipOnPath()
◆ state()
State edm::Worker::state |
( |
| ) |
const |
|
inline |
◆ timesExcept()
int edm::Worker::timesExcept |
( |
| ) |
const |
|
inline |
◆ timesFailed()
int edm::Worker::timesFailed |
( |
| ) |
const |
|
inline |
◆ timesPass()
int edm::Worker::timesPass |
( |
| ) |
const |
|
inline |
◆ timesPassed()
int edm::Worker::timesPassed |
( |
| ) |
const |
|
inline |
◆ timesRun()
int edm::Worker::timesRun |
( |
| ) |
const |
|
inline |
◆ timesVisited()
int edm::Worker::timesVisited |
( |
| ) |
const |
|
inline |
◆ updateLookup() [1/2]
◆ updateLookup() [2/2]
◆ wantsGlobalLuminosityBlocks()
virtual bool edm::Worker::wantsGlobalLuminosityBlocks |
( |
| ) |
const |
|
pure virtual |
◆ wantsGlobalRuns()
virtual bool edm::Worker::wantsGlobalRuns |
( |
| ) |
const |
|
pure virtual |
◆ wantsStreamLuminosityBlocks()
virtual bool edm::Worker::wantsStreamLuminosityBlocks |
( |
| ) |
const |
|
pure virtual |
◆ wantsStreamRuns()
virtual bool edm::Worker::wantsStreamRuns |
( |
| ) |
const |
|
pure virtual |
◆ workerType()
virtual std::string edm::Worker::workerType |
( |
| ) |
const |
|
protectedpure virtual |
◆ workerhelper::CallImpl
◆ actions_
◆ actReg_
◆ cached_exception_
std::exception_ptr edm::Worker::cached_exception_ |
|
private |
◆ earlyDeleteHelper_
◆ moduleCallingContext_
Definition at line 613 of file Worker.h.
Referenced by beginStream(), descPtr(), description(), doWork(), doWorkAsync(), emitPostModuleEventPrefetchingSignal(), endStream(), handleExternalWorkException(), prefetchAsync(), prePrefetchSelectionAsync(), resetModuleDescription(), runAcquire(), runAcquireAfterAsyncPrefetch(), runModule(), and runModuleAfterAsyncPrefetch().
◆ numberOfPathsLeftToRun_
std::atomic<int> edm::Worker::numberOfPathsLeftToRun_ |
|
private |
◆ numberOfPathsOn_
int edm::Worker::numberOfPathsOn_ |
|
private |
◆ ranAcquireWithoutException_
bool edm::Worker::ranAcquireWithoutException_ |
|
private |
◆ state_
std::atomic<State> edm::Worker::state_ |
|
private |
◆ timesExcept_
std::atomic<int> edm::Worker::timesExcept_ |
|
private |
◆ timesFailed_
std::atomic<int> edm::Worker::timesFailed_ |
|
private |
◆ timesPassed_
std::atomic<int> edm::Worker::timesPassed_ |
|
private |
◆ timesRun_
std::atomic<int> edm::Worker::timesRun_ |
|
private |
◆ timesVisited_
std::atomic<int> edm::Worker::timesVisited_ |
|
private |
◆ waitingTasks_
◆ workStarted_
std::atomic<bool> edm::Worker::workStarted_ |
|
private |
std::string const & moduleLabel() const
virtual void itemsToGetForSelection(std::vector< ProductResolverIndexAndSkipBit > &) const =0
void exceptionContext(std::ostream &, GlobalContext const &)
unsigned int ProductResolverIndex
void prefetchAsync(WaitingTask *, ServiceToken const &, ParentContext const &parentContext, Principal const &)
void addContext(std::string const &context)
std::shared_ptr< ActivityRegistry > actReg_
virtual void implEndJob()=0
void runAcquire(EventPrincipal const &ep, EventSetupImpl const &es, ParentContext const &parentContext, WaitingTaskWithArenaHolder &holder)
std::atomic< int > timesPassed_
virtual void preActionBeforeRunEventAsync(WaitingTask *iTask, ModuleCallingContext const &moduleCallingContext, Principal const &iPrincipal) const =0
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e)
std::atomic< int > timesVisited_
void add(WaitingTask *)
Adds task to the waiting list.
std::string const & moduleName() const
ExceptionToActionTable const * actions_
virtual void implBeginJob()=0
FunctorTask< F > * make_functor_task(ALLOC &&iAlloc, F f)
std::atomic< int > numberOfPathsLeftToRun_
ModuleDescription const * moduleDescription() const
virtual void implEndStream(StreamID)=0
std::atomic< bool > workStarted_
ParentContext const & parent() const
void reset()
Resets access to the resource so that added tasks will wait.
virtual void implRespondToCloseInputFile(FileBlock const &fb)=0
bool shouldRethrowException(std::exception_ptr iPtr, ParentContext const &parentContext, bool isEvent, TransitionIDValueBase const &iID) const
virtual bool implDoPrePrefetchSelection(StreamID id, EventPrincipal const &ep, ModuleCallingContext const *mcc)=0
edm::propagate_const< EarlyDeleteHelper * > earlyDeleteHelper_
std::atomic< int > timesRun_
auto wrap(F iFunc) -> decltype(iFunc())
std::atomic< State > state_
void doneWaiting(std::exception_ptr iPtr)
Signals that the resource is now available and tasks should be spawned.
FunctorWaitingTask< F > * make_waiting_task(ALLOC &&iAlloc, F f)
std::atomic< int > timesExcept_
virtual TaskQueueAdaptor serializeRunModule()=0
edm::WaitingTaskList waitingTasks_
static LuminosityBlockIndex invalidLuminosityBlockIndex()
ModuleCallingContext const * previousModuleOnThread() const
virtual void implRegisterThinnedAssociations(ProductRegistry const &, ThinnedAssociationsHelper &)=0
ServiceToken presentToken() const
StreamContext const * getStreamContext() const
void setState(State state)
void prePrefetchSelectionAsync(WaitingTask *task, ServiceToken const &, StreamID stream, EventPrincipal const *)
void setContext(State state, ParentContext const &parent, ModuleCallingContext const *previousOnThread)
bool ranAcquireWithoutException_
static void exceptionContext(cms::Exception &ex, ModuleCallingContext const *mcc)
virtual void implRespondToOpenInputFile(FileBlock const &fb)=0
ModuleCallingContext moduleCallingContext_
std::atomic< int > timesFailed_
ModuleDescription const & description() const
std::exception_ptr cached_exception_
static ServiceRegistry & instance()
static RunIndex invalidRunIndex()
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
virtual std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType) const =0
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
virtual bool hasAcquire() const =0
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
virtual void implDoAcquire(EventPrincipal const &, EventSetupImpl const &c, ModuleCallingContext const *mcc, WaitingTaskWithArenaHolder &holder)=0
exception_actions::ActionCodes find(const std::string &category) const
virtual void implBeginStream(StreamID)=0
void emitPostModuleEventPrefetchingSignal()
std::string const & category() const