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 static bool updateFromInput(BranchIDLists const& bidlists, std::string const& fileName); 00020 static void updateRegistries(ProductRegistry const& reg); 00021 static void fixBranchListIndexes(BranchListIndexes& indexes); 00022 static void clearRegistries(); // Use only for tests 00023 00024 BranchIDToIndexMap const& branchIDToIndexMap() const {return branchIDToIndexMap_;} 00025 00026 private: 00027 BranchIDToIndexMap branchIDToIndexMap_; 00028 BranchListIndexMapper branchListIndexMapper_; 00029 }; 00030 } 00031 00032 #endif