CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  double dblValue(const std::string&) const;
18 
19  template <typename T>
20  T value(const std::string&) const;
21 
25  };
26 
27  using DDSpecParMap = tbb::concurrent_unordered_map<std::string, DDSpecPar>;
28  using DDSpecParRefs = std::vector<const DDSpecPar*>;
29 
31  void filter(DDSpecParRefs&, std::string_view, std::string_view) const;
32  void filter(DDSpecParRefs&, std::string_view) const;
33  std::vector<std::string_view> names() const;
34  bool hasSpecPar(std::string_view) const;
35  const DDSpecPar* specPar(std::string_view) const;
36 
38  };
39 } // namespace cms
40 
41 #endif
bool hasValue(const std::string &key) const
std::string_view strValue(const std::string &) const
const std::string names[nVars_]
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< std::string >> DDPartSelectionMap
tbb::concurrent_unordered_map< std::string, tbb::concurrent_vector< double >> DDVectorsMap
Definition: DDNamespace.h:14
T value(const std::string &) const
tbb::concurrent_vector< std::string > DDPaths
Namespace of DDCMS conversion namespace.
DDVectorsMap numpars
std::vector< const DDSpecPar * > DDSpecParRefs
tbb::concurrent_unordered_map< std::string, DDSpecPar > DDSpecParMap
DDPartSelectionMap spars
long double T
double dblValue(const std::string &) const