CMS 3D CMS Logo

HGCalGeometryMode.cc
Go to the documentation of this file.
3 
4 template <>
6  enumMap["HGCalGeometryMode::Square"] = HGCalGeometryMode::Square;
7  enumMap["HGCalGeometryMode::Hexagon"] = HGCalGeometryMode::Hexagon;
8  enumMap["HGCalGeometryMode::HexagonFull"] = HGCalGeometryMode::HexagonFull;
9  enumMap["HGCalGeometryMode::Hexagon8"] = HGCalGeometryMode::Hexagon8;
10  enumMap["HGCalGeometryMode::Hexagon8Full"] = HGCalGeometryMode::Hexagon8Full;
11  enumMap["HGCalGeometryMode::Trapezoid"] = HGCalGeometryMode::Trapezoid;
12  enumMap["HGCalGeometryMode::Hexagon8File"] = HGCalGeometryMode::Hexagon8File;
13  enumMap["HGCalGeometryMode::TrapezoidFile"] = HGCalGeometryMode::TrapezoidFile;
14  enumMap["HGCalGeometryMode::Hexagon8Module"] = HGCalGeometryMode::Hexagon8Module;
15  enumMap["HGCalGeometryMode::TrapezoidModule"] = HGCalGeometryMode::TrapezoidModule;
16  enumMap["HGCalGeometryMode::Hexagon8Cassette"] = HGCalGeometryMode::Hexagon8Cassette;
17  enumMap["HGCalGeometryMode::TrapezoidCassette"] = HGCalGeometryMode::TrapezoidCassette;
18 }
19 
20 template <>
22  enumMap["HGCalGeometryMode::Polyhedra"] = HGCalGeometryMode::Polyhedra;
23  enumMap["HGCalGeometryMode::ExtrudedPolygon"] = HGCalGeometryMode::ExtrudedPolygon;
24 }
25 
27  DDValue val(s);
28  if (DDfetch(&sv, val)) {
29  const std::vector<std::string>& fvec = val.strings();
30  if (fvec.empty()) {
31  throw cms::Exception("HGCalGeom") << "getGeometryMode::Failed to get " << s << " tag.";
32  }
33 
36  return result;
37  } else {
38  throw cms::Exception("HGCalGeom") << "getGeometryMode::Failed to fetch " << s << " tag";
39  }
40 };
41 
45  return result;
46 };
47 
49  DDValue val(s);
50  if (DDfetch(&sv, val)) {
51  const std::vector<std::string>& fvec = val.strings();
52  if (fvec.empty()) {
53  throw cms::Exception("HGCalGeom") << "getGeometryWaferMode::Failed to get " << s << " tag.";
54  }
55 
58  return result;
59  } else {
60  throw cms::Exception("HGCalGeom") << "getGeometryWaferMode::Failed to fetch " << s << " tag";
61  }
62 };
63 
67  return result;
68 };
T parseString(const std::string &value)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
WaferMode getGeometryWaferMode(const char *s, const DDsvalues_type &sv)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
GeometryMode getGeometryMode(const char *s, const DDsvalues_type &sv)