CMS 3D CMS Logo

edm::BranchChildren Class Reference

#include <DataFormats/Provenance/interface/BranchChildren.h>

List of all members.

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< BranchIDBranchIDSet
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_


Detailed Description

Definition at line 16 of file BranchChildren.h.


Member Typedef Documentation

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.


Member Function Documentation

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   }

void edm::BranchChildren::clear ( void   ) 

Definition at line 19 of file BranchChildren.cc.

References childLookup_.

Referenced by edm::OutputModule::reallyCloseFile().

00019                         {
00020     childLookup_.clear();
00021   }

void edm::BranchChildren::insertChild ( BranchID  parent,
BranchID  child 
)

Definition at line 29 of file BranchChildren.cc.

References childLookup_.

Referenced by edm::OutputModule::fillDependencyGraph().

00029                                                              {
00030     childLookup_[parent].insert(child);
00031   }

void edm::BranchChildren::insertEmpty ( BranchID  parent  ) 

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   }


Member Data Documentation

map_t edm::BranchChildren::childLookup_ [private]

Definition at line 37 of file BranchChildren.h.

Referenced by appendToDescendants(), clear(), insertChild(), and insertEmpty().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:39:39 2009 for CMSSW by  doxygen 1.5.4