62 if (
this == &right)
return *
this;
99 if (fFileName == fgkUndefinedFileName) {
100 fileName = volume->
Name();
101 fileName = fileName +
".agdd";
104 fileName = fFileName;
107 fWriter->OpenFile(fileName);
108 fWriter->OpenDocument();
111 GenerateMaterials(volume);
114 GenerateMedia(volume);
117 GenerateSection(volume);
120 fWriter->CloseDocument();
121 fWriter->CloseFile();
124 std::cout <<
"File " << fileName <<
" has been generated." << std::endl;
135 fWriter->OpenSection(volume->
Name());
136 fWriter->WriteEmptyLine();
139 GenerateSolids(volume);
142 ProcessVolume(volume);
143 fWriter->WriteEmptyLine();
147 fWriter->CloseSection(volume->
Name());
156 if (nofDaughters == 0)
return;
163 for (i = 0; i < nofDaughters; i++) {
166 std::cout <<
"processing " << i <<
"th daughter of " << volume->
Name()
170 fWriter->WritePlacement(*volume->
Daughter(i));
174 fWriter->CloseComposition();
175 fWriter->WriteEmptyLine();
178 fVolumeNames.insert(fVolumeNames.begin(), volume->
Name());
181 for (i = 0; i < nofDaughters; i++) {
183 std::string dVolumeName = dVolume->
Name();
185 if (fVolumeNames.find(dVolumeName) == fVolumeNames.end()) {
187 ProcessVolume(dVolume);
The VGM interface to geometry factory providing functions for geometry construction and conversions.
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 AGDD XML format.
virtual void GenerateSection(VGM::IVolume *volume)
virtual void GenerateGeometry(VGM::IVolume *volume)
Generate XML geometry file for the geometry tree starting from the specified VGM volume.
AGDDExporter & operator=(const AGDDExporter &right)
virtual void ProcessVolume(VGM::IVolume *volume)
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 &)
std::vector< double > ThreeVector