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, EventSetup 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, EventSetup const &es, ServiceToken const &token, StreamID streamID, typename T::Context const *topContext, U const *context) const
 
void setEventSetup (EventSetup 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

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

Definition at line 39 of file UnscheduledCallProducer.h.

Definition at line 38 of file UnscheduledCallProducer.h.

Constructor & Destructor Documentation

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

Definition at line 41 of file UnscheduledCallProducer.h.

References aux_, edm::signalslot::Signal< T >::connect(), edm::UnscheduledAuxiliary::postModuleDelayedGetSignal_, edm::ActivityRegistry::postModuleEventDelayedGetSignal_, edm::UnscheduledAuxiliary::preModuleDelayedGetSignal_, and edm::ActivityRegistry::preModuleEventDelayedGetSignal_.

42  aux_.preModuleDelayedGetSignal_.connect(std::cref(iReg.preModuleEventDelayedGetSignal_));
43  aux_.postModuleDelayedGetSignal_.connect(std::cref(iReg.postModuleEventDelayedGetSignal_));
44  }
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
void connect(U iFunc)
Definition: Signal.h:64

Member Function Documentation

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.

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

97  {
98  std::ostringstream ost;
99  ost << "Processing " << T::transitionName()<<" "<< id;
100  ex.addContext(ost.str());
101  }
void addContext(std::string const &context)
Definition: Exception.cc:227
void edm::UnscheduledCallProducer::addWorker ( Worker aWorker)
inline

Definition at line 45 of file UnscheduledCallProducer.h.

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

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

45  {
46  assert(nullptr != aWorker);
47  unscheduledWorkers_.push_back(aWorker);
48  if (aWorker->hasAccumulator()) {
49  accumulatorWorkers_.push_back(aWorker);
50  }
51  }
UnscheduledAuxiliary const& edm::UnscheduledCallProducer::auxiliary ( ) const
inline

Definition at line 57 of file UnscheduledCallProducer.h.

References aux_.

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

57 { return aux_; }
const_iterator edm::UnscheduledCallProducer::begin ( void  ) const
inline

Definition at line 59 of file UnscheduledCallProducer.h.

References unscheduledWorkers_.

59 { return unscheduledWorkers_.begin(); }
const_iterator edm::UnscheduledCallProducer::end ( void  ) const
inline

Definition at line 60 of file UnscheduledCallProducer.h.

References unscheduledWorkers_.

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

60 { return unscheduledWorkers_.end(); }
template<typename T >
void edm::UnscheduledCallProducer::runAccumulatorsAsync ( WaitingTask task,
typename T::MyPrincipal const &  ep,
EventSetup const &  es,
ServiceToken const &  token,
StreamID  streamID,
ParentContext const &  parentContext,
typename T::Context const *  context 
)
inline

Definition at line 83 of file UnscheduledCallProducer.h.

References accumulatorWorkers_.

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

89  {
90  for (auto worker : accumulatorWorkers_) {
91  worker->doWorkAsync<T>(task, ep, es, token, streamID, parentContext, context);
92  }
93  }
long double T
template<typename T , typename U >
void edm::UnscheduledCallProducer::runNowAsync ( WaitingTask task,
typename T::MyPrincipal &  p,
EventSetup const &  es,
ServiceToken const &  token,
StreamID  streamID,
typename T::Context const *  topContext,
U const *  context 
) const
inline

Definition at line 63 of file UnscheduledCallProducer.h.

References AlCaHLTBitMon_ParallelJobs::p, and unscheduledWorkers_.

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

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  }
long double T
void edm::UnscheduledCallProducer::setEventSetup ( EventSetup const &  iSetup)
inline

Definition at line 53 of file UnscheduledCallProducer.h.

References aux_, and edm::UnscheduledAuxiliary::setEventSetup().

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

53  {
54  aux_.setEventSetup(&iSetup);
55  }
void setEventSetup(EventSetup const *iSetup)

Member Data Documentation

worker_container edm::UnscheduledCallProducer::accumulatorWorkers_
private

Definition at line 103 of file UnscheduledCallProducer.h.

Referenced by addWorker(), and runAccumulatorsAsync().

UnscheduledAuxiliary edm::UnscheduledCallProducer::aux_
private

Definition at line 104 of file UnscheduledCallProducer.h.

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

worker_container edm::UnscheduledCallProducer::unscheduledWorkers_
private

Definition at line 102 of file UnscheduledCallProducer.h.

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