CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY > Class Template Reference
Inheritance diagram for edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >:
edm::WaitingTask

Public Member Functions

 AcquireTask (Worker *worker, EventPrincipal const &ep, EventSetupImpl const &es, ServiceToken const &token, ParentContext const &parentContext, WaitingTaskWithArenaHolder holder)
 
tbb::task * execute () override
 
- Public Member Functions inherited from edm::WaitingTask
std::exception_ptr const * exceptionPtr () const
 Returns exception thrown by dependent task. More...
 
 WaitingTask ()
 Constructor. More...
 
 ~WaitingTask () override
 

Private Attributes

EventSetupImpl const & m_es
 
WaitingTaskWithArenaHolder m_holder
 
ParentContext const m_parentContext
 
EventPrincipal const & m_principal
 
ServiceToken m_serviceToken
 
Workerm_worker
 

Detailed Description

template<typename DUMMY>
class edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >

Definition at line 519 of file Worker.h.

Constructor & Destructor Documentation

template<typename DUMMY >
edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::AcquireTask ( Worker worker,
EventPrincipal const &  ep,
EventSetupImpl const &  es,
ServiceToken const &  token,
ParentContext const &  parentContext,
WaitingTaskWithArenaHolder  holder 
)
inline

Member Function Documentation

template<typename DUMMY >
tbb::task* edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::execute ( void  )
inlineoverride

Definition at line 534 of file Worker.h.

References eostools::move(), cmsRelvalreport::principal(), and createBeamHaloJobs::queue.

534  {
535  //Need to make the services available early so other services can see them
537 
538  //incase the emit causes an exception, we need a memory location
539  // to hold the exception_ptr
540  std::exception_ptr temp_excptr;
541  auto excptr = exceptionPtr();
542  try {
543  //pre was called in prefetchAsync
545  } catch (...) {
546  temp_excptr = std::current_exception();
547  if (not excptr) {
548  excptr = &temp_excptr;
549  }
550  }
551 
552  if (not excptr) {
553  if (auto queue = m_worker->serializeRunModule()) {
554  auto const& principal = m_principal;
555  auto& es = m_es;
556  queue.push([worker = m_worker,
557  &principal,
558  &es,
559  parentContext = m_parentContext,
560  serviceToken = m_serviceToken,
561  holder = m_holder]() {
562  //Need to make the services available
563  ServiceRegistry::Operate guard(serviceToken);
564 
565  std::exception_ptr* ptr = nullptr;
566  worker->runAcquireAfterAsyncPrefetch(ptr, principal, es, parentContext, holder);
567  });
568  return nullptr;
569  }
570  }
571 
573  return nullptr;
574  }
void runAcquireAfterAsyncPrefetch(std::exception_ptr const *iEPtr, EventPrincipal const &ep, EventSetupImpl const &es, ParentContext const &parentContext, WaitingTaskWithArenaHolder holder)
Definition: Worker.cc:391
def principal(options)
virtual TaskQueueAdaptor serializeRunModule()=0
void emitPostModuleEventPrefetchingSignal()
Definition: Worker.h:374
std::exception_ptr const * exceptionPtr() const
Returns exception thrown by dependent task.
Definition: WaitingTask.h:51
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

Definition at line 579 of file Worker.h.

Definition at line 581 of file Worker.h.

template<typename DUMMY >
ParentContext const edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::m_parentContext
private

Definition at line 580 of file Worker.h.

template<typename DUMMY >
EventPrincipal const& edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::m_principal
private

Definition at line 578 of file Worker.h.

template<typename DUMMY >
ServiceToken edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::m_serviceToken
private

Definition at line 582 of file Worker.h.

template<typename DUMMY >
Worker* edm::Worker::AcquireTask< OccurrenceTraits< EventPrincipal, BranchActionStreamBegin >, DUMMY >::m_worker
private

Definition at line 577 of file Worker.h.