CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HGCalGeometryMode.h
Go to the documentation of this file.
1 #ifndef Geometry_HGCalCommonData_HGCalGeometryMode_H
2 #define Geometry_HGCalCommonData_HGCalGeometryMode_H
3 
4 #include <algorithm>
5 #include <map>
6 #include <string>
8 
9 template <typename T>
11  std::map<std::string, T> enumMap;
12 
13 public:
15 
17  typename std::map<std::string, T>::const_iterator itr = enumMap.find(value);
18  if (itr == enumMap.end())
19  throw cms::Exception("Configuration") << "the value " << value << " is not defined.";
20  return itr->second;
21  }
22 };
23 
24 namespace HGCalGeometryMode {
25  enum GeometryMode {
26  Square = 0,
27  Hexagon = 1,
29  Hexagon8 = 3,
31  Trapezoid = 5,
37  };
38  enum WaferMode { Polyhedra = 0, ExtrudedPolygon = 1 };
39 } // namespace HGCalGeometryMode
40 
41 #endif
T parseString(const std::string &value)
std::map< std::string, T > enumMap
long double T