File indexing completed on 2025-06-08 22:25:03
0001 #ifndef DataFormats_Provenance_BranchChildren_h
0002 #define DataFormats_Provenance_BranchChildren_h
0003
0004
0005
0006
0007
0008
0009 #if (not defined __INCLUDE_LEVEL__ or __INCLUDE_LEVEL__ > 0) and \
0010 not defined(DataFormats_Provenance_ProductDependencies_h)
0011 #error The name BranchChildren is deprecated, please use ProductDependencies instead.
0012 #endif
0013
0014 #include <map>
0015 #include <set>
0016 #include "DataFormats/Provenance/interface/BranchID.h"
0017 #include "DataFormats/Provenance/interface/ProductDescriptionFwd.h"
0018
0019 namespace edm {
0020
0021 class BranchChildren {
0022 private:
0023 typedef std::set<BranchID> BranchIDSet;
0024 typedef std::map<BranchID, BranchIDSet> map_t;
0025
0026 public:
0027
0028 void clear();
0029
0030
0031 void insertEmpty(BranchID parent);
0032
0033
0034 void insertChild(BranchID parent, BranchID child);
0035
0036
0037
0038
0039 void appendToDescendants(ProductDescription const& parent,
0040 BranchIDSet& descendants,
0041 std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
0042
0043
0044 map_t const& childLookup() const { return childLookup_; }
0045
0046 map_t& mutableChildLookup() { return childLookup_; }
0047
0048 private:
0049 map_t childLookup_;
0050
0051 void append_(map_t const& lookup,
0052 BranchID item,
0053 BranchIDSet& itemSet,
0054 std::map<BranchID, BranchID> const& droppedToKeptAlias) const;
0055 };
0056
0057 }
0058 #endif