ProductProvenance.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_ProductProvenance_h
2 #define canvas_Persistency_Provenance_ProductProvenance_h
3 // vim: set sw=2 expandtab :
4 
5 // The event dependent portion of the description of a product
6 // and how it came into existence, plus the status.
7 
13 
14 #include <iosfwd>
15 #include <memory>
16 #include <vector>
17 
18 namespace art {
20  public:
21  struct Transients {
22  bool noParentage_{false};
23  std::shared_ptr<Parentage> parentagePtr_{nullptr};
24  };
25 
31  std::vector<ProductID> const& parents);
36 
37  void write(std::ostream&) const;
38  ProductID productID() const noexcept;
39  ProductStatus productStatus() const noexcept;
40  ParentageID const& parentageID() const noexcept;
41  Parentage const& parentage() const;
42  // Note: This is true for Run, SubRun, and Results products.
43  bool noParentage() const noexcept;
44 
45  private:
50  };
51 
52  using ProductProvenances = std::vector<ProductProvenance>;
53 
54  std::ostream& operator<<(std::ostream& os, ProductProvenance const& p);
55  bool operator==(ProductProvenance const& a,
56  ProductProvenance const& b) noexcept;
57  bool operator!=(ProductProvenance const& a,
58  ProductProvenance const& b) noexcept;
59  bool operator<(ProductProvenance const& a,
60  ProductProvenance const& b) noexcept;
61 
62 } // namespace art
63 
64 #endif /* canvas_Persistency_Provenance_ProductProvenance_h */
65 
66 // Local Variables:
67 // mode: c++
68 // End:
bool operator==(Provenance const &a, Provenance const &b) noexcept
Definition: Provenance.cc:141
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
ParentageID const & parentageID() const noexcept
ProductID productID() const noexcept
std::shared_ptr< Parentage > parentagePtr_
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
bool operator<(ProductInfo const &a, ProductInfo const &b)
Definition: ProductInfo.cc:51
constexpr ProductStatus uninitialized() noexcept
Definition: ProductStatus.h:36
std::vector< ProductProvenance > ProductProvenances
Parentage const & parentage() const
ProductStatus productStatus_
bool noParentage() const noexcept
Transient< Transients > transients_
const double a
p
Definition: test.py:223
unsigned char ProductStatus
Definition: ProductStatus.h:6
ProductStatus productStatus() const noexcept
ProductProvenance & operator=(ProductProvenance const &)
void write(std::ostream &) const
static bool * b
Definition: config.cpp:1043