CMS 3D CMS Logo

Classes | Functions
cms::dd Namespace Reference

Classes

struct  NameValuePair
 
struct  ValuePair
 

Functions

template<class Mapping , class V >
std::string name (Mapping a, V value)
 
template<class Mapping , class V >
Mapping::value_type::name_type name_from_value (Mapping a, V value)
 
template<class Mapping >
Mapping::value_type::value_type value (Mapping a, const std::string &name)
 
template<class Mapping , class N >
Mapping::value_type::value_type value (Mapping a, N name)
 

Function Documentation

◆ name()

template<class Mapping , class V >
std::string cms::dd::name ( Mapping  a,
value 
)

Definition at line 31 of file DDSolidShapes.h.

References a, and submitPVValidationJobs::t.

Referenced by HcalTB02ParametersFromDD::build(), TrackerShapeToBounds::buildBounds(), DreamSD::initMap(), HcalGeomParameters::loadGeometry(), HGCalGeomParameters::loadGeometryHexagon8(), HGCalGeomParameters::loadGeometryHexagonModule(), and value().

31  {
32  auto pos = std::find_if(
33  std::begin(a), std::end(a), [&value](const typename Mapping::value_type& t) { return (t.value == value); });
34  if (pos != std::end(a)) {
35  return pos->name;
36  }
37 
38  return std::begin(a)->name;
39  }
Definition: value.py:1
double a
Definition: hdecay.h:121

◆ name_from_value()

template<class Mapping , class V >
Mapping::value_type::name_type cms::dd::name_from_value ( Mapping  a,
value 
)

Definition at line 62 of file DDSolidShapes.h.

References a, and submitPVValidationJobs::t.

62  {
63  auto pos = std::find_if(
64  std::begin(a), std::end(a), [&value](const typename Mapping::value_type& t) { return (t.value == value); });
65  if (pos != std::end(a)) {
66  return pos->name;
67  }
68  return std::begin(a)->name;
69  }
Definition: value.py:1
double a
Definition: hdecay.h:121

◆ value() [1/2]

template<class Mapping >
Mapping::value_type::value_type cms::dd::value ( Mapping  a,
const std::string &  name 
)

Definition at line 42 of file DDSolidShapes.h.

References a, name(), and submitPVValidationJobs::t.

Referenced by cms::DDFilteredView::legacyShape(), GeometricTimingDet::shape(), GeometricDet::shape(), cms::DDFilteredView::shape(), and DDCoreToDDXMLOutput::solid().

42  {
43  auto pos = std::find_if(
44  std::begin(a), std::end(a), [&name](const typename Mapping::value_type& t) { return (t.name == name); });
45  if (pos != std::end(a)) {
46  return pos->value;
47  }
48  return std::begin(a)->value;
49  }
std::string name(Mapping a, V value)
Definition: DDSolidShapes.h:31
double a
Definition: hdecay.h:121

◆ value() [2/2]

template<class Mapping , class N >
Mapping::value_type::value_type cms::dd::value ( Mapping  a,
N  name 
)

Definition at line 52 of file DDSolidShapes.h.

References a, name(), and submitPVValidationJobs::t.

52  {
53  auto pos = std::find_if(
54  std::begin(a), std::end(a), [&name](const typename Mapping::value_type& t) { return (t.name == name); });
55  if (pos != std::end(a)) {
56  return pos->value;
57  }
58  return std::begin(a)->value;
59  }
std::string name(Mapping a, V value)
Definition: DDSolidShapes.h:31
double a
Definition: hdecay.h:121