CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
cms::DDSpecParRegistry Struct Reference

#include <DDSpecParRegistry.h>

Public Member Functions

void filter (DDSpecParRefs &, const std::string &, const std::string &="") const
 
bool hasSpecPar (std::string_view) const
 
std::vector< std::string_view > names () const
 
std::vector< std::string_view > names (const std::string &path) const
 
const DDSpecParspecPar (std::string_view) const
 

Public Attributes

DDSpecParMap specpars
 

Detailed Description

Definition at line 32 of file DDSpecParRegistry.h.

Member Function Documentation

◆ filter()

void DDSpecParRegistry::filter ( DDSpecParRefs refs,
const std::string &  attribute,
const std::string &  value = "" 
) const

Definition at line 98 of file DDSpecparRegistry.cc.

98  {
99  bool found(false);
100  for_each(begin(specpars), end(specpars), [&refs, &attribute, &value, &found](auto& k) {
101  found = false;
102  for_each(begin(k.second.spars), end(k.second.spars), [&](const auto& l) {
103  if (l.first == attribute) {
104  if (value.empty()) {
105  found = true;
106  } else {
107  for_each(begin(l.second), end(l.second), [&](const auto& m) {
108  if (m == value)
109  found = true;
110  });
111  }
112  }
113  });
114  if (found) {
115  k.second.name = k.first;
116  refs.emplace_back(&k.second);
117  }
118  });
119 }

References begin, end, newFWLiteAna::found, dqmdumpme::k, and cmsLHEtoEOSManager::l.

Referenced by EcalSimParametersFromDD::build(), MTDParametersFromDD::build(), ME0GeometryBuilder::build(), GEMGeometryBuilderFromDDD::build(), RPCGeometryBuilderFromDDD::build(), CSCGeometryParsFromDD::build(), cms::DDG4Builder::BuildGeometry(), DDCmsMTDConstruction::construct(), DDG4ProductionCuts::dd4hepInitialize(), cms::DDFilteredView::DDFilteredView(), cms::DDFilteredView::get(), and DTGeometryESProducer::setupGeometry().

◆ hasSpecPar()

bool DDSpecParRegistry::hasSpecPar ( std::string_view  name) const

Definition at line 136 of file DDSpecparRegistry.cc.

136  {
137  auto const& result =
138  find_if(begin(specpars), end(specpars), [&name](const auto& i) { return (i.first.compare(name) == 0); });
139  if (result != end(specpars))
140  return true;
141  else
142  return false;
143 }

References begin, end, mps_fire::i, Skims_PA_cff::name, and mps_fire::result.

◆ names() [1/2]

std::vector< std::string_view > DDSpecParRegistry::names ( void  ) const

Definition at line 130 of file DDSpecparRegistry.cc.

130  {
131  std::vector<std::string_view> result;
132  for_each(begin(specpars), end(specpars), [&result](const auto& i) { result.emplace_back(i.first); });
133  return result;
134 }

References begin, end, mps_fire::i, and mps_fire::result.

Referenced by CSCGeometryParsFromDD::build().

◆ names() [2/2]

std::vector< std::string_view > DDSpecParRegistry::names ( const std::string &  path) const

Definition at line 121 of file DDSpecparRegistry.cc.

121  {
122  std::vector<std::string_view> result;
123  for_each(begin(specpars), end(specpars), [&](const auto& i) {
124  if (i.second.hasPath(path))
125  result.emplace_back(i.first);
126  });
127  return result;
128 }

References begin, end, mps_fire::i, castor_dqm_sourceclient_file_cfg::path, and mps_fire::result.

◆ specPar()

const DDSpecPar * DDSpecParRegistry::specPar ( std::string_view  name) const

Definition at line 145 of file DDSpecparRegistry.cc.

145  {
146  auto const& result =
147  find_if(begin(specpars), end(specpars), [&name](const auto& i) { return (i.first.compare(name) == 0); });
148  if (result != end(specpars)) {
149  return &result->second;
150  } else {
151  return nullptr;
152  }
153 }

References begin, end, mps_fire::i, Skims_PA_cff::name, and mps_fire::result.

Referenced by MTDParametersFromDD::build().

Member Data Documentation

◆ specpars

DDSpecParMap cms::DDSpecParRegistry::specpars
mps_fire.i
i
Definition: mps_fire.py:355
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
end
#define end
Definition: vmac.h:39
dqmdumpme.k
k
Definition: dqmdumpme.py:60
value
Definition: value.py:1
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cms::DDSpecParRegistry::specpars
DDSpecParMap specpars
Definition: DDSpecParRegistry.h:39
mps_fire.result
result
Definition: mps_fire.py:303
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
begin
#define begin
Definition: vmac.h:32