CMS 3D CMS Logo

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")
20  << "the value " << value << " is not defined.";
21  return itr->second;
22  }
23 };
24 
25 namespace HGCalGeometryMode {
27  Square = 0,
28  Hexagon = 1,
30  Hexagon8 = 3,
33 };
35 } // namespace HGCalGeometryMode
36 
37 #endif
T parseString(const std::string &value)
std::map< std::string, T > enumMap
Definition: value.py:1
long double T