Go to the documentation of this file.00001
00002
00003 #include "DetectorDescription/Core/interface/DDAxes.h"
00004
00005 namespace DDI { } using namespace DDI;
00006
00007
00008 AxesNames::AxesNames() {
00009 axesmap_["x"] = x;
00010 axesmap_["y"] = y;
00011 axesmap_["z"] = z;
00012 axesmap_["rho"] = rho;
00013 axesmap_["radial3D"] = radial3D;
00014 axesmap_["phi"] = phi;
00015 axesmap_["undefined"] = undefined;
00016 }
00017
00018 AxesNames::~AxesNames() { }
00019
00020 const std::string AxesNames::name(const DDAxes& s)
00021 {
00022 static std::map<std::string, DDAxes>::const_iterator it;
00023
00024 for (it = axesmap_.begin(); it != axesmap_.end(); ++it)
00025 {
00026 if (it->second == s)
00027 break;
00028 }
00029 return it->first;
00030 }
00031
00032 const DDAxes AxesNames::index(const std::string & s)
00033 {
00034 return axesmap_[s];
00035 }
00036
00037 const std::string DDAxesNames::name(const DDAxes& s)
00038 {
00039 return instance().name(s);
00040 }
00041
00042 const DDAxes DDAxesNames::index(const std::string & s)
00043 {
00044 return instance().index(s);
00045 }