|
BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
A class for writing fully constructed geometry from BDSIM out to other formats. More...
#include <BDSGeometryWriter.hh>

Public Member Functions | |
| void | ExportGeometry (const G4String &geometryType, const G4String &geometryFileName) |
Static Public Member Functions | |
| static G4String | ColourToVRGBAString (G4bool visible, const G4Colour &colour) |
Static Public Attributes | |
| static const G4String | auxType = "bds_vrgba" |
| "bds_vrgba" - short to minimise output file size: "bdsim visibility rgba" | |
Private Member Functions | |
| void | WriteToGDML (const G4String &outputFileName, G4VPhysicalVolume *volume=nullptr) |
Static Private Member Functions | |
| static std::map< G4LogicalVolume *, G4GDMLAuxStructType > | PrepareColourInformation (G4VPhysicalVolume *volume) |
| static void | RegisterVolumeAuxiliaryInformation (G4GDMLParser &parser, const std::map< G4LogicalVolume *, G4GDMLAuxStructType > &volToAuxMap) |
| Register the auxiliary information with the GDML parser (writer). | |
| static void | AddLVColour (std::map< G4LogicalVolume *, G4GDMLAuxStructType > &, G4LogicalVolume *lv) |
A class for writing fully constructed geometry from BDSIM out to other formats.
Definition at line 41 of file BDSGeometryWriter.hh.
| BDSGeometryWriter::BDSGeometryWriter | ( | ) |
Definition at line 49 of file BDSGeometryWriter.cc.
| BDSGeometryWriter::~BDSGeometryWriter | ( | ) |
Definition at line 46 of file BDSGeometryWriter.cc.
|
staticprivate |
Recursively add information to the map by reference for each logical volume vis attributes if they exist.
Definition at line 128 of file BDSGeometryWriter.cc.
References AddLVColour(), auxType, and ColourToVRGBAString().
Referenced by AddLVColour(), and PrepareColourInformation().


|
static |
Return a string with the format "int float float float float" for (bool) visible, (double) rgb, and (double) alpha values separated by a space. e.g. "1 0.2 0.4 0.6 1.0"
Definition at line 97 of file BDSGeometryWriter.cc.
Referenced by AddLVColour().

| void BDSGeometryWriter::ExportGeometry | ( | const G4String & | geometryType, |
| const G4String & | geometryFileName | ||
| ) |
Dispatch function that matches the geometry type and uses the appropriate member function to write out the geometry
Definition at line 52 of file BDSGeometryWriter.cc.
References WriteToGDML().
Referenced by BDSIM::Initialise(), and BDSIMLink::Initialise().


|
staticprivate |
Generate a map of logical volume pointers to output auxiliary structure information for writing out to GDML.
Definition at line 113 of file BDSGeometryWriter.cc.
References AddLVColour().
Referenced by WriteToGDML().


|
staticprivate |
Register the auxiliary information with the GDML parser (writer).
Definition at line 121 of file BDSGeometryWriter.cc.
Referenced by WriteToGDML().

|
private |
Write the geometry to specified output filename. The filename should be the filename ending in .gdml. If the supplied volume is nullptr (default), the world volume will be written out.
Definition at line 68 of file BDSGeometryWriter.cc.
References BDS::DirectoryExists(), BDS::FileExists(), BDS::GetFullPath(), PrepareColourInformation(), RegisterVolumeAuxiliaryInformation(), and BDS::StrContains().
Referenced by ExportGeometry().


|
static |
"bds_vrgba" - short to minimise output file size: "bdsim visibility rgba"
Definition at line 47 of file BDSGeometryWriter.hh.
Referenced by AddLVColour().