|
| 1 | +#ifndef FWCore_Framework_ModuleRegistryUtilities_h |
| 2 | +#define FWCore_Framework_ModuleRegistryUtilities_h |
| 3 | + |
| 4 | +#include <string> |
| 5 | +#include <vector> |
| 6 | +#include <mutex> |
| 7 | +namespace edm { |
| 8 | + class ModuleRegistry; |
| 9 | + class ActivityRegistry; |
| 10 | + class ProductRegistry; |
| 11 | + class StreamContext; |
| 12 | + class GlobalContext; |
| 13 | + namespace eventsetup { |
| 14 | + class ESRecordsToProductResolverIndices; |
| 15 | + } |
| 16 | + class ProcessBlockHelperBase; |
| 17 | + class ExceptionCollector; |
| 18 | + |
| 19 | + void finishModulesInitialization(ModuleRegistry& iModuleRegistry, |
| 20 | + ProductRegistry const& iProductRegistry, |
| 21 | + eventsetup::ESRecordsToProductResolverIndices const& iESIndices, |
| 22 | + ProcessBlockHelperBase const& processBlockHelperBase, |
| 23 | + std::string const& processName); |
| 24 | + /** beginJobFailedForModule has the module id of each module which threw an exception during |
| 25 | + * the call to beginJob function. The vector should be passed to `runEndJobForModules`. |
| 26 | + * If an exception is thrown, it will be of type cms::Exception. |
| 27 | + */ |
| 28 | + void runBeginJobForModules(GlobalContext const& iGlobalContext, |
| 29 | + ModuleRegistry& iModuleRegistry, |
| 30 | + edm::ActivityRegistry& iActivityRegistry, |
| 31 | + std::vector<unsigned int>& beginJobFailedForModule) noexcept(false); |
| 32 | + |
| 33 | + /// The vector holds module id for modules which should not have their endJob called. |
| 34 | + void runEndJobForModules(GlobalContext const& iGlobalContext, |
| 35 | + ModuleRegistry& iModuleRegistry, |
| 36 | + ActivityRegistry& iRegistry, |
| 37 | + ExceptionCollector& collector, |
| 38 | + std::vector<unsigned int> const& beginJobFailedForModule) noexcept; |
| 39 | + |
| 40 | + /** beginStreamFailedForModule holds module id for each module which threw an exception during |
| 41 | + * the call to beginStream function. This vector is used to determine which modules should not |
| 42 | + * have their endStream called. The vector should be passed to `runEndStreamForModules`. |
| 43 | + * If an exception is thrown, it will be of type cms::Exception. |
| 44 | + */ |
| 45 | + void runBeginStreamForModules(StreamContext const& iStreamContext, |
| 46 | + ModuleRegistry& iModuleRegistry, |
| 47 | + edm::ActivityRegistry& iActivityRegistry, |
| 48 | + std::vector<unsigned int>& beginStreamFailedForModule) noexcept(false); |
| 49 | + |
| 50 | + /// The vector hold module id for modules which should not have their endStream called. |
| 51 | + void runEndStreamForModules(StreamContext const& iStreamContext, |
| 52 | + ModuleRegistry& iModuleRegistry, |
| 53 | + ActivityRegistry& iRegistry, |
| 54 | + ExceptionCollector& collector, |
| 55 | + std::mutex& collectorMutex, |
| 56 | + std::vector<unsigned int> const& beginStreamFailedForModule) noexcept; |
| 57 | + |
| 58 | +} // namespace edm |
| 59 | +#endif // FWCore_Framework_ModuleRegistryUtilities_h |
0 commit comments