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  enumMap["HGCalGeometryMode::Hexagon8CalibCell"] = HGCalGeometryMode::Hexagon8CalibCell;
19  enumMap["HGCalGeometryMode::TrapezoidFineCell"] = HGCalGeometryMode::TrapezoidFineCell;
20  enumMap["HGCalGeometryMode::Hexagon8FineCell"] = HGCalGeometryMode::Hexagon8FineCell;
21 }
22 
23 template <>
25  enumMap["HGCalGeometryMode::Polyhedra"] = HGCalGeometryMode::Polyhedra;
26  enumMap["HGCalGeometryMode::ExtrudedPolygon"] = HGCalGeometryMode::ExtrudedPolygon;
27 }
28 
30  DDValue val(s);
31  if (DDfetch(&sv, val)) {
32  const std::vector<std::string>& fvec = val.strings();
33  if (fvec.empty()) {
34  throw cms::Exception("HGCalGeom") << "getGeometryMode::Failed to get " << s << " tag.";
35  }
36 
39  return result;
40  } else {
41  throw cms::Exception("HGCalGeom") << "getGeometryMode::Failed to fetch " << s << " tag";
42  }
43 };
44 
48  return result;
49 };
50 
52  DDValue val(s);
53  if (DDfetch(&sv, val)) {
54  const std::vector<std::string>& fvec = val.strings();
55  if (fvec.empty()) {
56  throw cms::Exception("HGCalGeom") << "getGeometryWaferMode::Failed to get " << s << " tag.";
57  }
58 
61  return result;
62  } else {
63  throw cms::Exception("HGCalGeom") << "getGeometryWaferMode::Failed to fetch " << s << " tag";
64  }
65 };
66 
70  return result;
71 };
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)