CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::UnscheduledCallProducer Class Reference

#include <UnscheduledCallProducer.h>

Public Types

using const_iterator = worker_container::const_iterator
 
using worker_container = std::vector< Worker * >
 

Public Member Functions

void addWorker (Worker *aWorker)
 
UnscheduledAuxiliary const & auxiliary () const
 
const_iterator begin () const
 
const_iterator end () const
 
template<typename T >
void runAccumulatorsAsync (WaitingTask *task, typename T::MyPrincipal const &ep, EventSetupImpl const &es, ServiceToken const &token, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context)
 
template<typename T , typename U >
void runNowAsync (WaitingTask *task, typename T::MyPrincipal &p, EventSetupImpl const &es, ServiceToken const &token, StreamID streamID, typename T::Context const *topContext, U const *context) const
 
void setEventSetup (EventSetupImpl const &iSetup)
 
 UnscheduledCallProducer (ActivityRegistry &iReg)
 

Private Member Functions

template<typename T , typename ID >
void addContextToException (cms::Exception &ex, Worker const *worker, ID const &id) const
 

Private Attributes

worker_container accumulatorWorkers_
 
UnscheduledAuxiliary aux_
 
worker_container unscheduledWorkers_
 

Detailed Description

Definition at line 35 of file UnscheduledCallProducer.h.

Member Typedef Documentation

◆ const_iterator

using edm::UnscheduledCallProducer::const_iterator = worker_container::const_iterator

Definition at line 38 of file UnscheduledCallProducer.h.

◆ worker_container

Definition at line 37 of file UnscheduledCallProducer.h.

Constructor & Destructor Documentation

◆ UnscheduledCallProducer()

edm::UnscheduledCallProducer::UnscheduledCallProducer ( ActivityRegistry iReg)
inline

Member Function Documentation

◆ addContextToException()

template<typename T , typename ID >
void edm::UnscheduledCallProducer::addContextToException ( cms::Exception ex,
Worker const *  worker,
ID const &  id 
) const
inlineprivate

Definition at line 97 of file UnscheduledCallProducer.h.

97  {
98  std::ostringstream ost;
99  ost << "Processing " << T::transitionName() << " " << id;
100  ex.addContext(ost.str());
101  }

References cms::Exception::addContext(), and triggerObjects_cff::id.

◆ addWorker()

void edm::UnscheduledCallProducer::addWorker ( Worker aWorker)
inline

Definition at line 44 of file UnscheduledCallProducer.h.

44  {
45  assert(nullptr != aWorker);
46  unscheduledWorkers_.push_back(aWorker);
47  if (aWorker->hasAccumulator()) {
48  accumulatorWorkers_.push_back(aWorker);
49  }
50  }

References accumulatorWorkers_, cms::cuda::assert(), edm::Worker::hasAccumulator(), and unscheduledWorkers_.

Referenced by edm::WorkerManager::addToUnscheduledWorkers().

◆ auxiliary()

UnscheduledAuxiliary const& edm::UnscheduledCallProducer::auxiliary ( ) const
inline

Definition at line 54 of file UnscheduledCallProducer.h.

54 { return aux_; }

References aux_.

Referenced by edm::WorkerManager::setupOnDemandSystem().

◆ begin()

const_iterator edm::UnscheduledCallProducer::begin ( void  ) const
inline

Definition at line 56 of file UnscheduledCallProducer.h.

56 { return unscheduledWorkers_.begin(); }

References unscheduledWorkers_.

◆ end()

const_iterator edm::UnscheduledCallProducer::end ( void  ) const
inline

Definition at line 57 of file UnscheduledCallProducer.h.

57 { return unscheduledWorkers_.end(); }

References unscheduledWorkers_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

◆ runAccumulatorsAsync()

template<typename T >
void edm::UnscheduledCallProducer::runAccumulatorsAsync ( WaitingTask task,
typename T::MyPrincipal const &  ep,
EventSetupImpl const &  es,
ServiceToken const &  token,
StreamID  streamID,
ParentContext const &  parentContext,
typename T::Context const *  context 
)
inline

Definition at line 83 of file UnscheduledCallProducer.h.

89  {
90  for (auto worker : accumulatorWorkers_) {
91  worker->doWorkAsync<T>(task, ep, es, token, streamID, parentContext, context);
92  }
93  }

References accumulatorWorkers_, SiStripBadComponentsDQMServiceTemplate_cfg::ep, TrackValidation_cff::task, and unpackBuffers-CaloStage2::token.

Referenced by edm::WorkerManager::processAccumulatorsAsync().

◆ runNowAsync()

template<typename T , typename U >
void edm::UnscheduledCallProducer::runNowAsync ( WaitingTask task,
typename T::MyPrincipal &  p,
EventSetupImpl const &  es,
ServiceToken const &  token,
StreamID  streamID,
typename T::Context const *  topContext,
U const *  context 
) const
inline

Definition at line 60 of file UnscheduledCallProducer.h.

66  {
67  //do nothing for event since we will run when requested
68  if (!T::isEvent_) {
69  for (auto worker : unscheduledWorkers_) {
70  ParentContext parentContext(context);
71 
72  // We do not need to run prefetching here because this only handles
73  // stream transitions for runs and lumis. There are no products put
74  // into the runs or lumis in stream transitions, so there can be
75  // no data dependencies which require prefetching. Prefetching is
76  // needed for global transitions, but they are run elsewhere.
77  worker->doWorkNoPrefetchingAsync<T>(task, p, es, token, streamID, parentContext, topContext);
78  }
79  }
80  }

References AlCaHLTBitMon_ParallelJobs::p, TrackValidation_cff::task, unpackBuffers-CaloStage2::token, and unscheduledWorkers_.

Referenced by edm::WorkerManager::processOneOccurrenceAsync().

◆ setEventSetup()

void edm::UnscheduledCallProducer::setEventSetup ( EventSetupImpl const &  iSetup)
inline

Member Data Documentation

◆ accumulatorWorkers_

worker_container edm::UnscheduledCallProducer::accumulatorWorkers_
private

Definition at line 103 of file UnscheduledCallProducer.h.

Referenced by addWorker(), and runAccumulatorsAsync().

◆ aux_

UnscheduledAuxiliary edm::UnscheduledCallProducer::aux_
private

Definition at line 104 of file UnscheduledCallProducer.h.

Referenced by auxiliary(), setEventSetup(), and UnscheduledCallProducer().

◆ unscheduledWorkers_

worker_container edm::UnscheduledCallProducer::unscheduledWorkers_
private

Definition at line 102 of file UnscheduledCallProducer.h.

Referenced by addWorker(), begin(), end(), and runNowAsync().

edm::UnscheduledAuxiliary::setEventSetup
void setEventSetup(EventSetupImpl const *iSetup)
Definition: UnscheduledAuxiliary.h:43
cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
cms::cuda::assert
assert(be >=bs)
edm::UnscheduledCallProducer::aux_
UnscheduledAuxiliary aux_
Definition: UnscheduledCallProducer.h:104
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::UnscheduledAuxiliary::preModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:45
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
T
long double T
Definition: Basic3DVectorLD.h:48
edm::UnscheduledAuxiliary::postModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:46
edm::signalslot::Signal::connect
void connect(U iFunc)
Definition: Signal.h:62
edm::UnscheduledCallProducer::accumulatorWorkers_
worker_container accumulatorWorkers_
Definition: UnscheduledCallProducer.h:103
SiStripBadComponentsDQMServiceTemplate_cfg.ep
ep
Definition: SiStripBadComponentsDQMServiceTemplate_cfg.py:86
edm::UnscheduledCallProducer::unscheduledWorkers_
worker_container unscheduledWorkers_
Definition: UnscheduledCallProducer.h:102
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316