CMS 3D CMS Logo

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, bool validateArg=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
 
bool validate = false
 
std::unordered_map< std::string, dd4hep::Volume > volumes
 

Detailed Description

Definition at line 14 of file DDParsingContext.h.

Constructor & Destructor Documentation

◆ DDParsingContext() [1/3]

cms::DDParsingContext::DDParsingContext ( dd4hep::Detector &  det,
bool  makePayloadArg = false,
bool  validateArg = 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), validate(validateArg), 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

◆ DDParsingContext() [2/3]

cms::DDParsingContext::DDParsingContext ( )
delete

◆ DDParsingContext() [3/3]

cms::DDParsingContext::DDParsingContext ( const DDParsingContext )
delete

◆ ~DDParsingContext()

cms::DDParsingContext::~DDParsingContext ( )
default

Member Function Documentation

◆ ns()

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

◆ operator=()

DDParsingContext& cms::DDParsingContext::operator= ( const DDParsingContext )
delete

Member Data Documentation

◆ assemblies

std::unordered_map<std::string, dd4hep::Assembly> cms::DDParsingContext::assemblies

◆ assemblySolids

std::unordered_set<std::string> cms::DDParsingContext::assemblySolids

◆ compMaterialsRefs

std::unordered_map<std::string, std::vector<CompositeMaterial> > cms::DDParsingContext::compMaterialsRefs

Definition at line 88 of file DDParsingContext.h.

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

◆ compMaterialsVec

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

Definition at line 87 of file DDParsingContext.h.

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

◆ debug_algorithms

bool cms::DDParsingContext::debug_algorithms = false

Definition at line 72 of file DDParsingContext.h.

◆ debug_constants

bool cms::DDParsingContext::debug_constants = false

Definition at line 65 of file DDParsingContext.h.

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

◆ debug_includes

bool cms::DDParsingContext::debug_includes = false

Definition at line 64 of file DDParsingContext.h.

◆ debug_materials

bool cms::DDParsingContext::debug_materials = false

Definition at line 66 of file DDParsingContext.h.

◆ debug_namespaces

bool cms::DDParsingContext::debug_namespaces = false

◆ debug_placements

bool cms::DDParsingContext::debug_placements = false

Definition at line 70 of file DDParsingContext.h.

Referenced by convert_boolean(), and placeAssembly().

◆ debug_rotations

bool cms::DDParsingContext::debug_rotations = false

Definition at line 67 of file DDParsingContext.h.

◆ debug_shapes

bool cms::DDParsingContext::debug_shapes = false

Definition at line 68 of file DDParsingContext.h.

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

◆ debug_specpars

bool cms::DDParsingContext::debug_specpars = false

Definition at line 73 of file DDParsingContext.h.

◆ debug_volumes

bool cms::DDParsingContext::debug_volumes = false

◆ description

dd4hep::Detector& cms::DDParsingContext::description

◆ makePayload

bool cms::DDParsingContext::makePayload = false

Definition at line 74 of file DDParsingContext.h.

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

◆ namespaces

std::vector<std::string> cms::DDParsingContext::namespaces

◆ rotations

std::unordered_map<std::string, dd4hep::Rotation3D> cms::DDParsingContext::rotations

◆ rotRevMap

std::unordered_map<std::string, std::string> cms::DDParsingContext::rotRevMap

◆ shapes

std::unordered_map<std::string, dd4hep::Solid> cms::DDParsingContext::shapes

◆ unresolvedShapes

std::unordered_map<std::string, std::variant<BooleanShape<dd4hep::UnionSolid>, BooleanShape<dd4hep::SubtractionSolid>, BooleanShape<dd4hep::IntersectionSolid> > > cms::DDParsingContext::unresolvedShapes

Definition at line 94 of file DDParsingContext.h.

Referenced by convert_boolean(), and DDParsingContext().

◆ unresolvedVectors

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

Definition at line 89 of file DDParsingContext.h.

Referenced by DDParsingContext().

◆ validate

bool cms::DDParsingContext::validate = false

Definition at line 75 of file DDParsingContext.h.

Referenced by placeAssembly().

◆ volumes

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