LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
Results.cc
Go to the documentation of this file.
4 
6  ModuleDescription const& md,
7  cet::exempt_ptr<Consumer> consumer)
8  : DataViewImpl{p, md, InResults, false, consumer}, principal_{p}
9 {}
10 
13 {
14  return principal_.productGetter(pid);
15 }
16 
17 void
19 {
20  for (auto& elem : putProducts()) {
21  auto const& pd = elem.second.pd;
22  auto productProvenancePtr = std::make_unique<ProductProvenance const>(
23  pd.productID(), productstatus::present());
24  resp.put(std::move(elem.second.prod), pd, std::move(productProvenancePtr));
25  }
26 
27  // the cleanup is all or none
28  putProducts().clear();
29 }
void commit(ResultsPrincipal &)
Definition: Results.cc:18
Results(Principal const &p, ModuleDescription const &md, cet::exempt_ptr< Consumer > consumer)
Definition: Results.cc:5
EDProductGetter const * productGetter(ProductID const pid) const
Definition: Results.cc:12
EDProductGetter const * productGetter(ProductID const pid) const
Definition: Principal.cc:532
void put(std::unique_ptr< EDProduct > &&, BranchDescription const &, std::unique_ptr< ProductProvenance const > &&)
Principal const & principal_
Definition: Results.h:73
TypeLabelMap & putProducts()
Definition: DataViewImpl.h:183
ProductStatus present()
Definition: ProductStatus.h:16