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  using VecDouble = std::vector<double>;
15 
17  : description( det ) {
18  namespaces.emplace_back( "" );
19  rotations.reserve( 3000 );
20  shapes.reserve( 1000 );
21  volumes.reserve( 2000 );
22  }
23 
25  rotations.clear();
26  shapes.clear();
27  volumes.clear();
28  numVectors.clear();
29  };
30 
31  const std::string& ns() const { return namespaces.back(); }
32  void addVector( const std::string& name, const VecDouble& value );
33 
35  std::unordered_map< std::string, dd4hep::Rotation3D > rotations;
36  std::unordered_map< std::string, dd4hep::Solid > shapes;
37  std::unordered_map< std::string, dd4hep::Volume > volumes;
38  std::unordered_map< std::string, VecDouble > numVectors;
39  std::set< std::string > disabledAlgs;
40  std::vector< std::string > namespaces;
41 
42  bool geo_inited = false;
43 
44  // Debug flags
45  bool debug_includes = false;
46  bool debug_constants = false;
47  bool debug_materials = false;
48  bool debug_rotations = false;
49  bool debug_shapes = false;
50  bool debug_volumes = false;
51  bool debug_placements = false;
52  bool debug_namespaces = false;
53  bool debug_visattr = false;
54  bool debug_algorithms = false;
55  bool debug_specpars = false;
56  };
57 }
58 
59 #endif
const std::string & ns() const
void addVector(const std::string &name, const VecDouble &value)
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
std::vector< double > VecDouble
std::unordered_map< std::string, VecDouble > numVectors
Definition: value.py:1
Namespace of DDCMS conversion namespace.
std::unordered_map< std::string, dd4hep::Solid > shapes
DDParsingContext(dd4hep::Detector *det)