11 #include "oneapi/tbb/task_arena.h" 16 template <
typename T,
typename U>
18 typename T::TransitionInfoType&
info,
20 typename T::Context
const* topContext,
22 bool cleaningUpAfterException =
false) {
31 tbb::task_arena localArena{tbb::this_task_arena::max_concurrency()};
32 std::exception_ptr exceptPtr = localArena.execute([&]() {
56 std::shared_ptr<ProcessConfiguration> processConfiguration)
60 std::vector<std::string> shouldBeUsedLabels;
61 std::set<std::string> unscheduledLabels;
63 for (
auto&
pset : psets) {
66 pset, preg, &preallocConfig, processConfiguration,
label, unscheduledLabels, shouldBeUsedLabels);
68 if (!unscheduledLabels.empty()) {
87 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalBegin>>(
89 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamBegin>>(
98 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalBegin>>(
100 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamBegin>>(
109 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionStreamEnd>>(
111 processOneOccurrence<OccurrenceTraits<RunPrincipal, BranchActionGlobalEnd>>(
120 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionStreamEnd>>(
122 processOneOccurrence<OccurrenceTraits<LuminosityBlockPrincipal, BranchActionGlobalEnd>>(
140 std::exception_ptr exceptPtr = tbb::this_task_arena::isolate([&]() {
void setupPileUpEvent(EventPrincipal &ep, const EventSetupImpl &setup, StreamContext &sContext)
std::exception_ptr syncWait(F &&iFunc)
void beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProductResolverIndices const &, ProcessBlockHelperBase const &, GlobalContext const &)
void setupOnDemandSystem(EventTransitionInfo const &)
void addContextAndPrintException(char const *context, cms::Exception &ex, bool disablePrint)
AllWorkers const & unscheduledWorkers() const
static StreamID invalidStreamID()
void endStream(edm::StreamID, StreamContext const &, ExceptionCollector &)
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 beginJob(ProductRegistry const &iRegistry, eventsetup::ESRecordsToProductResolverIndices const &, GlobalContext const &)
void endRun(RunPrincipal &run, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
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 setupResolvers(Principal &principal)
void beginStream(edm::StreamID, StreamContext const &)
auto wrap(F iFunc) -> decltype(iFunc())
void beginLuminosityBlock(LuminosityBlockPrincipal &lumi, const edm::EventSetupImpl &setup, ModuleCallingContext const *, StreamContext &sContext)
void endStream(StreamID, StreamContext const &, ExceptionCollector &, std::mutex &collectorMutex) noexcept
std::list< std::string > const & context() const
void beginStream(StreamID, StreamContext const &)
ServiceToken presentToken() const