// EventHeader.h #ifndef EventHeader_EventHeader_H #define EventHeader_EventHeader_H // ATLAS event header. Collection of peresistent location // strings indexed by content (type and key). The persistency // mechanism is responsible for interpreting the location. // For POOL, these could be token strings. // // If string is not appropriate, this class can be replaced // by a template with the appropriate type as argument. #include #include #include "EventHeader/ContentId.h" class EventHeader { public: // typedefs typedef std::string Location; typedef std::map Map; typedef Map::size_type size_type; typedef Map::const_iterator const_iterator; public: // functions // Constructor. EventHeader(); // Add an entry. // Returns 0 if content is invalid or already appears. // Returns the size of the container for success. size_type insert(const ContentId& cid, Location loc); // Size. size_type size() const { return m_map.size(); } // Find an entry. // Returns the iterator for the specified content. const_iterator find(const ContentId& cid); // Return begin iterator over pair. const_iterator begin() const { return m_map.begin(); } // Return end iterator. const_iterator end() const { return m_map.end(); } private: //data Map m_map; }; // Output stream. std::ostream& operator<<(ostream& lhs, const EventHeader& rhs); #endif