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 }
20 
21 template <>
23  enumMap["HGCalGeometryMode::Polyhedra"] = HGCalGeometryMode::Polyhedra;
24  enumMap["HGCalGeometryMode::ExtrudedPolygon"] = HGCalGeometryMode::ExtrudedPolygon;
25 }
26 
28  DDValue val(s);
29  if (DDfetch(&sv, val)) {
30  const std::vector<std::string>& fvec = val.strings();
31  if (fvec.empty()) {
32  throw cms::Exception("HGCalGeom") << "getGeometryMode::Failed to get " << s << " tag.";
33  }
34 
37  return result;
38  } else {
39  throw cms::Exception("HGCalGeom") << "getGeometryMode::Failed to fetch " << s << " tag";
40  }
41 };
42 
46  return result;
47 };
48 
50  DDValue val(s);
51  if (DDfetch(&sv, val)) {
52  const std::vector<std::string>& fvec = val.strings();
53  if (fvec.empty()) {
54  throw cms::Exception("HGCalGeom") << "getGeometryWaferMode::Failed to get " << s << " tag.";
55  }
56 
59  return result;
60  } else {
61  throw cms::Exception("HGCalGeom") << "getGeometryWaferMode::Failed to fetch " << s << " tag";
62  }
63 };
64 
68  return result;
69 };
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)