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
 
void removeWorker (Worker const *worker)
 
template<typename T >
void runAccumulatorsAsync (WaitingTaskHolder task, typename T::TransitionInfoType const &info, ServiceToken const &token, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context)
 
template<typename T , typename U >
void runNowAsync (WaitingTaskHolder task, typename T::TransitionInfoType const &info, ServiceToken const &token, StreamID streamID, typename T::Context const *topContext, U const *context) const
 
void setEventTransitionInfo (EventTransitionInfo const &info)
 
 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 38 of file UnscheduledCallProducer.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 41 of file UnscheduledCallProducer.h.

◆ worker_container

Definition at line 40 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 105 of file UnscheduledCallProducer.h.

105  {
106  std::ostringstream ost;
107  ost << "Processing " << T::transitionName() << " " << id;
108  ex.addContext(ost.str());
109  }

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

◆ addWorker()

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

Definition at line 47 of file UnscheduledCallProducer.h.

47  {
48  assert(nullptr != aWorker);
49  unscheduledWorkers_.push_back(aWorker);
50  if (aWorker->hasAccumulator()) {
51  accumulatorWorkers_.push_back(aWorker);
52  }
53  }

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 64 of file UnscheduledCallProducer.h.

64 { return aux_; }

References aux_.

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

◆ begin()

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

Definition at line 66 of file UnscheduledCallProducer.h.

66 { return unscheduledWorkers_.begin(); }

References unscheduledWorkers_.

◆ end()

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

Definition at line 67 of file UnscheduledCallProducer.h.

67 { return unscheduledWorkers_.end(); }

References unscheduledWorkers_.

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

◆ removeWorker()

void edm::UnscheduledCallProducer::removeWorker ( Worker const *  worker)
inline

◆ runAccumulatorsAsync()

template<typename T >
void edm::UnscheduledCallProducer::runAccumulatorsAsync ( WaitingTaskHolder  task,
typename T::TransitionInfoType const &  info,
ServiceToken const &  token,
StreamID  streamID,
ParentContext const &  parentContext,
typename T::Context const *  context 
)
inline

Definition at line 92 of file UnscheduledCallProducer.h.

97  {
98  for (auto worker : accumulatorWorkers_) {
99  worker->doWorkAsync<T>(task, info, token, streamID, parentContext, context);
100  }
101  }

References accumulatorWorkers_, visDQMUpload::context, info(), TrackValidation_cff::task, and unpackBuffers-CaloStage2::token.

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

◆ runNowAsync()

template<typename T , typename U >
void edm::UnscheduledCallProducer::runNowAsync ( WaitingTaskHolder  task,
typename T::TransitionInfoType const &  info,
ServiceToken const &  token,
StreamID  streamID,
typename T::Context const *  topContext,
U const *  context 
) const
inline

Definition at line 70 of file UnscheduledCallProducer.h.

75  {
76  //do nothing for event since we will run when requested
77  if (!T::isEvent_) {
78  for (auto worker : unscheduledWorkers_) {
79  ParentContext parentContext(context);
80 
81  // We do not need to run prefetching here because this only handles
82  // stream transitions for runs and lumis. There are no products put
83  // into the runs or lumis in stream transitions, so there can be
84  // no data dependencies which require prefetching. Prefetching is
85  // needed for global transitions, but they are run elsewhere.
86  worker->doWorkNoPrefetchingAsync<T>(task, info, token, streamID, parentContext, topContext);
87  }
88  }
89  }

References visDQMUpload::context, info(), TrackValidation_cff::task, unpackBuffers-CaloStage2::token, and unscheduledWorkers_.

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

◆ setEventTransitionInfo()

void edm::UnscheduledCallProducer::setEventTransitionInfo ( EventTransitionInfo const &  info)
inline

Member Data Documentation

◆ accumulatorWorkers_

worker_container edm::UnscheduledCallProducer::accumulatorWorkers_
private

Definition at line 111 of file UnscheduledCallProducer.h.

Referenced by addWorker(), removeWorker(), and runAccumulatorsAsync().

◆ aux_

UnscheduledAuxiliary edm::UnscheduledCallProducer::aux_
private

◆ unscheduledWorkers_

worker_container edm::UnscheduledCallProducer::unscheduledWorkers_
private

Definition at line 110 of file UnscheduledCallProducer.h.

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

cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
cms::cuda::assert
assert(be >=bs)
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
visDQMUpload.context
context
Definition: visDQMUpload.py:37
edm::UnscheduledCallProducer::aux_
UnscheduledAuxiliary aux_
Definition: UnscheduledCallProducer.h:112
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:253
edm::UnscheduledAuxiliary::preModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:43
edm::UnscheduledAuxiliary::setEventTransitionInfo
void setEventTransitionInfo(EventTransitionInfo const &info)
Definition: UnscheduledAuxiliary.h:41
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
T
long double T
Definition: Basic3DVectorLD.h:48
MatrixUtil.remove
def remove(d, key, TELL=False)
Definition: MatrixUtil.py:219
edm::UnscheduledAuxiliary::postModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
Definition: UnscheduledAuxiliary.h:44
edm::signalslot::Signal::connect
void connect(U iFunc)
Definition: Signal.h:64
edm::UnscheduledCallProducer::accumulatorWorkers_
worker_container accumulatorWorkers_
Definition: UnscheduledCallProducer.h:111
edm::UnscheduledCallProducer::unscheduledWorkers_
worker_container unscheduledWorkers_
Definition: UnscheduledCallProducer.h:110
unpackBuffers-CaloStage2.token
token
Definition: unpackBuffers-CaloStage2.py:316