Geant4  10.00.p01
G4GDMLWrite Class Referenceabstract

#include <G4GDMLWrite.hh>

+ Inheritance diagram for G4GDMLWrite:
+ Collaboration diagram for G4GDMLWrite:

Public Member Functions

G4Transform3D Write (const G4String &filename, const G4LogicalVolume *const topLog, const G4String &schemaPath, const G4int depth, G4bool storeReferences=true)
 
void AddModule (const G4VPhysicalVolume *const topVol)
 
void AddModule (const G4int depth)
 
virtual void DefineWrite (xercesc::DOMElement *)=0
 
virtual void MaterialsWrite (xercesc::DOMElement *)=0
 
virtual void SolidsWrite (xercesc::DOMElement *)=0
 
virtual void StructureWrite (xercesc::DOMElement *)=0
 
virtual G4Transform3D TraverseVolumeTree (const G4LogicalVolume *const, const G4int)=0
 
virtual void SurfacesWrite ()=0
 
virtual void SetupWrite (xercesc::DOMElement *, const G4LogicalVolume *const)=0
 
virtual void ExtensionWrite (xercesc::DOMElement *)
 
virtual void AddExtension (xercesc::DOMElement *, const G4LogicalVolume *const)
 

Static Public Member Functions

static void SetAddPointerToName (G4bool)
 

Protected Member Functions

 G4GDMLWrite ()
 
virtual ~G4GDMLWrite ()
 
VolumeMapTypeVolumeMap ()
 
G4String GenerateName (const G4String &, const void *const)
 
xercesc::DOMAttr * NewAttribute (const G4String &, const G4String &)
 
xercesc::DOMAttr * NewAttribute (const G4String &, const G4double &)
 
xercesc::DOMElement * NewElement (const G4String &)
 
G4String Modularize (const G4VPhysicalVolume *const topvol, const G4int depth)
 
G4bool FileExists (const G4String &) const
 
PhysVolumeMapTypePvolumeMap ()
 
DepthMapTypeDepthMap ()
 

Protected Attributes

G4String SchemaLocation
 
xercesc::DOMDocument * doc
 
xercesc::DOMElement * extElement
 
XMLCh tempStr [10000]
 

Static Protected Attributes

static G4bool addPointerToName = true
 

Private Types

typedef std::map< const
G4LogicalVolume
*, G4Transform3D
VolumeMapType
 
typedef std::map< const
G4VPhysicalVolume *, G4String
PhysVolumeMapType
 
typedef std::map< G4int, G4intDepthMapType
 

Detailed Description

Definition at line 55 of file G4GDMLWrite.hh.

Member Typedef Documentation

typedef std::map<G4int,G4int> G4GDMLWrite::DepthMapType
private

Definition at line 59 of file G4GDMLWrite.hh.

typedef std::map<const G4VPhysicalVolume*,G4String> G4GDMLWrite::PhysVolumeMapType
private

Definition at line 58 of file G4GDMLWrite.hh.

typedef std::map<const G4LogicalVolume*,G4Transform3D> G4GDMLWrite::VolumeMapType
private

Definition at line 57 of file G4GDMLWrite.hh.

Constructor & Destructor Documentation

G4GDMLWrite::G4GDMLWrite ( )
protected

Definition at line 46 of file G4GDMLWrite.cc.

G4GDMLWrite::~G4GDMLWrite ( )
protectedvirtual

Definition at line 50 of file G4GDMLWrite.cc.

Member Function Documentation

void G4GDMLWrite::AddExtension ( xercesc::DOMElement *  ,
const G4LogicalVolume * const   
)
virtual

Reimplemented in G03ColorWriter.

Definition at line 78 of file G4GDMLWrite.cc.

Referenced by G4GDMLWriteStructure::TraverseVolumeTree().

+ Here is the caller graph for this function:

void G4GDMLWrite::AddModule ( const G4VPhysicalVolume *const  topVol)

Definition at line 247 of file G4GDMLWrite.cc.

References FatalException, G4cout, G4endl, G4Exception(), GenerateName(), G4VPhysicalVolume::GetName(), G4VPhysicalVolume::IsParameterised(), G4VPhysicalVolume::IsReplicated(), and PvolumeMap().

+ Here is the call graph for this function:

void G4GDMLWrite::AddModule ( const G4int  depth)

Definition at line 280 of file G4GDMLWrite.cc.

References DepthMap(), FatalException, and G4Exception().

+ Here is the call graph for this function:

virtual void G4GDMLWrite::DefineWrite ( xercesc::DOMElement *  )
pure virtual

Implemented in G4GDMLWriteDefine.

Referenced by Write().

+ Here is the caller graph for this function:

G4GDMLWrite::DepthMapType & G4GDMLWrite::DepthMap ( )
protected

Definition at line 72 of file G4GDMLWrite.cc.

References instance.

Referenced by AddModule(), and Modularize().

+ Here is the caller graph for this function:

void G4GDMLWrite::ExtensionWrite ( xercesc::DOMElement *  )
virtual

Reimplemented in G03ColorWriter.

Definition at line 85 of file G4GDMLWrite.cc.

Referenced by Write().

+ Here is the caller graph for this function:

G4bool G4GDMLWrite::FileExists ( const G4String fname) const
protected

Definition at line 54 of file G4GDMLWrite.cc.

Referenced by Write().

+ Here is the caller graph for this function:

G4String G4GDMLWrite::GenerateName ( const G4String name,
const void * const  ptr 
)
protected

Definition at line 90 of file G4GDMLWrite.cc.

References addPointerToName, G4String::contains(), and name.

Referenced by AddModule(), G4GDMLWriteSolids::BooleanWrite(), G4GDMLWriteStructure::BorderSurfaceCache(), G4GDMLWriteSolids::BoxWrite(), G03ColorWriter::ColorWrite(), G4GDMLWriteSolids::ConeWrite(), G4GDMLWriteSolids::CutTubeWrite(), G4GDMLWriteStructure::DivisionvolWrite(), G4GDMLWriteSolids::ElconeWrite(), G4GDMLWriteMaterials::ElementWrite(), G4GDMLWriteSolids::EllipsoidWrite(), G4GDMLWriteSolids::EltubeWrite(), G4GDMLWriteSolids::GenericPolyconeWrite(), G4GDMLWriteSolids::GenTrapWrite(), G4GDMLWriteSolids::HypeWrite(), G4GDMLWriteMaterials::IsotopeWrite(), G4GDMLWriteMaterials::MaterialWrite(), G4GDMLWriteSolids::OrbWrite(), G4GDMLWriteSolids::ParaboloidWrite(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteParamvol::ParamvolAlgorithmWrite(), G4GDMLWriteParamvol::ParamvolWrite(), G4GDMLWriteSolids::ParaWrite(), G4GDMLWriteStructure::PhysvolWrite(), G4GDMLWriteSolids::PolyconeWrite(), G4GDMLWriteSolids::PolyhedraWrite(), G4GDMLWriteMaterials::PropertyVectorWrite(), G4GDMLWriteMaterials::PropertyWrite(), G4GDMLWriteStructure::ReplicavolWrite(), G4GDMLWriteSetup::SetupWrite(), G4GDMLWriteStructure::SkinSurfaceCache(), G4GDMLWriteSolids::SphereWrite(), G4GDMLWriteSolids::TessellatedWrite(), G4GDMLWriteSolids::TetWrite(), G4GDMLWriteSolids::TorusWrite(), G4GDMLWriteSolids::TrapWrite(), G4GDMLWriteStructure::TraverseVolumeTree(), G4GDMLWriteSolids::TrdWrite(), G4GDMLWriteSolids::TubeWrite(), G4GDMLWriteSolids::TwistedboxWrite(), G4GDMLWriteSolids::TwistedtrapWrite(), G4GDMLWriteSolids::TwistedtrdWrite(), G4GDMLWriteSolids::TwistedtubsWrite(), and G4GDMLWriteSolids::XtruWrite().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void G4GDMLWrite::MaterialsWrite ( xercesc::DOMElement *  )
pure virtual

Implemented in G4GDMLWriteMaterials.

Referenced by Write().

+ Here is the caller graph for this function:

G4String G4GDMLWrite::Modularize ( const G4VPhysicalVolume *const  topvol,
const G4int  depth 
)
protected

Definition at line 295 of file G4GDMLWrite.cc.

References DepthMap(), and PvolumeMap().

Referenced by G4GDMLWriteStructure::TraverseVolumeTree().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

xercesc::DOMAttr * G4GDMLWrite::NewAttribute ( const G4String name,
const G4String value 
)
protected

Definition at line 103 of file G4GDMLWrite.cc.

References doc, and tempStr.

Referenced by G4GDMLWriteMaterials::AtomWrite(), G4GDMLWriteSolids::BooleanWrite(), G4GDMLWriteStructure::BorderSurfaceCache(), G4GDMLWriteParamvol::Box_dimensionsWrite(), G4GDMLWriteSolids::BoxWrite(), G03ColorWriter::ColorWrite(), G4GDMLWriteParamvol::Cone_dimensionsWrite(), G4GDMLWriteSolids::ConeWrite(), G4GDMLWriteSolids::CutTubeWrite(), G4GDMLWriteStructure::DivisionvolWrite(), G4GDMLWriteMaterials::DWrite(), G4GDMLWriteSolids::ElconeWrite(), G4GDMLWriteMaterials::ElementWrite(), G4GDMLWriteParamvol::Ellipsoid_dimensionsWrite(), G4GDMLWriteSolids::EllipsoidWrite(), G4GDMLWriteSolids::EltubeWrite(), G4GDMLWriteSolids::GenericPolyconeWrite(), G4GDMLWriteSolids::GenTrapWrite(), G4GDMLWriteParamvol::Hype_dimensionsWrite(), G4GDMLWriteSolids::HypeWrite(), G4GDMLWriteMaterials::IsotopeWrite(), G4GDMLWriteMaterials::MaterialWrite(), G4GDMLWriteMaterials::MEEWrite(), G4GDMLWriteSolids::OpticalSurfaceWrite(), G4GDMLWriteParamvol::Orb_dimensionsWrite(), G4GDMLWriteSolids::OrbWrite(), G4GDMLWriteParamvol::Para_dimensionsWrite(), G4GDMLWriteSolids::ParaboloidWrite(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteParamvol::ParamvolWrite(), G4GDMLWriteSolids::ParaWrite(), G4GDMLWriteStructure::PhysvolWrite(), G4GDMLWriteParamvol::Polycone_dimensionsWrite(), G4GDMLWriteSolids::PolyconeWrite(), G4GDMLWriteParamvol::Polyhedra_dimensionsWrite(), G4GDMLWriteSolids::PolyhedraWrite(), G4GDMLWriteDefine::Position_vectorWrite(), G4GDMLWriteMaterials::PropertyVectorWrite(), G4GDMLWriteMaterials::PropertyWrite(), G4GDMLWriteMaterials::PWrite(), G4GDMLWriteStructure::ReplicavolWrite(), G4GDMLWriteDefine::Rotation_vectorWrite(), G4GDMLWriteSolids::RZPointWrite(), G4GDMLWriteDefine::Scale_vectorWrite(), G4GDMLWriteSetup::SetupWrite(), G4GDMLWriteStructure::SkinSurfaceCache(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), G4GDMLWriteSolids::SphereWrite(), G4GDMLWriteSolids::TessellatedWrite(), G4GDMLWriteSolids::TetWrite(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), G4GDMLWriteSolids::TorusWrite(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), G4GDMLWriteSolids::TrapWrite(), G4GDMLWriteStructure::TraverseVolumeTree(), G4GDMLWriteParamvol::Trd_dimensionsWrite(), G4GDMLWriteSolids::TrdWrite(), G4GDMLWriteParamvol::Tube_dimensionsWrite(), G4GDMLWriteSolids::TubeWrite(), G4GDMLWriteSolids::TwistedboxWrite(), G4GDMLWriteSolids::TwistedtrapWrite(), G4GDMLWriteSolids::TwistedtrdWrite(), G4GDMLWriteSolids::TwistedtubsWrite(), G4GDMLWriteMaterials::TWrite(), Write(), G4GDMLWriteSolids::XtruWrite(), and G4GDMLWriteSolids::ZplaneWrite().

xercesc::DOMAttr * G4GDMLWrite::NewAttribute ( const G4String name,
const G4double value 
)
protected

Definition at line 113 of file G4GDMLWrite.cc.

References doc, and tempStr.

xercesc::DOMElement * G4GDMLWrite::NewElement ( const G4String name)
protected

Definition at line 127 of file G4GDMLWrite.cc.

References doc, and tempStr.

Referenced by G4GDMLWriteMaterials::AtomWrite(), G4GDMLWriteSolids::BooleanWrite(), G4GDMLWriteStructure::BorderSurfaceCache(), G4GDMLWriteParamvol::Box_dimensionsWrite(), G4GDMLWriteSolids::BoxWrite(), G03ColorWriter::ColorWrite(), G4GDMLWriteParamvol::Cone_dimensionsWrite(), G4GDMLWriteSolids::ConeWrite(), G4GDMLWriteSolids::CutTubeWrite(), G4GDMLWriteDefine::DefineWrite(), G4GDMLWriteStructure::DivisionvolWrite(), G4GDMLWriteMaterials::DWrite(), G4GDMLWriteSolids::ElconeWrite(), G4GDMLWriteMaterials::ElementWrite(), G4GDMLWriteParamvol::Ellipsoid_dimensionsWrite(), G4GDMLWriteSolids::EllipsoidWrite(), G4GDMLWriteSolids::EltubeWrite(), G03ColorWriter::ExtensionWrite(), G4GDMLWriteSolids::GenericPolyconeWrite(), G4GDMLWriteSolids::GenTrapWrite(), G4GDMLWriteParamvol::Hype_dimensionsWrite(), G4GDMLWriteSolids::HypeWrite(), G4GDMLWriteMaterials::IsotopeWrite(), G4GDMLWriteMaterials::MaterialsWrite(), G4GDMLWriteMaterials::MaterialWrite(), G4GDMLWriteMaterials::MEEWrite(), G4GDMLWriteSolids::OpticalSurfaceWrite(), G4GDMLWriteParamvol::Orb_dimensionsWrite(), G4GDMLWriteSolids::OrbWrite(), G4GDMLWriteParamvol::Para_dimensionsWrite(), G4GDMLWriteSolids::ParaboloidWrite(), G4GDMLWriteParamvol::ParametersWrite(), G4GDMLWriteParamvol::ParamvolWrite(), G4GDMLWriteSolids::ParaWrite(), G4GDMLWriteStructure::PhysvolWrite(), G4GDMLWriteParamvol::Polycone_dimensionsWrite(), G4GDMLWriteSolids::PolyconeWrite(), G4GDMLWriteParamvol::Polyhedra_dimensionsWrite(), G4GDMLWriteSolids::PolyhedraWrite(), G4GDMLWriteDefine::Position_vectorWrite(), G4GDMLWriteMaterials::PropertyVectorWrite(), G4GDMLWriteMaterials::PropertyWrite(), G4GDMLWriteMaterials::PWrite(), G4GDMLWriteStructure::ReplicavolWrite(), G4GDMLWriteDefine::Rotation_vectorWrite(), G4GDMLWriteSolids::RZPointWrite(), G4GDMLWriteDefine::Scale_vectorWrite(), G4GDMLWriteSetup::SetupWrite(), G4GDMLWriteStructure::SkinSurfaceCache(), G4GDMLWriteSolids::SolidsWrite(), G4GDMLWriteParamvol::Sphere_dimensionsWrite(), G4GDMLWriteSolids::SphereWrite(), G4GDMLWriteStructure::StructureWrite(), G4GDMLWriteSolids::TessellatedWrite(), G4GDMLWriteSolids::TetWrite(), G4GDMLWriteParamvol::Torus_dimensionsWrite(), G4GDMLWriteSolids::TorusWrite(), G4GDMLWriteParamvol::Trap_dimensionsWrite(), G4GDMLWriteSolids::TrapWrite(), G4GDMLWriteStructure::TraverseVolumeTree(), G4GDMLWriteParamvol::Trd_dimensionsWrite(), G4GDMLWriteSolids::TrdWrite(), G4GDMLWriteParamvol::Tube_dimensionsWrite(), G4GDMLWriteSolids::TubeWrite(), G4GDMLWriteSolids::TwistedboxWrite(), G4GDMLWriteSolids::TwistedtrapWrite(), G4GDMLWriteSolids::TwistedtrdWrite(), G4GDMLWriteSolids::TwistedtubsWrite(), G4GDMLWriteMaterials::TWrite(), G4GDMLWriteSolids::XtruWrite(), and G4GDMLWriteSolids::ZplaneWrite().

G4GDMLWrite::PhysVolumeMapType & G4GDMLWrite::PvolumeMap ( )
protected

Definition at line 66 of file G4GDMLWrite.cc.

References instance.

Referenced by AddModule(), and Modularize().

+ Here is the caller graph for this function:

void G4GDMLWrite::SetAddPointerToName ( G4bool  set)
static

Definition at line 315 of file G4GDMLWrite.cc.

References addPointerToName.

virtual void G4GDMLWrite::SetupWrite ( xercesc::DOMElement *  ,
const G4LogicalVolume const 
)
pure virtual

Implemented in G4GDMLWriteSetup.

Referenced by Write().

+ Here is the caller graph for this function:

virtual void G4GDMLWrite::SolidsWrite ( xercesc::DOMElement *  )
pure virtual

Implemented in G4GDMLWriteSolids.

Referenced by Write().

+ Here is the caller graph for this function:

virtual void G4GDMLWrite::StructureWrite ( xercesc::DOMElement *  )
pure virtual

Implemented in G4GDMLWriteStructure.

Referenced by Write().

+ Here is the caller graph for this function:

virtual void G4GDMLWrite::SurfacesWrite ( )
pure virtual

Implemented in G4GDMLWriteStructure.

Referenced by Write().

+ Here is the caller graph for this function:

virtual G4Transform3D G4GDMLWrite::TraverseVolumeTree ( const G4LogicalVolume const,
const G4int   
)
pure virtual

Implemented in G4GDMLWriteStructure.

Referenced by Write().

+ Here is the caller graph for this function:

G4GDMLWrite::VolumeMapType & G4GDMLWrite::VolumeMap ( )
protected

Definition at line 60 of file G4GDMLWrite.cc.

References instance.

Referenced by G4GDMLWriteStructure::TraverseVolumeTree(), and Write().

+ Here is the caller graph for this function:

G4Transform3D G4GDMLWrite::Write ( const G4String filename,
const G4LogicalVolume *const  topLog,
const G4String schemaPath,
const G4int  depth,
G4bool  storeReferences = true 
)

Definition at line 133 of file G4GDMLWrite.cc.

References addPointerToName, DefineWrite(), doc, ExtensionWrite(), FatalException, FileExists(), G4cout, G4endl, G4Exception(), MaterialsWrite(), NewAttribute(), release(), SchemaLocation, SetupWrite(), SolidsWrite(), StructureWrite(), SurfacesWrite(), tempStr, TraverseVolumeTree(), and VolumeMap().

Referenced by G4GDMLWriteStructure::TraverseVolumeTree().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

G4bool G4GDMLWrite::addPointerToName = true
staticprotected

Definition at line 122 of file G4GDMLWrite.hh.

Referenced by GenerateName(), SetAddPointerToName(), and Write().

xercesc::DOMDocument* G4GDMLWrite::doc
protected

Definition at line 123 of file G4GDMLWrite.hh.

Referenced by NewAttribute(), NewElement(), and Write().

xercesc::DOMElement* G4GDMLWrite::extElement
protected

Definition at line 124 of file G4GDMLWrite.hh.

Referenced by G03ColorWriter::ColorWrite(), and G03ColorWriter::ExtensionWrite().

G4String G4GDMLWrite::SchemaLocation
protected

Definition at line 121 of file G4GDMLWrite.hh.

Referenced by G4GDMLWriteStructure::TraverseVolumeTree(), and Write().

XMLCh G4GDMLWrite::tempStr[10000]
protected

Definition at line 125 of file G4GDMLWrite.hh.

Referenced by NewAttribute(), NewElement(), and Write().


The documentation for this class was generated from the following files: