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 <unordered_map>
8 
9 namespace cms {
10 
12 
13  public:
14 
16  : description( det ) {
17  namespaces.emplace_back( "" );
18  rotations.reserve( 3000 );
19  shapes.reserve( 1000 );
20  volumes.reserve( 2000 );
21  }
22 
24  rotations.clear();
25  shapes.clear();
26  volumes.clear();
27  };
28 
29  const std::string& ns() const { return namespaces.back(); }
30 
32  std::unordered_map< std::string, dd4hep::Rotation3D > rotations;
33  std::unordered_map< std::string, dd4hep::Solid > shapes;
34  std::unordered_map< std::string, dd4hep::Volume > volumes;
35  std::set< std::string > disabledAlgs;
36  std::vector< std::string > namespaces;
37 
38  bool geo_inited = false;
39 
40  // Debug flags
41  bool debug_includes = false;
42  bool debug_constants = false;
43  bool debug_materials = false;
44  bool debug_rotations = false;
45  bool debug_shapes = false;
46  bool debug_volumes = false;
47  bool debug_placements = false;
48  bool debug_namespaces = false;
49  bool debug_visattr = false;
50  bool debug_algorithms = false;
51  bool debug_specpars = false;
52  };
53 }
54 
55 #endif
const std::string & ns() const
std::set< std::string > disabledAlgs
std::vector< std::string > namespaces
dd4hep::Detector * description
std::unordered_map< std::string, dd4hep::Rotation3D > rotations
std::unordered_map< std::string, dd4hep::Volume > volumes
Namespace of DDCMS conversion namespace.
std::unordered_map< std::string, dd4hep::Solid > shapes
DDParsingContext(dd4hep::Detector *det)