LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Run.cc
Go to the documentation of this file.
6 
10 
12  ModuleDescription const& md,
13  cet::exempt_ptr<Consumer> consumer,
14  RangeSet const& rs)
15  : DataViewImpl{rp, md, InRun, false, consumer}
16  , principal_{rp}
17  , aux_{rp.aux()}
18  , productRangeSet_{rs}
19 {}
20 
23 {
24  return principal_.productGetter(pid);
25 }
26 
27 bool
28 art::Run::getProcessParameterSet(std::string const& /*processName*/,
29  std::vector<ParameterSet>& /*psets*/) const
30 {
31  // Unimplemented
32  return false;
33 }
34 
35 void
37  bool const checkProducts,
38  std::set<TypeLabel> const& expectedProducts)
39 {
40  // Check addresses only since type of 'rp' will hopefully change to
41  // Principal&.
42  assert(&rp == &principal_);
43  checkPutProducts(checkProducts, expectedProducts, putProducts());
44  commit(rp);
45 }
46 
47 void
49 {
50  for (auto& elem : putProducts()) {
51  auto const& pd = elem.second.pd;
52  auto productProvenancePtr = std::make_unique<ProductProvenance const>(
53  pd.productID(), productstatus::present());
54  rp.put(std::move(elem.second.prod),
55  pd,
56  std::move(productProvenancePtr),
57  std::move(elem.second.rs));
58  }
59 
60  // the cleanup is all or none
61  putProducts().clear();
62 }
void put(std::unique_ptr< EDProduct > &&, BranchDescription const &, std::unique_ptr< ProductProvenance const > &&, RangeSet &&)
Definition: RunPrincipal.cc:51
bool getProcessParameterSet(std::string const &processName, std::vector< fhicl::ParameterSet > &ps) const
Definition: Run.cc:28
void commit(RunPrincipal &rp, bool const checkProducts, std::set< TypeLabel > const &expectedProducts)
Definition: Run.cc:36
Run(RunPrincipal const &rp, ModuleDescription const &md, cet::exempt_ptr< Consumer > consumer, RangeSet const &rsForPuttingProducts=RangeSet::invalid())
Definition: Run.cc:11
Principal const & principal_
Definition: Run.h:135
EDProductGetter const * productGetter(ProductID const pid) const
Definition: Principal.cc:532
EDProductGetter const * productGetter(ProductID const pid) const
Definition: Run.cc:22
TypeLabelMap & putProducts()
Definition: DataViewImpl.h:183
RunAuxiliary const & aux_
Definition: Run.h:136
void checkPutProducts(bool checkProducts, std::set< TypeLabel > const &expectedProducts, TypeLabelMap const &putProducts)
ProductStatus present()
Definition: ProductStatus.h:16
RangeSet productRangeSet_
Definition: Run.h:137