CMS 3D CMS Logo

LuminosityBlockPrincipal.cc
Go to the documentation of this file.
2 
4 
5 namespace edm {
6 
7  LuminosityBlockPrincipal::LuminosityBlockPrincipal(std::shared_ptr<ProductRegistry const> reg,
8  ProcessConfiguration const& pc,
9  HistoryAppender* historyAppender,
10  unsigned int index,
11  bool isForPrimaryProcess)
12  : Base(reg, reg->productLookup(InLumi), pc, InLumi, historyAppender, isForPrimaryProcess),
13  runPrincipal_(),
14  index_(index) {}
15 
18  fillPrincipal(aux_.processHistoryID(), processHistoryRegistry, reader);
19 
20  for (auto& prod : *this) {
21  prod->setProcessHistory(processHistory());
22  }
23  }
24 
25  void LuminosityBlockPrincipal::put(BranchDescription const& bd, std::unique_ptr<WrapperBase> edp) const {
26  putOrMerge(bd, std::move(edp));
27  }
28 
29  void LuminosityBlockPrincipal::put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const {
30  auto phb = getProductResolverByIndex(index);
31  phb->putOrMergeProduct(std::move(edp));
32  }
33 
34  unsigned int LuminosityBlockPrincipal::transitionIndex_() const { return index().value(); }
35 
36 } // namespace edm
unsigned int ProductResolverIndex
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
unsigned int transitionIndex_() const override
ProcessHistoryID const & processHistoryID() const
LuminosityBlockIndex index() const
ProcessHistory const & processHistory() const
Definition: Principal.h:140
void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
void putOrMerge(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: Principal.cc:872
LuminosityBlockPrincipal(std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int index, bool isForPrimaryProcess=true)
unsigned int value() const
DelayedReader * reader() const
Definition: Principal.h:186
HLT enums.
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:535
void fillPrincipal(ProcessHistoryID const &hist, ProcessHistoryRegistry const &phr, DelayedReader *reader)
Definition: Principal.cc:395
def move(src, dest)
Definition: eostools.py:511