]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TGeant4/TG4XMLGeometryGenerator.h
Updated class description: added class name title, author;
[u/mrichter/AliRoot.git] / TGeant4 / TG4XMLGeometryGenerator.h
CommitLineData
240601e9 1// $Id$
2// Category: geometry
240601e9 3//
499b353a 4// Author: I. Hrivnacova, 27.07.2000
5//
6// Class TG4XMLGeometryGenerator
7// -----------------------------
240601e9 8// Singleton class for generation of geometry data files in XML,
9// the XML format is independent from G4 geometry
10// object model.
11
12#ifndef TG4_XML_GEOMETRY_GENERATOR_H
13#define TG4_XML_GEOMETRY_GENERATOR_H
14
4032dc03 15#include "TG4Globals.h"
16
240601e9 17#include <globals.hh>
18#include <g4std/fstream>
19
20class TG4VXMLConvertor;
21
22class G4LogicalVolume;
23
24class TG4XMLGeometryGenerator
25{
26 public:
27 TG4XMLGeometryGenerator();
28 // --> protected
29 // TG4XMLGeometryGenerator(const TG4XMLGeometryGenerator& right);
30 virtual ~TG4XMLGeometryGenerator();
31
32 // static access method
33 static TG4XMLGeometryGenerator* Instance();
34
35 // methods
429ec6b8 36 void GenerateMaterials(const G4String& version, const G4String& date,
37 const G4String& author, const G4String dtdVersion,
38 G4LogicalVolume* lv);
240601e9 39 void GenerateSection(const G4String& name, const G4String& version,
40 const G4String& date, const G4String& author,
41 const G4String& topVolume, G4LogicalVolume* lv);
42 void OpenFile(G4String filePath);
43 void CloseFile();
44
45 protected:
46 TG4XMLGeometryGenerator(const TG4XMLGeometryGenerator& right);
47
48 // operators
49 TG4XMLGeometryGenerator& operator=(const TG4XMLGeometryGenerator& right);
50
51 private:
52 // methods
4032dc03 53 void CutName(G4String& name) const;
240601e9 54 void ProcessLogicalVolume(G4LogicalVolume* lv);
55 void ProcessMaterials(G4LogicalVolume* lv);
56 void ProcessSolids(G4LogicalVolume* lv);
429ec6b8 57 void ProcessRotations(G4LogicalVolume* lv);
4032dc03 58 void ClearMaterialNames();
59 void ClearVolumeNames();
240601e9 60
61 // static data members
62 static TG4XMLGeometryGenerator* fgInstance; //this instance
63
64 // data members
65 TG4VXMLConvertor* fConvertor; //interface to XML convertor
66 G4std::ofstream fOutFile; //output file
4032dc03 67 TG4StringSet fMaterialNames; //set of names of materials
68 TG4StringSet fVolumeNames; //set of names of solids
240601e9 69};
70
71
72// inline methods
73inline TG4XMLGeometryGenerator* TG4XMLGeometryGenerator::Instance()
74{ return fgInstance; }
75
76#endif //TG4_GEOMETRY_XML_MANAGER_H
77