CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BranchChildren.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_BranchChildren_h
2 #define DataFormats_Provenance_BranchChildren_h
3 
4 /*----------------------------------------------------------------------
5 
6 BranchChildren: Dependency information between branches.
7 
8 ----------------------------------------------------------------------*/
9 
10 #include <map>
11 #include <set>
13 
14 namespace edm {
15 
17  private:
18  typedef std::set<BranchID> BranchIDSet;
19  public:
20 
21  // Clear all information.
22  void clear();
23 
24  // Insert a parent with no children.
26 
27  // Insert a new child for the given parent.
29 
30  // Look up all the descendants of the given parent, and insert them
31  // into descendants. N.B.: this does not clear out descendants first;
32  // it only appends *new* elements to the collection.
33  void appendToDescendants(BranchID parent, BranchIDSet& descendants) const;
34 
35  private:
36  typedef std::map<BranchID, BranchIDSet> map_t;
38 
39  void append_(map_t const& lookup, BranchID item, BranchIDSet& itemSet) const;
40  };
41 
42 }
43 #endif
list parent
Definition: dbtoconf.py:74
void insertEmpty(BranchID parent)
void insertChild(BranchID parent, BranchID child)
std::set< BranchID > BranchIDSet
void append_(map_t const &lookup, BranchID item, BranchIDSet &itemSet) const
std::map< BranchID, BranchIDSet > map_t
void appendToDescendants(BranchID parent, BranchIDSet &descendants) const