CMS 3D CMS Logo

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 
16  class BranchDescription;
17 
19  private:
20  typedef std::set<BranchID> BranchIDSet;
21  typedef std::map<BranchID, BranchIDSet> map_t;
22  public:
23 
24  // Clear all information.
25  void clear();
26 
27  // Insert a parent with no children.
29 
30  // Insert a new child for the given parent.
32 
33  // Look up all the descendants of the given parent, and insert them
34  // into descendants. N.B.: this does not clear out descendants first;
35  // it only appends *new* elements to the collection.
37  BranchIDSet& descendants,
38  std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
39 
40  // const accessor for the data
41  map_t const&
42  childLookup() const {
43  return childLookup_;
44  }
45 
46  private:
47  map_t childLookup_;
48 
49  void append_(map_t const& lookup,
50  BranchID item,
51  BranchIDSet& itemSet,
52  std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
53  };
54 
55 }
56 #endif
void insertEmpty(BranchID parent)
void insertChild(BranchID parent, BranchID child)
void append_(map_t const &lookup, BranchID item, BranchIDSet &itemSet, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
map_t const & childLookup() const
std::set< BranchID > BranchIDSet
void appendToDescendants(BranchDescription const &parent, BranchIDSet &descendants, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
HLT enums.
std::map< BranchID, BranchIDSet > map_t