Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-05-06 00:35:28

0001 #include "FWCore/Framework/interface/LuminosityBlockPrincipal.h"
0002 #include "FWCore/Framework/interface/ProductPutterBase.h"
0003 #include "DataFormats/Provenance/interface/ProductRegistry.h"
0004 
0005 namespace edm {
0006 
0007   LuminosityBlockPrincipal::LuminosityBlockPrincipal(std::shared_ptr<ProductRegistry const> reg,
0008                                                      ProcessConfiguration const& pc,
0009                                                      HistoryAppender* historyAppender,
0010                                                      unsigned int index,
0011                                                      bool isForPrimaryProcess)
0012       : Base(reg, reg->productLookup(InLumi), pc, InLumi, historyAppender, isForPrimaryProcess),
0013         runPrincipal_(),
0014         index_(index) {}
0015 
0016   void LuminosityBlockPrincipal::fillLuminosityBlockPrincipal(ProcessHistory const* processHistory,
0017                                                               DelayedReader* reader) {
0018     fillPrincipal(aux_.processHistoryID(), processHistory, reader);
0019   }
0020 
0021   void LuminosityBlockPrincipal::put(BranchDescription const& bd, std::unique_ptr<WrapperBase> edp) const {
0022     put_(bd, std::move(edp));
0023   }
0024 
0025   void LuminosityBlockPrincipal::put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const {
0026     auto phb = getProductResolverByIndex(index);
0027     dynamic_cast<ProductPutterBase const*>(phb)->putProduct(std::move(edp));
0028   }
0029 
0030   unsigned int LuminosityBlockPrincipal::transitionIndex_() const { return index().value(); }
0031 
0032 }  // namespace edm