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
}
 
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 41 of file HGCalGeometryMode.h.

Function Documentation

◆ getGeometryMode() [1/2]

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

Definition at line 26 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().

26  {
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 };
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 48 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().

48  {
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 };
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)