test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDAxes.cc
Go to the documentation of this file.
2 
3 #include <utility>
4 
6  : axesmap_{{"x", DDAxes::x }, {"y", DDAxes::y}, {"z", DDAxes::z}, {"rho", DDAxes::rho}, {"radial3D", DDAxes::radial3D}, {"phi", DDAxes::phi}, {"undefined", DDAxes::undefined }}
7 {}
8 
10 
11 const std::string
12 AxesNames::name(const DDAxes& s)
13 {
14  for( const auto& it : axesmap_ )
15  {
16  if( it.second == s )
17  return it.first;
18  }
19  return "undefined";
20 }
21 
22 const std::string
23 DDAxesNames::name(const DDAxes& s)
24 {
25  return instance().name(s);
26 }
AxesNames()
Definition: DDAxes.cc:5
const std::string name(const DDAxes &s)
static value_type & instance()
static const std::string name(const DDAxes &s)
std::map< std::string, DDAxes > axesmap_
Definition: DDAxes.h:22
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:11