CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
DDCompactView.cc File Reference
#include "DetectorDescription/DDCMS/interface/DDCompactView.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <DD4hep/Filter.h>
#include <cmath>
#include <vector>

Go to the source code of this file.

Functions

template<>
std::vector< double > const & cms::DDCompactView::get< std::vector< double > > (const std::string &key) const
 
template<>
std::vector< double > const & cms::DDCompactView::get< std::vector< double > > (const std::string &name, const std::string &key) const
 

Function Documentation

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

Definition at line 34 of file DDCompactView.cc.

References Exception, and submitPVResolutionJobs::key.

34  {
35  const auto& vmap = this->detector()->vectors();
36  for (auto const& it : vmap) {
37  if (dd4hep::dd::noNamespace(it.first) == key) {
38  return it.second;
39  }
40  }
41  throw cms::Exception("DDError") << "no vector<double> with name " << key;
42 }
tuple key
prepare the HTCondor submission files and eventually submit them
template<>
std::vector<double> const& cms::DDCompactView::get< std::vector< double > > ( const std::string &  name,
const std::string &  key 
) const

Definition at line 45 of file DDCompactView.cc.

References dataset::end, Exception, submitPVResolutionJobs::key, and mergeVDriftHistosByStation::name.

46  {
47  const auto& spec = specpars().specPar(name);
48  if (spec != nullptr) {
49  auto const& nitem = spec->numpars.find(key);
50  if (nitem != end(spec->numpars)) {
51  return nitem->second;
52  }
53  }
54  throw cms::Exception("DDError") << "no SpecPar with name " << name << " and vector<double> key " << key;
55 }
tuple key
prepare the HTCondor submission files and eventually submit them
string end
Definition: dataset.py:937