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

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

Definition at line 38 of file UnscheduledCallProducer.h.

Definition at line 37 of file UnscheduledCallProducer.h.

Constructor & Destructor Documentation

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

Definition at line 40 of file UnscheduledCallProducer.h.

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

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

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:165
void edm::UnscheduledCallProducer::addWorker ( Worker aWorker)
inline

Definition at line 44 of file UnscheduledCallProducer.h.

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

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

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

Definition at line 54 of file UnscheduledCallProducer.h.

References aux_.

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

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

Definition at line 56 of file UnscheduledCallProducer.h.

References unscheduledWorkers_.

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

Definition at line 57 of file UnscheduledCallProducer.h.

References unscheduledWorkers_.

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

57 { return unscheduledWorkers_.end(); }
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
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.

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

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 ( EventSetupImpl const &  iSetup)
inline

Definition at line 52 of file UnscheduledCallProducer.h.

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

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

52 { aux_.setEventSetup(&iSetup); }
void setEventSetup(EventSetupImpl 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().