CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Public Attributes
cms::DDParsingContext Class Reference

#include <DDParsingContext.h>

Classes

struct  BooleanShape
 
struct  CompositeMaterial
 

Public Member Functions

 DDParsingContext (dd4hep::Detector &det, bool makePayloadArg=false)
 
 DDParsingContext ()=delete
 
 DDParsingContext (const DDParsingContext &)=delete
 
const std::string & ns () const
 
DDParsingContextoperator= (const DDParsingContext &)=delete
 
 ~DDParsingContext ()=default
 

Public Attributes

std::unordered_map
< std::string,
dd4hep::Assembly > 
assemblies
 
std::unordered_set< std::string > assemblySolids
 
std::unordered_map
< std::string, std::vector
< CompositeMaterial > > 
compMaterialsRefs
 
std::vector< std::pair
< std::string, double > > 
compMaterialsVec
 
bool debug_algorithms = false
 
bool debug_constants = false
 
bool debug_includes = false
 
bool debug_materials = false
 
bool debug_namespaces = false
 
bool debug_placements = false
 
bool debug_rotations = false
 
bool debug_shapes = false
 
bool debug_specpars = false
 
bool debug_volumes = false
 
dd4hep::Detector & description
 
bool makePayload = false
 
std::vector< std::string > namespaces
 
std::unordered_map
< std::string,
dd4hep::Rotation3D > 
rotations
 
std::unordered_map
< std::string, std::string > 
rotRevMap
 
std::unordered_map
< std::string, dd4hep::Solid > 
shapes
 
std::unordered_map
< std::string, std::variant
< BooleanShape
< dd4hep::UnionSolid >
, BooleanShape
< dd4hep::SubtractionSolid >
, BooleanShape
< dd4hep::IntersectionSolid > > > 
unresolvedShapes
 
std::unordered_map
< std::string, std::vector
< std::string > > 
unresolvedVectors
 
std::unordered_map
< std::string, dd4hep::Volume > 
volumes
 

Detailed Description

Definition at line 14 of file DDParsingContext.h.

Constructor & Destructor Documentation

cms::DDParsingContext::DDParsingContext ( dd4hep::Detector &  det,
bool  makePayloadArg = false 
)
inline

Definition at line 16 of file DDParsingContext.h.

References assemblies, assemblySolids, compMaterialsRefs, compMaterialsVec, makePayload, namespaces, rotations, rotRevMap, shapes, unresolvedShapes, unresolvedVectors, and volumes.

17  : makePayload(makePayloadArg), description(det) {
18  assemblies.reserve(100);
19  assemblySolids.reserve(100);
20  rotations.reserve(3000);
21  shapes.reserve(4000);
22  volumes.reserve(3000);
23  unresolvedVectors.reserve(300);
24  unresolvedShapes.reserve(1000);
25 
26  namespaces.emplace_back("");
27  if (makePayload) {
28  rotRevMap.reserve(3000);
29  compMaterialsVec.reserve(400);
30  compMaterialsRefs.reserve(400);
31  }
32  }
std::vector< std::pair< std::string, double > > compMaterialsVec
std::unordered_map< std::string, dd4hep::Volume > volumes
std::unordered_map< std::string, std::variant< BooleanShape< dd4hep::UnionSolid >, BooleanShape< dd4hep::SubtractionSolid >, BooleanShape< dd4hep::IntersectionSolid > > > unresolvedShapes
std::unordered_map< std::string, std::vector< std::string > > unresolvedVectors
std::unordered_map< std::string, dd4hep::Rotation3D > rotations
std::unordered_map< std::string, std::string > rotRevMap
std::unordered_map< std::string, dd4hep::Solid > shapes
std::vector< std::string > namespaces
std::unordered_map< std::string, dd4hep::Assembly > assemblies
std::unordered_map< std::string, std::vector< CompositeMaterial > > compMaterialsRefs
dd4hep::Detector & description
std::unordered_set< std::string > assemblySolids
cms::DDParsingContext::DDParsingContext ( )
delete
cms::DDParsingContext::DDParsingContext ( const DDParsingContext )
delete
cms::DDParsingContext::~DDParsingContext ( )
default

Member Function Documentation

const std::string& cms::DDParsingContext::ns ( ) const
inline

Definition at line 40 of file DDParsingContext.h.

References namespaces.

Referenced by cms::DDNamespace::~DDNamespace().

40 { return namespaces.back(); }
std::vector< std::string > namespaces
DDParsingContext& cms::DDParsingContext::operator= ( const DDParsingContext )
delete

Member Data Documentation

std::unordered_map<std::string, dd4hep::Assembly> cms::DDParsingContext::assemblies
std::unordered_set<std::string> cms::DDParsingContext::assemblySolids
std::unordered_map<std::string, std::vector<CompositeMaterial> > cms::DDParsingContext::compMaterialsRefs

Definition at line 87 of file DDParsingContext.h.

Referenced by OutputDD4hepToDDL::beginRun(), and DDParsingContext().

std::vector<std::pair<std::string, double> > cms::DDParsingContext::compMaterialsVec

Definition at line 86 of file DDParsingContext.h.

Referenced by OutputDD4hepToDDL::beginRun(), and DDParsingContext().

bool cms::DDParsingContext::debug_algorithms = false

Definition at line 72 of file DDParsingContext.h.

bool cms::DDParsingContext::debug_constants = false

Definition at line 65 of file DDParsingContext.h.

Referenced by cms::DDNamespace::addConstantNS().

bool cms::DDParsingContext::debug_includes = false

Definition at line 64 of file DDParsingContext.h.

bool cms::DDParsingContext::debug_materials = false

Definition at line 66 of file DDParsingContext.h.

bool cms::DDParsingContext::debug_namespaces = false
bool cms::DDParsingContext::debug_placements = false

Definition at line 70 of file DDParsingContext.h.

Referenced by convert_boolean(), and placeAssembly().

bool cms::DDParsingContext::debug_rotations = false

Definition at line 67 of file DDParsingContext.h.

bool cms::DDParsingContext::debug_shapes = false

Definition at line 68 of file DDParsingContext.h.

Referenced by cms::DDNamespace::addSolidNS().

bool cms::DDParsingContext::debug_specpars = false

Definition at line 73 of file DDParsingContext.h.

bool cms::DDParsingContext::debug_volumes = false
dd4hep::Detector& cms::DDParsingContext::description
bool cms::DDParsingContext::makePayload = false

Definition at line 74 of file DDParsingContext.h.

Referenced by cms::DDNamespace::addRotation(), and DDParsingContext().

std::vector<std::string> cms::DDParsingContext::namespaces
std::unordered_map<std::string, dd4hep::Rotation3D> cms::DDParsingContext::rotations
std::unordered_map<std::string, std::string> cms::DDParsingContext::rotRevMap
std::unordered_map<std::string, dd4hep::Solid> cms::DDParsingContext::shapes
std::unordered_map<std::string, std::variant<BooleanShape<dd4hep::UnionSolid>, BooleanShape<dd4hep::SubtractionSolid>, BooleanShape<dd4hep::IntersectionSolid> > > cms::DDParsingContext::unresolvedShapes

Definition at line 93 of file DDParsingContext.h.

Referenced by convert_boolean(), and DDParsingContext().

std::unordered_map<std::string, std::vector<std::string> > cms::DDParsingContext::unresolvedVectors

Definition at line 88 of file DDParsingContext.h.

Referenced by DDParsingContext().

std::unordered_map<std::string, dd4hep::Volume> cms::DDParsingContext::volumes