CMS 3D CMS Logo

RunPrincipal.cc
Go to the documentation of this file.
2 
7 
8 namespace edm {
9  RunPrincipal::RunPrincipal(std::shared_ptr<RunAuxiliary> aux,
10  std::shared_ptr<ProductRegistry const> reg,
11  ProcessConfiguration const& pc,
12  HistoryAppender* historyAppender,
13  unsigned int iRunIndex,
14  bool isForPrimaryProcess,
15  MergeableRunProductProcesses const* mergeableRunProductProcesses)
16  : Base(reg, reg->productLookup(InRun), pc, InRun, historyAppender, isForPrimaryProcess),
17  aux_(aux),
18  index_(iRunIndex) {
19  if (mergeableRunProductProcesses) { // primary RunPrincipals of EventProcessor
20  mergeableRunProductMetadataPtr_ = (std::make_unique<MergeableRunProductMetadata>(*mergeableRunProductProcesses));
21  }
22  }
23 
25 
27  m_reducedHistoryID = processHistoryRegistry.reducedProcessHistoryID(aux_->processHistoryID());
28  auto history = processHistoryRegistry.getMapped(aux_->processHistoryID());
29  fillPrincipal(aux_->processHistoryID(), history, reader);
30 
31  for (auto& prod : *this) {
32  prod->setMergeableRunProductMetadata(mergeableRunProductMetadataPtr_.get());
33  }
34  }
35 
36  void RunPrincipal::put(BranchDescription const& bd, std::unique_ptr<WrapperBase> edp) const {
37  putOrMerge(bd, std::move(edp));
38  }
39 
40  void RunPrincipal::put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const {
41  auto phb = getProductResolverByIndex(index);
42  phb->putOrMergeProduct(std::move(edp));
43  }
44 
45  unsigned int RunPrincipal::transitionIndex_() const { return index().value(); }
46 
49  mergeableRunProductMetadataPtr_->preReadFile();
50  }
51  }
52 
53 } // namespace edm
edm::RunPrincipal::mergeableRunProductMetadataPtr_
edm::propagate_const< std::unique_ptr< MergeableRunProductMetadata > > mergeableRunProductMetadataPtr_
Definition: RunPrincipal.h:93
ProductResolverBase.h
edm::ProductResolverIndex
unsigned int ProductResolverIndex
Definition: ProductResolverIndex.h:8
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::Principal
Definition: Principal.h:57
ProcessHistoryRegistry.h
ProductRegistry.h
edm::InRun
Definition: BranchType.h:11
edm::Principal::getProductResolverByIndex
ConstProductResolverPtr getProductResolverByIndex(ProductResolverIndex const &oid) const
Definition: Principal.cc:535
edm::Principal::fillPrincipal
void fillPrincipal(ProcessHistoryID const &hist, ProcessHistory const *phr, DelayedReader *reader)
Definition: Principal.cc:394
edm::RunPrincipal::put
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: RunPrincipal.cc:36
DQM.reader
reader
Definition: DQM.py:105
edm::RunPrincipal::aux_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > aux_
Definition: RunPrincipal.h:86
edm::Principal::reader
DelayedReader * reader() const
Definition: Principal.h:185
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::RunPrincipal::m_reducedHistoryID
ProcessHistoryID m_reducedHistoryID
Definition: RunPrincipal.h:87
edm::RunPrincipal::index
RunIndex index() const
Definition: RunPrincipal.h:57
edm::RunPrincipal::transitionIndex_
unsigned int transitionIndex_() const override
Definition: RunPrincipal.cc:45
RunPrincipal.h
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
edm::HistoryAppender
Definition: HistoryAppender.h:13
edm::ProcessHistoryRegistry::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
Definition: ProcessHistoryRegistry.cc:23
edm::RunPrincipal::fillRunPrincipal
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:26
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::RunPrincipal::RunPrincipal
RunPrincipal(std::shared_ptr< RunAuxiliary > aux, std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int iRunIndex, bool isForPrimaryProcess=true, MergeableRunProductProcesses const *mergeableRunProductProcesses=nullptr)
Definition: RunPrincipal.cc:9
MergeableRunProductMetadata.h
edm::ProcessHistoryRegistry::getMapped
bool getMapped(ProcessHistoryID const &key, ProcessHistory &value) const
Definition: ProcessHistoryRegistry.cc:29
edm::RunPrincipal::~RunPrincipal
~RunPrincipal() override
Definition: RunPrincipal.cc:24
edm::DelayedReader
Definition: DelayedReader.h:29
edm::ProcessHistoryRegistry
Definition: ProcessHistoryRegistry.h:18
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::BranchDescription
Definition: BranchDescription.h:32
edm::Principal::putOrMerge
void putOrMerge(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: Principal.cc:872
edm::RunIndex::value
unsigned int value() const
Definition: RunIndex.h:44
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14
edm::RunPrincipal::preReadFile
void preReadFile()
Definition: RunPrincipal.cc:47
edm::MergeableRunProductProcesses
Definition: MergeableRunProductProcesses.h:11