11 #include "oneapi/tbb/task_arena.h" 14 template <
typename T,
typename U>
16 typename T::TransitionInfoType&
info,
18 typename T::Context
const* topContext,
20 bool cleaningUpAfterException =
false) {
29 tbb::task_arena localArena{tbb::this_task_arena::max_concurrency()};
30 std::exception_ptr exceptPtr = localArena.execute([&]() {
54 std::shared_ptr<ProcessConfiguration> processConfiguration)
58 std::vector<std::string> shouldBeUsedLabels;
59 std::set<std::string> unscheduledLabels;
61 for (
auto&
pset : psets) {
64 pset, preg, &preallocConfig, processConfiguration,
label, unscheduledLabels, shouldBeUsedLabels);
66 if (!unscheduledLabels.empty()) {
84 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin>>(
86 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamBegin>>(
95 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin>>(
97 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin>>(
106 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamEnd>>(
108 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd>>(
117 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd>>(
119 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd>>(
137 std::exception_ptr exceptPtr = tbb::this_task_arena::isolate([&]() {
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 beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProductResolverIndices const &, ProcessBlockHelperBase const &)
void setupOnDemandSystem(EventTransitionInfo const &)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
AllWorkers const & unscheduledWorkers() const
static StreamID invalidStreamID()
void setUnscheduledProducts(std::set< std::string > const &unscheduledLabels)
void processOneOccurrenceAsync(WaitingTaskHolder, typename T::TransitionInfoType &, ServiceToken const &, StreamID, typename T::Context const *topContext, U const *context) noexcept
StreamID const & streamID() const
void beginRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
static ServiceRegistry & instance()
AllWorkers const & allWorkers() const
void endLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void endRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void beginStream(edm::StreamID iID, StreamContext &sContext)
void beginStream(StreamID iID, StreamContext &streamContext)
void addToUnscheduledWorkers(ParameterSet &pset, ProductRegistry &preg, PreallocationConfiguration const *prealloc, std::shared_ptr< ProcessConfiguration const > processConfiguration, std::string label, std::set< std::string > &unscheduledLabels, std::vector< std::string > &shouldBeUsedLabels)
SecondaryEventProvider(std::vector< ParameterSet > &psets, ProductRegistry &pregistry, std::shared_ptr< ProcessConfiguration > processConfiguration)
WorkerManager workerManager_
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProductResolverIndices const &)
void setupResolvers(Principal &principal)
auto wrap(F iFunc) -> decltype(iFunc())
void beginLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
std::list< std::string > const & context() const
ServiceToken presentToken() const