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 
23  public:
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& childLookup() const { return childLookup_; }
42 
43  private:
45 
46  void append_(map_t const& lookup,
47  BranchID item,
48  BranchIDSet& itemSet,
49  std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
50  };
51 
52 } // namespace edm
53 #endif
edm
HLT enums.
Definition: AlignableModifier.h:19
BranchID.h
edm::BranchChildren::clear
void clear()
Definition: BranchChildren.cc:36
edm::BranchChildren::append_
void append_(map_t const &lookup, BranchID item, BranchIDSet &itemSet, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
Definition: BranchChildren.cc:6
edm::BranchID
Definition: BranchID.h:14
edm::BranchChildren::insertEmpty
void insertEmpty(BranchID parent)
Definition: BranchChildren.cc:38
edm::BranchChildren
Definition: BranchChildren.h:18
edm::BranchChildren::childLookup
map_t const & childLookup() const
Definition: BranchChildren.h:41
edm::BranchChildren::appendToDescendants
void appendToDescendants(BranchDescription const &parent, BranchIDSet &descendants, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
Definition: BranchChildren.cc:42
edm::BranchChildren::BranchIDSet
std::set< BranchID > BranchIDSet
Definition: BranchChildren.h:20
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::BranchDescription
Definition: BranchDescription.h:32
edm::BranchChildren::map_t
std::map< BranchID, BranchIDSet > map_t
Definition: BranchChildren.h:21
child
Definition: simpleInheritance.h:11
class-composition.parent
parent
Definition: class-composition.py:98
edm::BranchChildren::childLookup_
map_t childLookup_
Definition: BranchChildren.h:44
edm::BranchChildren::insertChild
void insertChild(BranchID parent, BranchID child)
Definition: BranchChildren.cc:40