CMS 3D CMS Logo

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