Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:05

0001 #ifndef FWCore_Framework_ProcessBlockPrincipal_h
0002 #define FWCore_Framework_ProcessBlockPrincipal_h
0003 
0004 /** \class edm::ProcessBlockPrincipal
0005 
0006 \author W. David Dagenhart, created 19 March, 2020
0007 
0008 */
0009 
0010 #include "FWCore/Framework/interface/Principal.h"
0011 #include "FWCore/Utilities/interface/ProductResolverIndex.h"
0012 
0013 #include <memory>
0014 #include <string>
0015 
0016 namespace edm {
0017 
0018   class ProcessConfiguration;
0019   class ProductRegistry;
0020   class WrapperBase;
0021 
0022   class ProcessBlockPrincipal : public Principal {
0023   public:
0024     ProcessBlockPrincipal(std::shared_ptr<ProductRegistry const>,
0025                           ProcessConfiguration const&,
0026                           bool isForPrimaryProcess = true);
0027 
0028     void fillProcessBlockPrincipal(std::string const& processName, DelayedReader* reader = nullptr);
0029 
0030     std::string const& processName() const { return processName_; }
0031 
0032     void put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const;
0033 
0034     // Should only be 1 ProcessBlock needed at a time (no concurrent ProcessBlocks)
0035     unsigned int index() const { return 0; }
0036 
0037   private:
0038     unsigned int transitionIndex_() const final;
0039 
0040     std::string processName_;
0041   };
0042 }  // namespace edm
0043 
0044 #endif  // FWCore_Framework_ProcessBlockPrincipal_h