CMS 3D CMS Logo

UnscheduledCallProducer.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_UnscheduledCallProducer_h
2 #define FWCore_Framework_UnscheduledCallProducer_h
3 
4 // -*- C++ -*-
5 //
6 // Package: FWCore/Framework
7 // Class : UnscheduledCallProducer
8 //
25 
26 #include <algorithm>
27 #include <cassert>
28 #include <functional>
29 #include <vector>
30 
31 namespace edm {
32 
33  class EventTransitionInfo;
34 
36  public:
37  using worker_container = std::vector<Worker*>;
38  using const_iterator = worker_container::const_iterator;
39 
43  }
44  void addWorker(Worker* aWorker) {
45  assert(nullptr != aWorker);
46  unscheduledWorkers_.push_back(aWorker);
47  if (aWorker->hasAccumulator()) {
48  accumulatorWorkers_.push_back(aWorker);
49  }
50  }
51 
52  void removeWorker(Worker const* worker) {
54  unscheduledWorkers_.end());
56  accumulatorWorkers_.end());
57  }
58 
60 
61  UnscheduledAuxiliary const& auxiliary() const { return aux_; }
62 
63  const_iterator begin() const { return unscheduledWorkers_.begin(); }
64  const_iterator end() const { return unscheduledWorkers_.end(); }
65  worker_container const& workers() const { return unscheduledWorkers_; }
66 
67  template <typename T>
69  typename T::TransitionInfoType const& info,
70  ServiceToken const& token,
71  StreamID streamID,
72  ParentContext const& parentContext,
73  typename T::Context const* context) noexcept {
74  for (auto worker : accumulatorWorkers_) {
75  worker->doWorkAsync<T>(task, info, token, streamID, parentContext, context);
76  }
77  }
78 
79  private:
83  };
84 
85 } // namespace edm
86 
87 #endif
PostModuleEventDelayedGet postModuleEventDelayedGetSignal_
PreModuleEventDelayedGet preModuleEventDelayedGetSignal_
static const TGPicture * info(bool iBackgroundIsBlack)
void removeWorker(Worker const *worker)
worker_container const & workers() const
void setEventTransitionInfo(EventTransitionInfo const &info)
UnscheduledCallProducer(ActivityRegistry &iReg)
std::vector< Worker * > worker_container
assert(be >=bs)
void setEventTransitionInfo(EventTransitionInfo const &info)
virtual bool hasAccumulator() const noexcept=0
UnscheduledAuxiliary const & auxiliary() const
void runAccumulatorsAsync(WaitingTaskHolder task, typename T::TransitionInfoType const &info, ServiceToken const &token, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context) noexcept
def remove(d, key, TELL=False)
Definition: MatrixUtil.py:233
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> preModuleDelayedGetSignal_
HLT enums.
worker_container::const_iterator const_iterator
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> postModuleDelayedGetSignal_
long double T
void connect(U iFunc)
Definition: Signal.h:74