LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
SubRunPrincipal.cc
Go to the documentation of this file.
2 // vim: set sw=2:
3 
9 
10 namespace art {
11 
13  SubRunAuxiliary const& aux,
14  ProcessConfiguration const& pc,
15  cet::exempt_ptr<ProductTable const> presentProducts,
16  std::unique_ptr<BranchMapper>&& mapper,
17  std::unique_ptr<DelayedReader>&& rtrv)
18  : Principal{pc,
20  presentProducts,
21  std::move(mapper),
22  std::move(rtrv)}
23  , aux_{aux}
24  {
26  cet::exempt_ptr<EDProductGetterFinder const>{this});
27  if (ProductMetaData::instance().productProduced(InSubRun)) {
29  }
30  }
31 
32  ProcessHistoryID const&
34  {
35  return aux().processHistoryID_;
36  }
37 
38  void
40  {
41  return aux().setProcessHistoryID(phid);
42  }
43 
44  void
46  {
49  }
50 
51  void
53  std::unique_ptr<EDProduct>&& edp,
54  BranchDescription const& pd,
55  std::unique_ptr<ProductProvenance const>&& productProvenance,
56  RangeSet&& rs)
57  {
58  assert(edp);
59  branchMapper().insert(std::move(productProvenance));
61  gfactory::make_group(pd, pd.productID(), std::move(rs), std::move(edp)));
62  }
63 
64  RunPrincipal const&
66  {
67  if (!runPrincipal_) {
69  << "Tried to obtain a NULL runPrincipal.\n";
70  }
71  return *runPrincipal_;
72  }
73 
74 } // namespace art
void put(std::unique_ptr< EDProduct > &&, BranchDescription const &, std::unique_ptr< ProductProvenance const > &&, RangeSet &&)
void setGroupFinder(cet::exempt_ptr< EDProductGetterFinder const > ep)
Definition: DelayedReader.h:38
SubRunPrincipal(SubRunAuxiliary const &, ProcessConfiguration const &, cet::exempt_ptr< ProductTable const > presentProducts, std::unique_ptr< BranchMapper > &&=std::make_unique< BranchMapper >(), std::unique_ptr< DelayedReader > &&=std::make_unique< NoDelayedReader >())
ProcessHistoryID const & processHistoryID() const override
cet::exempt_ptr< RunPrincipal const > runPrincipal_
void setProcessHistoryID(ProcessHistoryID const &phid) override
SubRunAuxiliary aux_
void setProcessHistoryID(ProcessHistoryID const &phid) const
DelayedReader & productReader()
Definition: Principal.h:198
ProcessHistoryID processHistoryID_
RunPrincipal const & runPrincipal() const
void addToProcessHistory()
Definition: Principal.cc:80
BranchMapper const & branchMapper() const
Definition: Principal.h:144
static ProductMetaData const & instance()
result_t insert(std::unique_ptr< ProductProvenance const > &&)
Definition: BranchMapper.cc:24
ProductID productID() const
SubRunAuxiliary const & aux() const
virtual void fillGroup(BranchDescription const &)=0
void fillGroup(BranchDescription const &) override
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
static RangeSet invalid()
Definition: RangeSet.cc:46
HLT enums.
std::unique_ptr< Group > make_group(BranchDescription const &, ProductID const &, RangeSet &&)
Definition: GroupFactory.h:44