63 if (
this == &right)
return *
this;
83 if (fFileName == fgkUndefinedFileName) {
84 fileName = volume->
Name();
85 fileName = fileName +
".gdml";
91 fWriter->OpenFile(fileName);
92 fWriter->OpenDocument();
95 GenerateSection(volume);
98 fWriter->CloseDocument();
102 std::cout <<
"File " << fileName <<
" has been generated." << std::endl;
113 fWriter->OpenSection(volume->
Name());
114 fWriter->WriteEmptyLine();
117 GeneratePositions(volume);
118 GenerateRotations(volume);
119 GenerateMaterials(volume);
120 GenerateSolids(volume);
123 fWriter->OpenStructure();
124 ProcessVolume(volume);
125 fWriter->CloseStructure();
126 fWriter->WriteEmptyLine();
130 fWriter->CloseSection(volume->
Name());
140 if (nofDaughters == 0) {
148 for (
int i = 0; i < nofDaughters; i++) {
152 if (fVolumeNames.find(dVolume->
Name()) == fVolumeNames.end())
153 ProcessVolume(dVolume);
157 std::vector<VGM::Transform> transforms;
158 std::vector<VGM::IVolume*> volumes;
161 for (
auto parVolume : volumes) {
162 if (fVolumeNames.find(parVolume->Name()) == fVolumeNames.end()) {
163 ProcessVolume(parVolume);
175 for (
int j = 0; j < nofDaughters; j++) {
178 std::cout <<
"processing " << j <<
"th daughter of " << volume->
Name()
182 fWriter->WritePlacement(*volume->
Daughter(j));
187 fWriter->CloseComposition();
188 fWriter->WriteEmptyLine();
191 fVolumeNames.insert(fVolumeNames.begin(), volume->
Name());
The VGM interface to geometry factory providing functions for geometry construction and conversions.
virtual PlacementType Type() const =0
Return the type of this placement.
virtual bool ParameterisedPlacementData(std::vector< VGM::Transform > &transforms, std::vector< VGM::IVolume * > &volumes) const =0
Fill the parameterised placement data if relevant and return true; return false if not parameterised ...
virtual IVolume * Volume() const =0
Return the associated volume.
The VGM interface to volumes.
virtual std::string MaterialName() const =0
Return the name of the associated material.
virtual std::string Name() const =0
Return the name of this volume.
virtual IPlacement * Daughter(int i) const =0
Return the i-th daughter.
virtual int NofDaughters() const =0
Return the number of volume daughters.
Class for generation of geometry data files in XML, in the GDML format.
virtual void GenerateSection(VGM::IVolume *volume)
virtual void ProcessVolume(VGM::IVolume *volume)
virtual void GenerateGeometry(VGM::IVolume *volume)
Generate XML geometry file for the geometry tree starting from the specified VGM volume.
GDMLExporter & operator=(const GDMLExporter &right)
The implementation of the interface for the XML writer that writes VGM geometry objects to XML define...
Class for generation of geometry data files in XML, the XML format is independent from the geometry o...
VExporter & operator=(const VExporter &)