|
8 | 8 | #include "FWCore/Framework/interface/SignallingProductRegistryFiller.h" |
9 | 9 | #include "FWCore/Framework/interface/ModuleRegistry.h" |
10 | 10 | #include "FWCore/Framework/interface/ModuleRegistryUtilities.h" |
| 11 | +#include "FWCore/Framework/interface/maker/MakeModuleParams.h" |
11 | 12 | #include "FWCore/ParameterSet/interface/ParameterSet.h" |
12 | 13 | #include "FWCore/Utilities/interface/StreamID.h" |
13 | 14 | #include "FWCore/Utilities/interface/make_sentry.h" |
@@ -68,8 +69,18 @@ namespace edm { |
68 | 69 | const PreallocationConfiguration preallocConfig; |
69 | 70 | for (auto& pset : psets) { |
70 | 71 | std::string label = pset.getParameter<std::string>("@module_label"); |
71 | | - workerManager_.addToUnscheduledWorkers( |
72 | | - pset, preg, &preallocConfig, processConfiguration, label, unscheduledLabels, shouldBeUsedLabels); |
| 72 | + MakeModuleParams params(&pset, preg, &preallocConfig, processConfiguration); |
| 73 | + auto module = moduleRegistry_->getModule(params, |
| 74 | + label, |
| 75 | + activityRegistry_->preModuleConstructionSignal_, |
| 76 | + activityRegistry_->postModuleConstructionSignal_); |
| 77 | + if (module->moduleType() != edm::maker::ModuleHolder::Type::kProducer or |
| 78 | + module->moduleType() != edm::maker::ModuleHolder::Type::kFilter) { |
| 79 | + throw edm::Exception(edm::errors::Configuration) |
| 80 | + << "The module with label " << label << " is not an EDProducer or EDFilter so can not be run unscheduled"; |
| 81 | + } |
| 82 | + workerManager_.addToUnscheduledWorkers(module->moduleDescription()); |
| 83 | + unscheduledLabels.insert(label); |
73 | 84 | } |
74 | 85 | if (!unscheduledLabels.empty()) { |
75 | 86 | preg.setUnscheduledProducts(unscheduledLabels); |
|
0 commit comments