#include <BranchChildren.h>
Public Member Functions | |
void | appendToDescendants (BranchID parent, BranchIDSet &descendants) const |
void | clear () |
void | insertChild (BranchID parent, BranchID child) |
void | insertEmpty (BranchID parent) |
Private Types | |
typedef std::set< BranchID > | BranchIDSet |
typedef std::map< BranchID, BranchIDSet > | map_t |
Private Member Functions | |
void | append_ (map_t const &lookup, BranchID item, BranchIDSet &itemSet) const |
Private Attributes | |
map_t | childLookup_ |
Definition at line 16 of file BranchChildren.h.
typedef std::set<BranchID> edm::BranchChildren::BranchIDSet [private] |
Definition at line 18 of file BranchChildren.h.
typedef std::map<BranchID, BranchIDSet> edm::BranchChildren::map_t [private] |
Definition at line 36 of file BranchChildren.h.
void edm::BranchChildren::append_ | ( | map_t const & | lookup, |
BranchID | item, | ||
BranchIDSet & | itemSet | ||
) | const [private] |
Definition at line 5 of file BranchChildren.cc.
Referenced by appendToDescendants().
{ BranchIDSet const& items = const_cast<map_t &>(lookup)[item]; // For each parent(child) for (BranchIDSet::const_iterator ci = items.begin(), ce = items.end(); ci != ce; ++ci) { // Insert the BranchID of the parents(children) into the set of ancestors(descendants). // If the insert succeeds, append recursively. if (itemSet.insert(*ci).second) { append_(lookup, *ci, itemSet); } } }
void edm::BranchChildren::appendToDescendants | ( | BranchID | parent, |
BranchIDSet & | descendants | ||
) | const |
Definition at line 34 of file BranchChildren.cc.
References append_(), and childLookup_.
{ descendants.insert(parent); append_(childLookup_, parent, descendants); }
void edm::BranchChildren::clear | ( | void | ) |
Definition at line 19 of file BranchChildren.cc.
References childLookup_.
Referenced by edm::OutputModule::reallyCloseFile().
{ childLookup_.clear(); }
Definition at line 29 of file BranchChildren.cc.
References childLookup_, and dbtoconf::parent.
Referenced by edm::OutputModule::fillDependencyGraph().
{ childLookup_[parent].insert(child); }
void edm::BranchChildren::insertEmpty | ( | BranchID | parent | ) |
Definition at line 24 of file BranchChildren.cc.
References childLookup_.
Referenced by edm::OutputModule::updateBranchParents().
{ childLookup_.insert(std::make_pair(parent, BranchIDSet())); }
map_t edm::BranchChildren::childLookup_ [private] |
Definition at line 37 of file BranchChildren.h.
Referenced by appendToDescendants(), clear(), insertChild(), and insertEmpty().