CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Private Member Functions | Static Private Attributes
CmsTrackerStringToEnum Class Reference

#include <CmsTrackerStringToEnum.h>

Classes

struct  Impl
 

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 const Impl m_impl
 

Detailed Description

Builds map between Det type and an enum

Definition at line 10 of file CmsTrackerStringToEnum.h.

Member Typedef Documentation

Definition at line 12 of file CmsTrackerStringToEnum.h.

Definition at line 13 of file CmsTrackerStringToEnum.h.

Member Function Documentation

static MapEnumType const& CmsTrackerStringToEnum::map ( )
inlinestaticprivate

Definition at line 19 of file CmsTrackerStringToEnum.h.

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

Referenced by type().

std::string const & CmsTrackerStringToEnum::name ( GeometricDet::GeometricEnumType  t) const
static ReverseMapEnumType const& CmsTrackerStringToEnum::reverseMap ( )
inlinestaticprivate

Definition at line 20 of file CmsTrackerStringToEnum.h.

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

Referenced by name().

20 { return m_impl._reverseMap; }
GeometricDet::GeometricEnumType CmsTrackerStringToEnum::type ( std::string const &  s) const

Definition at line 122 of file CmsTrackerStringToEnum.cc.

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

Referenced by ListIds::analyze(), and DDDCmsTrackerContruction::construct().

122  {
123  MapEnumType::const_iterator p = map().find(s);
124  if (p != map().end())
125  return p->second;
126  return GeometricDet::unknown;
127 }
static MapEnumType const & map()
string end
Definition: dataset.py:937

Member Data Documentation

const CmsTrackerStringToEnum::Impl CmsTrackerStringToEnum::m_impl
staticprivate

Definition at line 29 of file CmsTrackerStringToEnum.h.

Referenced by map(), and reverseMap().