CMS 3D CMS Logo

Functions
DDSpecparRegistry.cc File Reference
#include "DetectorDescription/DDCMS/interface/DDSpecParRegistry.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "DD4hep/Detector.h"
#include <algorithm>

Go to the source code of this file.

Functions

template<>
std::vector< double > DDSpecPar::value< std::vector< double > > (const string &key) const
 
template<>
std::vector< int > DDSpecPar::value< std::vector< int > > (const string &key) const
 
template<>
std::vector< std::string > DDSpecPar::value< std::vector< std::string > > (const string &key) const
 

Function Documentation

◆ DDSpecPar::value< std::vector< double > >()

template<>
std::vector<double> DDSpecPar::value< std::vector< double > > ( const string &  key) const

Definition at line 33 of file DDSpecparRegistry.cc.

33  {
34  std::vector<double> result;
35 
36  auto const& nitem = numpars.find(key);
37  if (nitem != end(numpars)) {
38  return std::vector<double>(begin(nitem->second), end(nitem->second));
39  }
40 
41  auto const& sitem = spars.find(key);
42  if (sitem != end(spars)) {
43  std::transform(begin(sitem->second), end(sitem->second), std::back_inserter(result), [](auto& i) -> double {
44  return dd4hep::_toDouble(i);
45  });
46  }
47 
48  return result;
49 }

References begin, end, mps_fire::i, crabWrapper::key, mps_fire::result, and HcalDetIdTransform::transform().

◆ DDSpecPar::value< std::vector< int > >()

template<>
std::vector<int> DDSpecPar::value< std::vector< int > > ( const string &  key) const

Definition at line 52 of file DDSpecparRegistry.cc.

52  {
53  std::vector<int> result;
54 
55  auto const& nitem = numpars.find(key);
56  if (nitem != end(numpars)) {
57  return std::vector<int>(begin(nitem->second), end(nitem->second));
58  }
59 
60  auto const& sitem = spars.find(key);
61  if (sitem != end(spars)) {
62  std::transform(begin(sitem->second), end(sitem->second), std::back_inserter(result), [](auto& i) -> int {
63  return dd4hep::_toInt(i);
64  });
65  }
66 
67  return result;
68 }

References begin, end, mps_fire::i, crabWrapper::key, mps_fire::result, and HcalDetIdTransform::transform().

◆ DDSpecPar::value< std::vector< std::string > >()

template<>
std::vector<std::string> DDSpecPar::value< std::vector< std::string > > ( const string &  key) const

Definition at line 71 of file DDSpecparRegistry.cc.

71  {
72  std::vector<std::string> result;
73 
74  auto const& nitem = numpars.find(key);
75  if (nitem != end(numpars)) {
76  std::transform(begin(nitem->second), end(nitem->second), std::back_inserter(result), [](auto& i) -> std::string {
77  return std::to_string(i);
78  });
79 
80  return result;
81  }
82 
83  auto const& sitem = spars.find(key);
84  if (sitem != end(spars)) {
85  return std::vector<std::string>(begin(sitem->second), end(sitem->second));
86  }
87 
88  return result;
89 }

References begin, end, mps_fire::i, crabWrapper::key, mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, and HcalDetIdTransform::transform().

mps_fire.i
i
Definition: mps_fire.py:355
end
#define end
Definition: vmac.h:39
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
mps_fire.result
result
Definition: mps_fire.py:303
crabWrapper.key
key
Definition: crabWrapper.py:19
begin
#define begin
Definition: vmac.h:32