10 #include "tbb/task_arena.h"
13 template <
typename T,
typename U>
15 typename T::TransitionInfoType&
info,
17 typename T::Context
const* topContext,
19 bool cleaningUpAfterException =
false) {
28 tbb::task_arena localArena{tbb::this_task_arena::max_concurrency()};
29 std::exception_ptr exceptPtr = localArena.execute([&]() {
55 workerManager_(std::make_shared<
ActivityRegistry>(), *exceptionToActionTable_) {
56 std::vector<std::string> shouldBeUsedLabels;
57 std::set<std::string> unscheduledLabels;
59 for (
auto&
pset : psets) {
62 pset, preg, &preallocConfig, processConfiguration, label, unscheduledLabels, shouldBeUsedLabels);
64 if (!unscheduledLabels.empty()) {
82 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin> >(
84 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamBegin> >(
93 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin> >(
95 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin> >(
104 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamEnd> >(
106 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd> >(
115 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd> >(
117 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd> >(
void endStream(edm::StreamID iID, StreamContext &sContext)
void setupPileUpEvent(EventPrincipal &ep, const EventSetupImpl &setup, StreamContext &sContext)
std::exception_ptr syncWait(F &&iFunc)
void endStream(StreamID iID, StreamContext &streamContext)
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)
void setupOnDemandSystem(EventTransitionInfo const &)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
static StreamID invalidStreamID()
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &, ProcessBlockHelperBase const &)
ServiceToken presentToken() const
void processOneOccurrenceAsync(WaitingTaskHolder, typename T::TransitionInfoType &, ServiceToken const &, StreamID, typename T::Context const *topContext, U const *context)
void setUnscheduledProducts(std::set< std::string > const &unscheduledLabels)
std::list< std::string > const & context() const
void beginRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
static ServiceRegistry & instance()
void endLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProxyIndices const &)
void endRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginStream(edm::StreamID iID, StreamContext &sContext)
StreamID const & streamID() const
void beginStream(StreamID iID, StreamContext &streamContext)
AllWorkers const & allWorkers() const
SecondaryEventProvider(std::vector< ParameterSet > &psets, ProductRegistry &pregistry, std::shared_ptr< ProcessConfiguration > processConfiguration)
WorkerManager workerManager_
void setupResolvers(Principal &principal)
auto wrap(F iFunc) -> decltype(iFunc())
void beginLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)