|
|
Go to the documentation of this file. 1 #ifndef FWCore_Framework_WorkerManager_h
2 #define FWCore_Framework_WorkerManager_h
25 class ExceptionCollector;
29 class PreallocationConfiguration;
30 namespace eventsetup {
41 std::shared_ptr<ActivityRegistry> actReg,
46 std::shared_ptr<ProcessConfiguration> processConfiguration,
48 std::set<std::string>& unscheduledLabels,
49 std::vector<std::string>& shouldBeUsedLabels);
51 template <
typename T,
typename U>
55 typename T::Context
const* topContext,
57 bool cleaningUpAfterException =
false);
58 template <
typename T,
typename U>
60 typename T::MyPrincipal& principal,
64 typename T::Context
const* topContext,
69 typename T::MyPrincipal
const&
ep,
74 typename T::Context
const* context);
94 std::shared_ptr<ProcessConfiguration const> processConfiguration,
107 template <
typename T,
typename U>
111 typename T::Context
const* topContext,
113 bool cleaningUpAfterException) {
117 waitTask->increment_ref_count();
118 processOneOccurrenceAsync<T, U>(
120 waitTask->wait_for_all();
121 if (waitTask->exceptionPtr() !=
nullptr) {
127 "Calling function WorkerManager::processOneOccurrence", ex, cleaningUpAfterException);
136 template <
typename T,
typename U>
138 typename T::MyPrincipal&
ep,
142 typename T::Context
const* topContext,
148 template <
typename T>
150 typename T::MyPrincipal
const&
ep,
155 typename T::Context
const* context) {
void addToAllWorkers(Worker *w)
std::vector< Worker * > AllWorkers
void processOneOccurrenceAsync(WaitingTask *task, typename T::MyPrincipal &principal, EventSetupImpl const &eventSetup, ServiceToken const &token, StreamID streamID, typename T::Context const *topContext, U const *context)
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
auto wrap(F iFunc) -> decltype(iFunc())
UnscheduledCallProducer unscheduled_
AllWorkers const & allWorkers() const
ExceptionToActionTable const * actionTable_
WorkerRegistry workerReg_
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
void beginStream(StreamID iID, StreamContext &streamContext)
std::list< std::string > const & context() const
ServiceToken presentToken() const
void processOneOccurrence(typename T::MyPrincipal &principal, EventSetupImpl const &eventSetup, StreamID streamID, typename T::Context const *topContext, U const *context, bool cleaningUpAfterException=false)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
void processAccumulatorsAsync(WaitingTask *task, typename T::MyPrincipal const &ep, EventSetupImpl const &es, ServiceToken const &token, StreamID streamID, ParentContext const &parentContext, typename T::Context const *context)
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 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 setupOnDemandSystem(Principal &principal, EventSetupImpl const &es)
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]
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)
WorkerManager(std::shared_ptr< ActivityRegistry > actReg, ExceptionToActionTable const &actions)
void const * lastSetupEventPrincipal_