File indexing completed on 2024-04-06 12:05:01
0001 #ifndef DataFormats_Provenance_BranchChildren_h
0002 #define DataFormats_Provenance_BranchChildren_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <map>
0011 #include <set>
0012 #include "DataFormats/Provenance/interface/BranchID.h"
0013
0014 namespace edm {
0015
0016 class BranchDescription;
0017
0018 class BranchChildren {
0019 private:
0020 typedef std::set<BranchID> BranchIDSet;
0021 typedef std::map<BranchID, BranchIDSet> map_t;
0022
0023 public:
0024
0025 void clear();
0026
0027
0028 void insertEmpty(BranchID parent);
0029
0030
0031 void insertChild(BranchID parent, BranchID child);
0032
0033
0034
0035
0036 void appendToDescendants(BranchDescription const& parent,
0037 BranchIDSet& descendants,
0038 std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
0039
0040
0041 map_t const& childLookup() const { return childLookup_; }
0042
0043 private:
0044 map_t childLookup_;
0045
0046 void append_(map_t const& lookup,
0047 BranchID item,
0048 BranchIDSet& itemSet,
0049 std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
0050 };
0051
0052 }
0053 #endif