Parentage.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_Parentage_h
2 #define canvas_Persistency_Provenance_Parentage_h
3 
4 /*----------------------------------------------------------------------
5 
6 Parentage: The products that were read in producing this product.
7 
8 definitions:
9 Product: The EDProduct to which a provenance object is associated
10 Parents: The EDProducts used as input by the creator.
11 
12 ----------------------------------------------------------------------*/
13 
16 
17 #include <iosfwd>
18 #include <vector>
19 
20 namespace art {
21  class Parentage {
22  public:
23  Parentage() = default;
24  explicit Parentage(std::vector<ProductID> const& parents);
25 
26  // Only the 'salient attributes' are encoded into the ID.
27  ParentageID id() const;
28 
29  std::vector<ProductID> const&
30  parents() const
31  {
32  return parents_;
33  }
34  std::vector<ProductID>&
36  {
37  return parents_;
38  }
39 
40  private:
41  std::vector<ProductID> parents_{};
42  };
43 
44  inline std::ostream&
45  operator<<(std::ostream& os, Parentage const&)
46  {
47  // Unimplemented
48  return os;
49  }
50 
51  // Only the 'salient attributes' are testing in equality comparison.
52  bool operator==(Parentage const& a, Parentage const& b);
53  inline bool
54  operator!=(Parentage const& a, Parentage const& b)
55  {
56  return !(a == b);
57  }
58 }
59 #endif /* canvas_Persistency_Provenance_Parentage_h */
60 
61 // Local Variables:
62 // mode: c++
63 // End:
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
std::vector< ProductID > & parents()
Definition: Parentage.h:35
std::vector< ProductID > const & parents() const
Definition: Parentage.h:30
ParentageID id() const
const double a
std::vector< ProductID > parents_
Definition: Parentage.h:41
Parentage()=default
const hit & b
Definition: hits.cxx:21
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)
Definition: Provenance.h:168