![]() |
![]() |
#include <DataFormats/Provenance/interface/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.
References ce.
Referenced by appendToDescendants().
00005 { 00006 BranchIDSet const& items = const_cast<map_t &>(lookup)[item]; 00007 // For each parent(child) 00008 for (BranchIDSet::const_iterator ci = items.begin(), ce = items.end(); 00009 ci != ce; ++ci) { 00010 // Insert the BranchID of the parents(children) into the set of ancestors(descendants). 00011 // If the insert succeeds, append recursively. 00012 if (itemSet.insert(*ci).second) { 00013 append_(lookup, *ci, itemSet); 00014 } 00015 } 00016 }
void edm::BranchChildren::appendToDescendants | ( | BranchID | parent, | |
BranchIDSet & | descendants | |||
) | const |
Definition at line 34 of file BranchChildren.cc.
References append_(), and childLookup_.
00034 { 00035 descendants.insert(parent); 00036 append_(childLookup_, parent, descendants); 00037 }
Definition at line 19 of file BranchChildren.cc.
References childLookup_.
Referenced by edm::OutputModule::reallyCloseFile().
00019 { 00020 childLookup_.clear(); 00021 }
Definition at line 29 of file BranchChildren.cc.
References childLookup_.
Referenced by edm::OutputModule::fillDependencyGraph().
00029 { 00030 childLookup_[parent].insert(child); 00031 }
Definition at line 24 of file BranchChildren.cc.
References childLookup_.
Referenced by edm::OutputModule::updateBranchParents().
00024 { 00025 childLookup_.insert(std::make_pair(parent, BranchIDSet())); 00026 }
map_t edm::BranchChildren::childLookup_ [private] |
Definition at line 37 of file BranchChildren.h.
Referenced by appendToDescendants(), clear(), insertChild(), and insertEmpty().