Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-06-29 22:58:02

0001 #ifndef FWCore_Framework_ModuleRegistryUtilities_h
0002 #define FWCore_Framework_ModuleRegistryUtilities_h
0003 
0004 #include <string>
0005 #include <vector>
0006 #include <mutex>
0007 namespace edm {
0008   class ModuleRegistry;
0009   class ActivityRegistry;
0010   class ProductRegistry;
0011   class StreamContext;
0012   class GlobalContext;
0013   namespace eventsetup {
0014     class ESRecordsToProductResolverIndices;
0015   }
0016   class ProcessBlockHelperBase;
0017   class ExceptionCollector;
0018 
0019   void finishModulesInitialization(ModuleRegistry& iModuleRegistry,
0020                                    ProductRegistry const& iProductRegistry,
0021                                    eventsetup::ESRecordsToProductResolverIndices const& iESIndices,
0022                                    ProcessBlockHelperBase const& processBlockHelperBase,
0023                                    std::string const& processName);
0024   /** beginJobFailedForModule has the module id of each module which threw an exception during
0025      * the call to beginJob function.  The vector should be passed to `runEndJobForModules`.
0026      * If an exception is thrown, it will be of type cms::Exception.
0027      */
0028   void runBeginJobForModules(GlobalContext const& iGlobalContext,
0029                              ModuleRegistry& iModuleRegistry,
0030                              edm::ActivityRegistry& iActivityRegistry,
0031                              std::vector<unsigned int>& beginJobFailedForModule) noexcept(false);
0032 
0033   /// The vector holds module id for modules which should not have their endJob called.
0034   void runEndJobForModules(GlobalContext const& iGlobalContext,
0035                            ModuleRegistry& iModuleRegistry,
0036                            ActivityRegistry& iRegistry,
0037                            ExceptionCollector& collector,
0038                            std::vector<unsigned int> const& beginJobFailedForModule) noexcept;
0039 
0040   /** beginStreamFailedForModule holds module id for each module which threw an exception during
0041      * the call to beginStream function. This vector is used to determine which modules should not
0042      * have their endStream called. The vector should be passed to `runEndStreamForModules`.
0043      * If an exception is thrown, it will be of type cms::Exception.
0044      */
0045   void runBeginStreamForModules(StreamContext const& iStreamContext,
0046                                 ModuleRegistry& iModuleRegistry,
0047                                 edm::ActivityRegistry& iActivityRegistry,
0048                                 std::vector<unsigned int>& beginStreamFailedForModule) noexcept(false);
0049 
0050   /// The vector hold module id for modules which should not have their endStream called.
0051   void runEndStreamForModules(StreamContext const& iStreamContext,
0052                               ModuleRegistry& iModuleRegistry,
0053                               ActivityRegistry& iRegistry,
0054                               ExceptionCollector& collector,
0055                               std::mutex& collectorMutex,
0056                               std::vector<unsigned int> const& beginStreamFailedForModule) noexcept;
0057 
0058 }  // namespace edm
0059 #endif  // FWCore_Framework_ModuleRegistryUtilities_h