CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/Geometry/TrackerNumberingBuilder/interface/CmsTrackerStringToEnum.h

Go to the documentation of this file.
00001 #ifndef Geometry_TrackerNumberingBuilder_CmsTrackerStringToEnum_H
00002 #define Geometry_TrackerNumberingBuilder_CmsTrackerStringToEnum_H
00003 
00004 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
00005 #include <string>
00006 #include <map>
00010 class CmsTrackerStringToEnum {
00011  public:
00012   typedef std::map<std::string, GeometricDet::GeometricEnumType> MapEnumType;
00013   typedef std::map<GeometricDet::GeometricEnumType, std::string> ReverseMapEnumType;
00014   
00015   GeometricDet::GeometricEnumType type(std::string const&) const;
00016   std::string const & name(GeometricDet::GeometricEnumType) const;
00017 
00018  private:
00019   static MapEnumType const & map() { return m_impl._map;}
00020   static ReverseMapEnumType const & reverseMap() { return m_impl._reverseMap;}
00021 
00022   // a quick fix
00023   struct Impl {
00024     Impl();
00025     MapEnumType _map;
00026     ReverseMapEnumType _reverseMap;
00027   };
00028 
00029   static Impl m_impl;
00030 
00031 };
00032 #endif