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") << "the value " << value << " is not defined.";
20  return itr->second;
21  }
22 };
23 
24 namespace HGCalGeometryMode {
25  enum GeometryMode { Square = 0, Hexagon = 1, HexagonFull = 2, Hexagon8 = 3, Hexagon8Full = 4, Trapezoid = 5 };
26  enum WaferMode { Polyhedra = 0, ExtrudedPolygon = 1 };
27 } // namespace HGCalGeometryMode
28 
29 #endif
HGCalGeometryMode
Definition: HGCalGeometryMode.h:24
HGCalStringToEnumParser
Definition: HGCalGeometryMode.h:10
HGCalGeometryMode::Trapezoid
Definition: HGCalGeometryMode.h:25
HGCalGeometryMode::WaferMode
WaferMode
Definition: HGCalGeometryMode.h:26
HGCalGeometryMode::Square
Definition: HGCalGeometryMode.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HGCalGeometryMode::Hexagon8Full
Definition: HGCalGeometryMode.h:25
HGCalGeometryMode::GeometryMode
GeometryMode
Definition: HGCalGeometryMode.h:25
value
Definition: value.py:1
HGCalStringToEnumParser::enumMap
std::map< std::string, T > enumMap
Definition: HGCalGeometryMode.h:11
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
HGCalGeometryMode::Hexagon
Definition: HGCalGeometryMode.h:25
HGCalGeometryMode::HexagonFull
Definition: HGCalGeometryMode.h:25
T
long double T
Definition: Basic3DVectorLD.h:48
HGCalGeometryMode::Polyhedra
Definition: HGCalGeometryMode.h:26
HGCalStringToEnumParser::HGCalStringToEnumParser
HGCalStringToEnumParser(void)
HGCalGeometryMode::ExtrudedPolygon
Definition: HGCalGeometryMode.h:26
Exception.h
HGCalGeometryMode::Hexagon8
Definition: HGCalGeometryMode.h:25
cms::Exception
Definition: Exception.h:70
HGCalStringToEnumParser::parseString
T parseString(const std::string &value)
Definition: HGCalGeometryMode.h:16