Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion FWCore/Framework/interface/GlobalSchedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ namespace edm {
return std::span<WorkerManager>(workerManagers_)
.subspan(numberOfConcurrentLumis_ + numberOfConcurrentRuns_, numberOfConcurrentProcessBlocks_);
}
std::span<WorkerManager> inputProcessBlockManagers() {
return std::span<WorkerManager>(workerManagers_)
.subspan(numberOfConcurrentLumis_ + numberOfConcurrentRuns_ + numberOfConcurrentProcessBlocks_,
numberOfConcurrentInputProcessBlocks_);
}
/// returns the action table
ExceptionToActionTable const& actionTable() const { return workerManagers_[0].actionTable(); }

Expand Down Expand Up @@ -127,6 +132,7 @@ namespace edm {
unsigned int numberOfConcurrentLumis_;
unsigned int numberOfConcurrentRuns_;
static constexpr unsigned int numberOfConcurrentProcessBlocks_ = 1;
static constexpr unsigned int numberOfConcurrentInputProcessBlocks_ = 1;
};

template <typename T>
Expand Down Expand Up @@ -165,7 +171,11 @@ namespace edm {
if constexpr (T::branchType_ == InRun) {
managers = runManagers();
} else if constexpr (T::branchType_ == InProcess) {
managers = processBlockManagers();
if constexpr (T::transition_ == Transition::AccessInputProcessBlock) {
managers = inputProcessBlockManagers();
} else {
managers = processBlockManagers();
}
} else {
managers = lumisManagers();
}
Expand Down
11 changes: 8 additions & 3 deletions FWCore/Framework/src/GlobalSchedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ namespace edm {
processContext_(processContext),
numberOfConcurrentLumis_(prealloc.numberOfLuminosityBlocks()),
numberOfConcurrentRuns_(prealloc.numberOfRuns()) {
unsigned int nManagers =
prealloc.numberOfLuminosityBlocks() + prealloc.numberOfRuns() + numberOfConcurrentProcessBlocks_;
unsigned int nManagers = prealloc.numberOfLuminosityBlocks() + prealloc.numberOfRuns() +
numberOfConcurrentProcessBlocks_ + numberOfConcurrentInputProcessBlocks_;
workerManagers_.reserve(nManagers);
for (unsigned int i = 0; i < nManagers; ++i) {
workerManagers_.emplace_back(modReg, areg, actions);
Expand All @@ -46,7 +46,7 @@ namespace edm {
//side effect keeps this module around
auto mod = modReg->getExistingModule(module->moduleLabel());
assert(mod);
if (mod->wantsProcessBlocks() or mod->wantsInputProcessBlocks()) {
if (mod->wantsProcessBlocks()) {
for (auto& wm : processBlockManagers()) {
(void)wm.getWorkerForModule(*module);
}
Expand All @@ -61,6 +61,11 @@ namespace edm {
(void)wm.getWorkerForModule(*module);
}
}
if (mod->wantsInputProcessBlocks()) {
for (auto& wm : inputProcessBlockManagers()) {
(void)wm.getWorkerForModule(*module);
}
}
}
} // GlobalSchedule::GlobalSchedule

Expand Down