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.

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  }

References a, mps_fire::end, and submitPVValidationJobs::t.

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

◆ 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.

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  }

References a, mps_fire::end, and submitPVValidationJobs::t.

◆ 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.

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  }

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

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

◆ 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.

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  }

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

pos
Definition: PixelAliasList.h:18
cms::dd::name
std::string name(Mapping a, V value)
Definition: DDSolidShapes.h:31
mps_fire.end
end
Definition: mps_fire.py:242
a
double a
Definition: hdecay.h:119
value
Definition: value.py:1
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644