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 namespace DDI { } using namespace DDI;
4 
6  : axesmap_{{"x", x }, {"y", y}, {"z", z}, {"rho", rho}, {"radial3D", radial3D}, {"phi", phi}, {"undefined", undefined }}
7 {}
8 
10 
11 const std::string
12 AxesNames::name(const DDAxes& s)
13 {
14  std::map<std::string, DDAxes>::const_iterator it;
15 
16  for(it = axesmap_.begin(); it != axesmap_.end(); ++it)
17  {
18  if(it->second == s)
19  break;
20  }
21  return it->first;
22 }
23 
24 DDAxes
26 {
27  return axesmap_[s];
28 }
29 
30 const std::string
31 DDAxesNames::name(const DDAxes& s)
32 {
33  return instance().name(s);
34 }
35 
36 DDAxes
38 {
39  return instance().index(s);
40 }
AxesNames()
Definition: DDAxes.cc:5
Definition: DDAxes.h:10
const std::string name(const DDAxes &s)
float float float z
static value_type & instance()
DDAxes index(const std::string &s)
static const std::string name(const DDAxes &s)
std::map< std::string, DDAxes > axesmap_
Definition: DDAxes.h:24
DDAxes
analagous to geant4/source/global/HEPGeometry/include/geomdefs.hh
Definition: DDAxes.h:10
static DDAxes index(const std::string &s)
Definition: DDAxes.h:10
Definition: DDAxes.h:10