CMS 3D CMS Logo

Enumerations | Functions
HGCalGeometryMode Namespace Reference

Enumerations

enum  GeometryMode {
  Square = 0, Hexagon = 1, HexagonFull = 2, Hexagon8 = 3,
  Hexagon8Full = 4, Trapezoid = 5, Hexagon8File = 6, TrapezoidFile = 7,
  Hexagon8Module = 8, TrapezoidModule = 9, Hexagon8Cassette = 10, TrapezoidCassette = 11,
  Hexagon8CalibCell = 12
}
 
enum  WaferMode { Polyhedra = 0, ExtrudedPolygon = 1 }
 

Functions

GeometryMode getGeometryMode (const char *s, const DDsvalues_type &sv)
 
GeometryMode getGeometryMode (const std::string &s)
 
WaferMode getGeometryWaferMode (const char *s, const DDsvalues_type &sv)
 
WaferMode getGeometryWaferMode (std::string &s)
 

Enumeration Type Documentation

◆ GeometryMode

◆ WaferMode

Enumerator
Polyhedra 
ExtrudedPolygon 

Definition at line 42 of file HGCalGeometryMode.h.

Function Documentation

◆ getGeometryMode() [1/2]

HGCalGeometryMode::GeometryMode HGCalGeometryMode::getGeometryMode ( const char *  s,
const DDsvalues_type sv 
)

Definition at line 27 of file HGCalGeometryMode.cc.

References DDfetch(), Exception, HGCalStringToEnumParser< T >::parseString(), mps_fire::result, alignCSCRings::s, pfDeepBoostedJetPreprocessParams_cfi::sv, and heppy_batch::val.

Referenced by HGCalParametersFromDD::build(), and HGCalTBParametersFromDD::build().

27  {
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 };
T parseString(const std::string &value)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79

◆ getGeometryMode() [2/2]

HGCalGeometryMode::GeometryMode HGCalGeometryMode::getGeometryMode ( const std::string &  s)

◆ getGeometryWaferMode() [1/2]

HGCalGeometryMode::WaferMode HGCalGeometryMode::getGeometryWaferMode ( const char *  s,
const DDsvalues_type sv 
)

Definition at line 49 of file HGCalGeometryMode.cc.

References DDfetch(), Exception, HGCalStringToEnumParser< T >::parseString(), mps_fire::result, alignCSCRings::s, pfDeepBoostedJetPreprocessParams_cfi::sv, and heppy_batch::val.

Referenced by HGCalParametersFromDD::build(), and HGCalTBParametersFromDD::build().

49  {
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 };
T parseString(const std::string &value)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79

◆ getGeometryWaferMode() [2/2]

HGCalGeometryMode::WaferMode HGCalGeometryMode::getGeometryWaferMode ( std::string &  s)