LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
BranchChildren.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_BranchChildren_h
2 #define canvas_Persistency_Provenance_BranchChildren_h
3 
4 /*----------------------------------------------------------------------
5 
6 BranchChildren: Dependency information between products.
7 
8 ----------------------------------------------------------------------*/
9 
11 
12 #include <map>
13 #include <set>
14 
15 namespace art {
16 
18  private:
19  using ProductIDSet = std::set<ProductID>;
20 
21  public:
22  // Clear all information.
23  void clear();
24 
25  // Insert a parent with no children.
26  void insertEmpty(ProductID parent);
27 
28  // Insert a new child for the given parent.
29  void insertChild(ProductID parent, ProductID child);
30 
31  // Look up all the descendants of the given parent, and insert
32  // them into descendants. N.B.: this does not clear out
33  // descendants first; it only appends *new* elements to the
34  // collection.
35  void appendToDescendants(ProductID parent, ProductIDSet& descendants) const;
36 
37  // Public type alias to facilitate ROOT IO rule.
38  using map_t = std::map<ProductID, ProductIDSet>;
39 
40  private:
42  void append_(map_t const& lookup,
43  ProductID item,
44  ProductIDSet& itemSet) const;
45  };
46 }
47 #endif /* canvas_Persistency_Provenance_BranchChildren_h */
48 
49 // Local Variables:
50 // mode: c++
51 // End:
void appendToDescendants(ProductID parent, ProductIDSet &descendants) const
void insertEmpty(ProductID parent)
void insertChild(ProductID parent, ProductID child)
Definition: MVAAlg.h:12
void append_(map_t const &lookup, ProductID item, ProductIDSet &itemSet) const
std::map< ProductID, ProductIDSet > map_t
std::set< ProductID > ProductIDSet