CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 31 of file DDSolidShapes.h.

References SplitLinear::begin, dataset::end, and submitPVValidationJobs::t.

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

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  }
double a
Definition: hdecay.h:119
string end
Definition: dataset.py:937
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 SplitLinear::begin, dataset::end, 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  }
double a
Definition: hdecay.h:119
string end
Definition: dataset.py:937
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 SplitLinear::begin, dataset::end, 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  }
double a
Definition: hdecay.h:119
string end
Definition: dataset.py:937
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 SplitLinear::begin, dataset::end, 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  }
double a
Definition: hdecay.h:119
string end
Definition: dataset.py:937