Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-18 22:30:21

0001 #include "FWCore/Framework/interface/ProcessBlockPrincipal.h"
0002 #include "FWCore/Framework/interface/ProductPutterBase.h"
0003 
0004 #include "DataFormats/Provenance/interface/ProductRegistry.h"
0005 #include "DataFormats/Provenance/interface/BranchType.h"
0006 
0007 #include <utility>
0008 
0009 namespace edm {
0010 
0011   ProcessBlockPrincipal::ProcessBlockPrincipal(std::shared_ptr<ProductRegistry const> reg,
0012                                                ProcessConfiguration const& pc,
0013                                                bool isForPrimaryProcess)
0014       : Principal(reg, reg->productLookup(InProcess), pc, InProcess, nullptr, isForPrimaryProcess) {}
0015 
0016   void ProcessBlockPrincipal::fillProcessBlockPrincipal(std::string const& processNameOfBlock, DelayedReader* reader) {
0017     processName_ = processNameOfBlock;
0018     fillPrincipal(processNameOfBlock, reader);
0019   }
0020 
0021   void ProcessBlockPrincipal::put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const {
0022     auto phb = getProductResolverByIndex(index);
0023     dynamic_cast<ProductPutterBase const*>(phb)->putProduct(std::move(edp));
0024   }
0025 
0026   unsigned int ProcessBlockPrincipal::transitionIndex_() const {
0027     // Concurrent ProcessBlocks does not make any sense so just always
0028     // return 0 here.
0029     return 0;
0030   }
0031 
0032 }  // namespace edm