CMS 3D CMS Logo

DDSpecParRegistry.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_DD_SPECPAR_REGISTRY_H
2 #define DETECTOR_DESCRIPTION_DD_SPECPAR_REGISTRY_H
3 
4 #include <string>
5 #include <string_view>
6 #include "tbb/concurrent_unordered_map.h"
7 #include "tbb/concurrent_vector.h"
8 
9 namespace cms {
10  using DDPaths = tbb::concurrent_vector<std::string>;
11  using DDPartSelectionMap = tbb::concurrent_unordered_map<std::string, tbb::concurrent_vector<std::string>>;
12  using DDVectorsMap = tbb::concurrent_unordered_map<std::string, tbb::concurrent_vector<double>>;
13 
14  struct DDSpecPar {
15  std::string_view strValue(const std::string&) const;
16  bool hasValue(const std::string& key) const;
17  bool hasPath(const std::string& path) const;
18  double dblValue(const std::string&) const;
19 
20  template <typename T>
21  T value(const std::string&) const;
22 
26  std::string_view name;
27  };
28 
29  using DDSpecParMap = tbb::concurrent_unordered_map<std::string, DDSpecPar>;
30  using DDSpecParRefs = std::vector<const DDSpecPar*>;
31 
33  void filter(DDSpecParRefs&, const std::string&, const std::string& = "") const;
34  std::vector<std::string_view> names() const;
35  std::vector<std::string_view> names(const std::string& path) const;
36  bool hasSpecPar(std::string_view) const;
37  const DDSpecPar* specPar(std::string_view) const;
38 
40  };
41 } // namespace cms
42 
43 #endif
cms::DDPaths
tbb::concurrent_vector< std::string > DDPaths
Definition: DDSpecParRegistry.h:10
cms::DDSpecParMap
tbb::concurrent_unordered_map< std::string, DDSpecPar > DDSpecParMap
Definition: DDSpecParRegistry.h:29
cms::DDVectorsMap
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double > > DDVectorsMap
Definition: DDNamespace.h:14
cms::DDSpecParRegistry::specPar
const DDSpecPar * specPar(std::string_view) const
Definition: DDSpecparRegistry.cc:145
cms::DDSpecParRegistry
Definition: DDSpecParRegistry.h:32
cms::DDSpecPar::hasPath
bool hasPath(const std::string &path) const
Definition: DDSpecparRegistry.cc:24
cms::DDSpecPar::dblValue
double dblValue(const std::string &) const
Definition: DDSpecparRegistry.cc:91
cms::DDSpecParRefs
std::vector< const DDSpecPar * > DDSpecParRefs
Definition: DDSpecParRegistry.h:30
cms::DDPartSelectionMap
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< std::string > > DDPartSelectionMap
Definition: DDSpecParRegistry.h:11
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cms::DDSpecPar::strValue
std::string_view strValue(const std::string &) const
Definition: DDSpecparRegistry.cc:10
cms::DDSpecPar::name
std::string_view name
Definition: DDSpecParRegistry.h:26
cms::DDSpecPar
Definition: DDSpecParRegistry.h:14
cms::DDSpecPar::spars
DDPartSelectionMap spars
Definition: DDSpecParRegistry.h:24
T
long double T
Definition: Basic3DVectorLD.h:48
cms::DDSpecParRegistry::filter
void filter(DDSpecParRefs &, const std::string &, const std::string &="") const
Definition: DDSpecparRegistry.cc:98
cms::DDSpecPar::paths
DDPaths paths
Definition: DDSpecParRegistry.h:23
cms::DDSpecPar::hasValue
bool hasValue(const std::string &key) const
Definition: DDSpecparRegistry.cc:17
cms::DDSpecPar::numpars
DDVectorsMap numpars
Definition: DDSpecParRegistry.h:25
cms::DDSpecParRegistry::hasSpecPar
bool hasSpecPar(std::string_view) const
Definition: DDSpecparRegistry.cc:136
cms::DDSpecParRegistry::specpars
DDSpecParMap specpars
Definition: DDSpecParRegistry.h:39
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
cms::DDSpecParRegistry::names
std::vector< std::string_view > names() const
Definition: DDSpecparRegistry.cc:130
crabWrapper.key
key
Definition: crabWrapper.py:19
cms::DDSpecPar::value
T value(const std::string &) const
cms
Namespace of DDCMS conversion namespace.
Definition: ProducerAnalyzer.cc:21