CMS 3D CMS Logo

DDParsingContext.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_DD_PARSING_CONTEXT_H
2 #define DETECTOR_DESCRIPTION_DD_PARSING_CONTEXT_H
3 
4 #include "DD4hep/Detector.h"
5 
6 #include <string>
7 #include "tbb/concurrent_unordered_map.h"
8 #include "tbb/concurrent_vector.h"
9 #include "tbb/concurrent_queue.h"
10 
11 namespace cms {
12 
14 
15  public:
16 
18  : description(det) {
19  }
20 
22  rotations.clear();
23  shapes.clear();
24  volumes.clear();
25  disabledAlgs.clear();
26  namespaces.clear();
27  };
28 
29  bool const ns(std::string& result) {
31  if(namespaces.try_pop(res)) {
32  result=res;
33  namespaces.emplace(res);
34  return true;
35  }
36  return false;
37  }
38 
39  std::atomic<dd4hep::Detector*> description;
40  tbb::concurrent_unordered_map< std::string, dd4hep::Rotation3D > rotations;
41  tbb::concurrent_unordered_map< std::string, dd4hep::Solid > shapes;
42  tbb::concurrent_unordered_map< std::string, dd4hep::Volume > volumes;
43  tbb::concurrent_vector< std::string > disabledAlgs;
44  tbb::concurrent_queue< std::string > namespaces;
45 
46  bool geo_inited = false;
47 
48  // Debug flags
49  bool debug_includes = false;
50  bool debug_constants = false;
51  bool debug_materials = false;
52  bool debug_rotations = false;
53  bool debug_shapes = false;
54  bool debug_volumes = false;
55  bool debug_placements = false;
56  bool debug_namespaces = false;
57  bool debug_visattr = false;
58  bool debug_algorithms = false;
59  bool debug_specpars = false;
60  };
61 }
62 
63 #endif
tbb::concurrent_queue< std::string > namespaces
bool const ns(std::string &result)
std::atomic< dd4hep::Detector * > description
Definition: Electron.h:6
tbb::concurrent_unordered_map< std::string, dd4hep::Rotation3D > rotations
tbb::concurrent_unordered_map< std::string, dd4hep::Volume > volumes
Namespace of DDCMS conversion namespace.
tbb::concurrent_vector< std::string > disabledAlgs
tbb::concurrent_unordered_map< std::string, dd4hep::Solid > shapes
DDParsingContext(dd4hep::Detector *det)