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:
ParentageID const & parentageID() const noexcept
const char * p
Definition: xmltok.h:285
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
ProductID productID() const noexcept
std::shared_ptr< Parentage > parentagePtr_
bool operator<(ProductInfo const &a, ProductInfo const &b)
constexpr ProductStatus uninitialized() noexcept
Definition: ProductStatus.h:36
std::vector< ProductProvenance > ProductProvenances
ProductStatus productStatus_
std::ostream & operator<<(std::ostream &os, const GroupSelector &gs)
bool noParentage() const noexcept
Parentage const & parentage() const
Transient< Transients > transients_
const double a
unsigned char ProductStatus
Definition: ProductStatus.h:6
ProductStatus productStatus() const noexcept
const hit & b
Definition: hits.cxx:21
void write(std::ostream &) const
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
bool operator==(Provenance const &a, Provenance const &b)
ProductProvenance & operator=(ProductProvenance const &)