CMS 3D CMS Logo

DDCompactView.cc
Go to the documentation of this file.
3 
4 #include <cmath>
5 
6 template <>
7 std::vector<int> cms::DDCompactView::getVector<int>(std::string_view key) const {
8  cms::DDVectorsMap vmap = this->detector()->vectors();
9  std::vector<int> temp;
10  for (auto const& it : vmap) {
12  for (const auto& i : it.second) {
13  temp.emplace_back(std::round(i));
14  }
15  }
16  }
17  return temp;
18 }
19 
20 template <>
21 std::vector<double> cms::DDCompactView::getVector<double>(std::string_view key) const {
22  cms::DDVectorsMap vmap = this->detector()->vectors();
23  std::vector<double> temp;
24  for (auto const& it : vmap) {
26  for (const auto& i : it.second) {
27  temp.emplace_back(i);
28  }
29  }
30  }
31  return temp;
32 }
std::string_view noNamespace(std::string_view)
Definition: Filter.cc:61
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double >> DDVectorsMap
Definition: DDNamespace.h:14
bool compareEqual(std::string_view, std::string_view)