|
|
Go to the documentation of this file. 1 #ifndef FWCore_Framework_WorkerManager_h
2 #define FWCore_Framework_WorkerManager_h
25 class EventTransitionInfo;
26 class ExceptionCollector;
30 class PreallocationConfiguration;
31 namespace eventsetup {
42 std::shared_ptr<ActivityRegistry> actReg,
47 std::shared_ptr<ProcessConfiguration> processConfiguration,
49 std::set<std::string>& unscheduledLabels,
50 std::vector<std::string>& shouldBeUsedLabels);
52 template <
typename T,
typename U>
55 typename T::Context
const* topContext,
57 bool cleaningUpAfterException =
false);
58 template <
typename T,
typename U>
60 typename T::TransitionInfoType&,
63 typename T::Context
const* topContext,
68 typename T::TransitionInfoType
const&,
72 typename T::Context
const*);
93 std::shared_ptr<ProcessConfiguration const> processConfiguration,
106 template <
typename T,
typename U>
109 typename T::Context
const* topContext,
111 bool cleaningUpAfterException) {
115 waitTask->increment_ref_count();
116 processOneOccurrenceAsync<T, U>(
118 waitTask->wait_for_all();
119 if (waitTask->exceptionPtr() !=
nullptr) {
125 "Calling function WorkerManager::processOneOccurrence", ex, cleaningUpAfterException);
134 template <
typename T,
typename U>
136 typename T::TransitionInfoType&
info,
139 typename T::Context
const* topContext,
145 template <
typename T>
147 typename T::TransitionInfoType
const&
info,
151 typename T::Context
const* context) {
void addToAllWorkers(Worker *w)
std::vector< Worker * > AllWorkers
void runNowAsync(WaitingTask *task, typename T::TransitionInfoType const &info, ServiceToken const &token, StreamID streamID, typename T::Context const *topContext, U const *context) const
void addToUnscheduledWorkers(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration > processConfiguration, std::string label, std::set< std::string > &unscheduledLabels, std::vector< std::string > &shouldBeUsedLabels)
ExceptionToActionTable const & actionTable() const
void processOneOccurrenceAsync(WaitingTask *, typename T::TransitionInfoType &, ServiceToken const &, StreamID, typename T::Context const *topContext, U const *context)
auto wrap(F iFunc) -> decltype(iFunc())
UnscheduledCallProducer unscheduled_
AllWorkers const & allWorkers() const
ExceptionToActionTable const * actionTable_
void processOneOccurrence(typename T::TransitionInfoType &, StreamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
WorkerRegistry workerReg_
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
void beginStream(StreamID iID, StreamContext &streamContext)
std::list< std::string > const & context() const
void setupOnDemandSystem(EventTransitionInfo const &)
ServiceToken presentToken() const
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
void processAccumulatorsAsync(WaitingTask *, typename T::TransitionInfoType const &, ServiceToken const &, StreamID, ParentContext const &, typename T::Context const *)
static ServiceRegistry & instance()
std::unique_ptr< edm::EmptyWaitingTask, waitingtask::TaskDestroyer > make_empty_waiting_task()
Create an EmptyWaitingTask which will properly be destroyed.
The Registry of all workers that where requested Holds all instances of workers. In this implementati...
void runAccumulatorsAsync(WaitingTask *task, typename T::TransitionInfoType const &info, ServiceToken const &token, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context)
void setupResolvers(Principal &principal)
void endStream(StreamID iID, StreamContext &streamContext)
Worker * getWorker(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, std::string const &label)
roAction_t actions[nactions]
WorkerManager(std::shared_ptr< ActivityRegistry > actReg, ExceptionToActionTable const &actions)
void const * lastSetupEventPrincipal_