00001 #ifndef CollectionParameterMap_h 00002 #define CollectionParameterMap_h 1 00003 00004 #include "EVENT/LCCollection.h" 00005 00006 #include <map> 00007 #include <string> 00008 00009 namespace UTIL{ 00010 00011 00023 class CollectionParameterMap { 00024 00025 public: 00026 CollectionParameterMap() = default ; 00027 CollectionParameterMap(const CollectionParameterMap& ) = delete ; 00028 CollectionParameterMap& operator=(const CollectionParameterMap& ) = delete ; 00029 00030 typedef std::map< std::string, int > map_type ; 00031 00035 CollectionParameterMap( const std::string& keyName , const std::string& valueName, EVENT::LCCollection* col ) ; 00036 00040 CollectionParameterMap( const std::string& keyName , const std::string& valueName, const EVENT::LCCollection* col ) ; 00041 00044 ~CollectionParameterMap() ; 00045 00048 map_type& map() { return _map ; } 00049 00050 00051 protected: 00052 00053 00054 void init( const EVENT::LCCollection* col ) ; 00055 00056 std::string _keyName{} ; 00057 std::string _valueName{} ; 00058 EVENT::LCCollection* _col{NULL} ; 00059 map_type _map{} ; 00060 00061 00062 } ; 00063 00064 } // namespace 00065 #endif 00066 00067