File indexing completed on 2024-04-06 12:05:02
0001 #ifndef DataFormats_Provenance_ProcessHistoryRegistry_h
0002 #define DataFormats_Provenance_ProcessHistoryRegistry_h
0003
0004
0005
0006
0007
0008 #include <map>
0009 #include <vector>
0010
0011 #include "DataFormats/Provenance/interface/ProcessHistory.h"
0012 #include "DataFormats/Provenance/interface/ProcessHistoryID.h"
0013
0014 namespace edm {
0015 typedef std::map<ProcessHistoryID, ProcessHistory> ProcessHistoryMap;
0016 typedef std::vector<ProcessHistory> ProcessHistoryVector;
0017
0018 class ProcessHistoryRegistry {
0019 public:
0020 typedef ProcessHistory value_type;
0021 typedef ProcessHistoryMap collection_type;
0022 typedef ProcessHistoryVector vector_type;
0023
0024 ProcessHistoryRegistry();
0025 ProcessHistoryRegistry(ProcessHistoryRegistry const&) = delete;
0026 ProcessHistoryRegistry& operator=(ProcessHistoryRegistry const&) = delete;
0027 bool registerProcessHistory(ProcessHistory const& processHistory);
0028 bool getMapped(ProcessHistoryID const& key, ProcessHistory& value) const;
0029 ProcessHistory const* getMapped(ProcessHistoryID const& key) const;
0030 ProcessHistoryID const& reducedProcessHistoryID(ProcessHistoryID const& fullID) const;
0031 ProcessHistoryMap::const_iterator begin() const { return data_.begin(); }
0032 ProcessHistoryMap::const_iterator end() const { return data_.end(); }
0033
0034 private:
0035 ProcessHistoryMap data_;
0036 std::map<ProcessHistoryID, ProcessHistoryID> extra_;
0037 };
0038 }
0039 #endif