20#include <Geant4GM/volumes/Factory.h>
21#include <RootGM/volumes/Factory.h>
22#include <RootGM/volumes/Placement.h>
23#include <XmlVGM/AGDDExporter.h>
24#include <XmlVGM/GDMLExporter.h>
26#include <G4UIcmdWithABool.hh>
27#include <G4UIcmdWithAString.hh>
28#include <G4UIcmdWithAnInteger.hh>
29#include <G4UIcmdWithoutParameter.hh>
30#include <G4UIdirectory.hh>
32#include <TGeoManager.h>
40 const G4String& xmlFormat,
const G4String& userGeometry)
43 fXmlFormat(xmlFormat),
52 if (userGeometry ==
"geomVMCtoGeant4" || userGeometry ==
"geomRootToGeant4" ||
53 userGeometry ==
"geomGeant4") {
57 if (userGeometry ==
"geomVMCtoRoot" || userGeometry ==
"geomRoot") {
63 fgDirectory->SetGuidance(
"XML geometry generator control commands.");
65 G4String cmdName(
"/vgm/generateRoot");
71 G4String cmdName(
"/vgm/generate");
72 cmdName = cmdName + xmlFormat;
76 "starting from a logical volume specified by name;");
78 "if no name is given - the whole world is processed.");
83 cmdName = G4String(
"/vgm/set") + xmlFormat + G4String(
"NumWidth");
89 cmdName = G4String(
"/vgm/set") + xmlFormat + G4String(
"NumPrecision");
92 "Set number precision for XML generation");
97 new G4UIcmdWithABool(
"/vgm/setAssembliesInNames",
this);
99 "Activate/inactivate including the names of Root assemblies");
101 "in volume names when exporting Root geometry.");
108 "including the names of Root assemblies in volume names");
110 "when exporting Root geometry is activated .");
168 RootGM::Placement::SetIncludeAssembliesInNames(
174 RootGM::Placement::SetNameSeparator(newValues.at(0));
200 gGeoManager->CloseGeometry();
202 gGeoManager->Export(
"geometry.root");
Definition of the TG4GeometryServices class.
Definition of the TG4VGMMessenger class.
static TG4GeometryServices * Instance()
virtual ~TG4VGMMessenger()
TG4VGMMessenger()
Not implemented.
G4UIcmdWithABool * fSetAssembliesInNamesCmd
command: /xml/setAssembliesInNames
G4UIcmdWithAString * fSetNameSeparatorCmd
command: /xml/setNameSeparator
virtual void SetNewValue(G4UIcommand *command, G4String newValues)
static G4UIdirectory * fgDirectory
command directory
Geant4GM::Factory * fG4Factory
Geant4 VGM Factory.
G4UIcmdWithAnInteger * fSetXMLNumPrecisionCmd
command: /vgm/setXMLNumPrecision
XmlVGM::VExporter * fXmlVGMExporter
associated class
G4UIcmdWithAString * fGenerateXMLCmd
command: /vgm/generateXXX
static G4UIcmdWithoutParameter * fgGenerateRootCmd
command: /xml/generateRoot
G4String fGeometryInput
The geometry input type (Root/Geant4)
RootGM::Factory * fRootFactory
Root VGM Factory.
G4String fXmlFormat
The XML format.
VGM::IFactory * fImportFactory
VGM factory for import.
G4UIcmdWithAnInteger * fSetXMLNumWidthCmd
command: /vgm/setXMLNumWidth
static G4int fgCounter
instances counter