CMS 3D CMS Logo

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

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

const cms::DDDetector* cms::DDCompactView::detector ( ) const
inline
template<typename T >
T const& cms::DDCompactView::get ( const std::string &  ) const
template<typename T >
T const& cms::DDCompactView::get ( const std::string &  ,
const std::string &   
) const
template<typename T >
std::vector<T> cms::DDCompactView::getVector ( const std::string &  ) const
template<>
std::vector<int> cms::DDCompactView::getVector ( const std::string &  key) const

Definition at line 9 of file DDCompactView.cc.

References submitPVResolutionJobs::key, dqmiodumpmetadata::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 }
cms::DDVectorsMap const & vectors() const
Definition: DDDetector.h:17
tuple result
Definition: mps_fire.py:311
tuple key
prepare the HTCondor submission files and eventually submit them
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34
unsigned transform(const HcalDetId &id, unsigned transformCode)
template<>
std::vector<double> cms::DDCompactView::getVector ( const std::string &  key) const

Definition at line 23 of file DDCompactView.cc.

References 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 }
cms::DDVectorsMap const & vectors() const
Definition: DDDetector.h:17
tuple key
prepare the HTCondor submission files and eventually submit them
const cms::DDDetector * detector() const
Definition: DDCompactView.h:34
DDSpecParRegistry const& cms::DDCompactView::specpars ( ) const
inline

Definition at line 35 of file DDCompactView.h.

References m_det, and cms::DDDetector::specpars().

Referenced by MuonGeometryConstantsBuild::build(), EcalSimParametersFromDD::build(), MTDParametersFromDD::build(), CSCGeometryParsFromDD::build(), and DDCmsMTDConstruction::construct().

35 { return m_det.specpars(); }
const cms::DDDetector & m_det
Definition: DDCompactView.h:45
dd4hep::SpecParRegistry const & specpars() const
Definition: DDDetector.h:21

Member Data Documentation

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

Definition at line 45 of file DDCompactView.h.

Referenced by detector(), and specpars().