CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cms::DDCompactView Class Reference

#include <DDCompactView.h>

Public Member Functions

 DDCompactView (const cms::DDDetector &det)
 
const cms::DDDetectordetector () const
 
template<typename T >
T const & get (const std::string &) const
 
template<typename T >
T const & get (const std::string &, const std::string &) const
 
template<typename T >
std::vector< TgetVector (const std::string &) const
 
template<>
std::vector< int > getVector (const std::string &key) const
 
template<>
std::vector< double > getVector (const std::string &key) const
 
DDSpecParRegistry const & specpars () const
 

Private Attributes

const cms::DDDetectorm_det
 

Detailed Description

Definition at line 31 of file DDCompactView.h.

Constructor & Destructor Documentation

◆ DDCompactView()

cms::DDCompactView::DDCompactView ( const cms::DDDetector det)
inline

Definition at line 33 of file DDCompactView.h.

33 : m_det(det) {}
const cms::DDDetector & m_det
Definition: DDCompactView.h:45

Member Function Documentation

◆ detector()

const cms::DDDetector* cms::DDCompactView::detector ( ) const
inline

◆ get() [1/2]

template<typename T >
T const& cms::DDCompactView::get ( const std::string &  ) const

◆ get() [2/2]

template<typename T >
T const& cms::DDCompactView::get ( const std::string &  ,
const std::string &   
) const

◆ getVector() [1/3]

template<typename T >
std::vector<T> cms::DDCompactView::getVector ( const std::string &  ) const

◆ getVector() [2/3]

template<>
std::vector<int> cms::DDCompactView::getVector ( const std::string &  key) const

Definition at line 9 of file DDCompactView.cc.

References hgcalTestNeighbor_cfi::detector, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, submitPVResolutionJobs::key, create_idmaps::n, mps_fire::result, and HcalDetIdTransform::transform().

9  {
10  std::vector<int> result;
11  const auto& vmap = this->detector()->vectors();
12  for (auto const& it : vmap) {
13  if (dd4hep::dd::noNamespace(it.first) == key) {
15  it.second.begin(), it.second.end(), std::back_inserter(result), [](int n) -> int { return (int)n; });
16  return result;
17  }
18  }
19  return result;
20 }
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34
key
prepare the HTCondor submission files and eventually submit them
cms::DDVectorsMap const & vectors() const
Definition: DDDetector.h:17
unsigned transform(const HcalDetId &id, unsigned transformCode)

◆ getVector() [3/3]

template<>
std::vector<double> cms::DDCompactView::getVector ( const std::string &  key) const

Definition at line 23 of file DDCompactView.cc.

References hgcalTestNeighbor_cfi::detector, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and submitPVResolutionJobs::key.

23  {
24  const auto& vmap = this->detector()->vectors();
25  for (auto const& it : vmap) {
26  if (dd4hep::dd::noNamespace(it.first) == key) {
27  return it.second;
28  }
29  }
30  return std::vector<double>();
31 }
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34
key
prepare the HTCondor submission files and eventually submit them
cms::DDVectorsMap const & vectors() const
Definition: DDDetector.h:17

◆ specpars()

DDSpecParRegistry const& cms::DDCompactView::specpars ( ) const
inline

Member Data Documentation

◆ m_det

const cms::DDDetector& cms::DDCompactView::m_det
private

Definition at line 45 of file DDCompactView.h.

Referenced by detector(), and specpars().