![]() |
![]() |
00001 #ifndef FWCore_Framework_BranchIDListHelper_h 00002 #define FWCore_Framework_BranchIDListHelper_h 00003 00004 #include "DataFormats/Provenance/interface/BranchListIndex.h" 00005 #include "DataFormats/Provenance/interface/BranchIDList.h" 00006 #include "DataFormats/Provenance/interface/ProductID.h" 00007 #include "DataFormats/Provenance/interface/ProvenanceFwd.h" 00008 00009 #include <map> 00010 00011 namespace edm { 00012 00013 class BranchIDListHelper { 00014 public: 00015 typedef std::pair<BranchListIndex, ProductIndex> IndexPair; 00016 typedef std::multimap<BranchID, IndexPair> BranchIDToIndexMap; 00017 typedef std::map<BranchListIndex, BranchListIndex> BranchListIndexMapper; 00018 BranchIDListHelper(); 00019 bool updateFromInput(BranchIDLists const& bidlists); 00020 void updateRegistries(ProductRegistry const& reg); 00021 void fixBranchListIndexes(BranchListIndexes& indexes); 00022 00023 BranchIDLists const& branchIDLists() const {return branchIDLists_;} 00024 BranchIDLists& branchIDLists() {return branchIDLists_;} 00025 BranchIDToIndexMap const& branchIDToIndexMap() const {return branchIDToIndexMap_;} 00026 00027 private: 00028 BranchIDLists branchIDLists_; 00029 BranchIDToIndexMap branchIDToIndexMap_; 00030 BranchListIndexMapper branchListIndexMapper_; 00031 }; 00032 } 00033 00034 #endif