CMS 3D CMS Logo

CmsTrackerStringToEnum Class Reference

Builds map between Det type and an enum. More...

#include <Geometry/TrackerNumberingBuilder/interface/CmsTrackerStringToEnum.h>

List of all members.

Public Types

typedef std::map< std::string,
GeometricDet::GeometricEnumType
MapEnumType
typedef std::map
< GeometricDet::GeometricEnumType,
std::string > 
ReverseMapEnumType

Public Member Functions

std::string const & name (GeometricDet::GeometricEnumType) const
GeometricDet::GeometricEnumType type (std::string const &) const

Static Private Member Functions

static MapEnumType const & map ()
static ReverseMapEnumType const & reverseMap ()

Static Private Attributes

static Impl m_impl

Classes

struct  Impl


Detailed Description

Builds map between Det type and an enum.

Definition at line 10 of file CmsTrackerStringToEnum.h.


Member Typedef Documentation

typedef std::map<std::string, GeometricDet::GeometricEnumType> CmsTrackerStringToEnum::MapEnumType

Definition at line 12 of file CmsTrackerStringToEnum.h.

typedef std::map<GeometricDet::GeometricEnumType, std::string> CmsTrackerStringToEnum::ReverseMapEnumType

Definition at line 13 of file CmsTrackerStringToEnum.h.


Member Function Documentation

static MapEnumType const& CmsTrackerStringToEnum::map (  )  [inline, static, private]

Definition at line 19 of file CmsTrackerStringToEnum.h.

References CmsTrackerStringToEnum::Impl::_map, and m_impl.

Referenced by type().

00019 { return m_impl._map;}

std::string const & CmsTrackerStringToEnum::name ( GeometricDet::GeometricEnumType  t  )  const

Definition at line 78 of file CmsTrackerStringToEnum.cc.

References end, p, and reverseMap().

00078                                                                                     {
00079   static std::string const u("Unknown");
00080   ReverseMapEnumType::const_iterator p=reverseMap().find(t); 
00081   if (p!= reverseMap().end())
00082     return p->second;
00083   return u;
00084 }

static ReverseMapEnumType const& CmsTrackerStringToEnum::reverseMap (  )  [inline, static, private]

Definition at line 20 of file CmsTrackerStringToEnum.h.

References CmsTrackerStringToEnum::Impl::_reverseMap, and m_impl.

Referenced by name().

00020 { return m_impl._reverseMap;}

GeometricDet::GeometricEnumType CmsTrackerStringToEnum::type ( std::string const &  s  )  const

Definition at line 72 of file CmsTrackerStringToEnum.cc.

References end, map(), p, and GeometricDet::unknown.

Referenced by ListIds::beginJob(), CmsTrackerPetalBuilder::buildComponent(), CmsTrackerBuilder::buildComponent(), CmsTrackerWheelBuilder::buildComponent(), CmsTrackerSubStrctBuilder::buildComponent(), CmsTrackerLayerBuilder::buildComponent(), CmsDetConstruction::buildComponent(), CmsTrackerDiskBuilder::buildComponent(), CmsTrackerPanelBuilder::buildComponent(), CmsDetConstruction::buildSmallDets(), and DDDCmsTrackerContruction::construct().

00072                                                                                    {
00073   MapEnumType::const_iterator p=map().find(s);
00074   if (p!= map().end()) return p->second;
00075   return GeometricDet::unknown;
00076 }


Member Data Documentation

CmsTrackerStringToEnum::Impl CmsTrackerStringToEnum::m_impl [static, private]

Definition at line 29 of file CmsTrackerStringToEnum.h.

Referenced by map(), and reverseMap().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:25 2009 for CMSSW by  doxygen 1.5.4