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.
27 
28  // Insert a new child for the given parent.
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)
void append_(map_t const &lookup, ProductID item, ProductIDSet &itemSet) const
std::map< ProductID, ProductIDSet > map_t
def parent(G, child, parent_type)
Definition: graph.py:67
std::set< ProductID > ProductIDSet