1 #ifndef FWCore_Framework_GlobalSchedule_h
2 #define FWCore_Framework_GlobalSchedule_h
37 #include "boost/range/adaptor/reversed.hpp"
43 class GlobalScheduleSignalSentry {
48 T::preScheduleSignal(a_, context_);
50 ~GlobalScheduleSignalSentry() noexcept(
false) {
54 T::postScheduleSignal(a_, context_);
62 void allowThrow() { allowThrow_ =
true; }
67 typename T::Context
const* context_;
73 class ExceptionCollector;
75 class PreallocationConfiguration;
77 class TriggerResultInserter;
78 class PathStatusInserter;
79 class EndPathStatusInserter;
91 std::shared_ptr<ModuleRegistry> modReg,
92 std::vector<std::string>
const& modulesToUse,
97 std::shared_ptr<ActivityRegistry> areg,
98 std::shared_ptr<ProcessConfiguration> processConfiguration,
102 template <
typename T>
104 typename T::TransitionInfoType&,
106 bool cleaningUpAfterException =
false);
161 template <
typename T>
163 typename T::TransitionInfoType& transitionInfo,
165 bool cleaningUpAfterException) {
166 auto const& principal = transitionInfo.principal();
171 auto globalContext = std::make_shared<GlobalContext>(T::makeGlobalContext(principal,
processContext_));
176 T::preScheduleSignal(
actReg_.get(), globalContext.get());
181 [
this, iHolder, cleaningUpAfterException, globalContext, weakToken](std::exception_ptr
const* iPtr)
mutable {
182 std::exception_ptr excpt;
190 std::ostringstream ost;
192 ost <<
"Processing " << T::transitionName() <<
" ";
196 excpt = std::current_exception();
207 T::postScheduleSignal(
actReg_.get(), globalContext.get());
210 excpt = std::current_exception();
217 workerManager.resetAll();
222 workerManager.setupResolvers(transitionInfo.principal());
226 auto& aw = workerManager.allWorkers();
228 worker->doWorkAsync<
T>(