source: trunk/source/persistency/gdml/include/G4GDMLParser.hh@ 1320

Last change on this file since 1320 was 1315, checked in by garnier, 15 years ago

update geant4-09-04-beta-cand-01 interfaces-V09-03-09 vis-V09-03-08

File size: 5.1 KB
RevLine 
[818]1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
[1315]27// $Id: G4GDMLParser.hh,v 1.59 2010/02/17 18:06:25 gcosmo Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-cand-01 $
[818]29//
30//
31// class G4GDMLParser
32//
33// Class description:
34//
[850]35// GDML main parser.
36
[818]37// History:
38// - Created. Zoltan Torzsok, November 2007
39// -------------------------------------------------------------------------
[850]40
[818]41#ifndef _G4GDMLPARSER_INCLUDED_
42#define _G4GDMLPARSER_INCLUDED_
43
[850]44#include "G4GDMLReadStructure.hh"
45#include "G4GDMLWriteStructure.hh"
46#include "G4STRead.hh"
[818]47
[921]48#define G4GDML_DEFAULT_SCHEMALOCATION G4String("http://service-spi.web.cern.ch/service-spi/app/releases/GDML/schema/gdml.xsd")
[850]49
50class G4GDMLParser
51{
52 public: // with description
53
[921]54 G4GDMLParser();
55 G4GDMLParser(G4GDMLReadStructure*);
[1228]56 G4GDMLParser(G4GDMLReadStructure*, G4GDMLWriteStructure*);
[921]57 ~G4GDMLParser();
[850]58 //
[921]59 // Parser constructors & destructor
[850]60
61 inline void Read(const G4String& filename, G4bool Validate=true);
62 //
63 // Imports geometry with world-volume, specified by the GDML filename
64 // in input. Validation against schema is activated by default.
65
66 inline void ReadModule(const G4String& filename, G4bool Validate=true);
67 //
68 // Imports a single GDML module, specified by the GDML filename
69 // in input. Validation against schema is activated by default.
70
71 inline void Write(const G4String& filename,
72 const G4VPhysicalVolume* const pvol = 0,
73 G4bool storeReferences = true,
74 const G4String& SchemaLocation = G4GDML_DEFAULT_SCHEMALOCATION);
75 //
76 // Exports on a GDML file, specified by 'filename' a geometry tree
77 // starting from 'pvol' as top volume. Uniqueness of stored entities
78 // is guaranteed by storing pointer-references by default.
79 // Alternative path for the schema location can be specified; by default
80 // the URL to the GDML web site is used.
81
82 inline G4LogicalVolume* ParseST(const G4String& name,
83 G4Material* medium,
84 G4Material* solid);
85 //
86 // Imports a tessellated geometry stored as STEP-Tools files
87 // 'name.geom' and 'name.tree'. It returns a pointer of a generated
88 // mother volume with 'medium' material associated, including the
89 // imported tessellated geometry with 'solid' material associated.
90
91 // Methods for Reader
92 //
[1315]93 inline G4bool IsValid(const G4String& name) const;
94 inline G4double GetConstant(const G4String& name) const;
95 inline G4double GetVariable(const G4String& name) const;
96 inline G4double GetQuantity(const G4String& name) const;
97 inline G4ThreeVector GetPosition(const G4String& name) const;
98 inline G4ThreeVector GetRotation(const G4String& name) const;
99 inline G4ThreeVector GetScale(const G4String& name) const;
100 inline G4GDMLMatrix GetMatrix(const G4String& name) const;
101 inline G4LogicalVolume* GetVolume(const G4String& name) const;
102 inline G4VPhysicalVolume* GetWorldVolume(const G4String& setupName="Default") const;
[850]103 inline G4GDMLAuxListType GetVolumeAuxiliaryInformation(const G4LogicalVolume* const logvol);
[921]104 inline void StripNamePointers() const;
105 inline void SetOverlapCheck(G4bool);
[850]106
107 // Methods for Writer
108 //
109 inline void AddModule(const G4VPhysicalVolume* const physvol);
110 inline void AddModule(const G4int depth);
111 inline void SetAddPointerToName(G4bool set);
112
113 private:
114
[921]115 G4GDMLReadStructure* reader;
116 G4GDMLWriteStructure* writer;
[1228]117 G4bool urcode, uwcode;
[850]118
[818]119};
120
[850]121#include "G4GDMLParser.icc"
122
[818]123#endif
Note: See TracBrowser for help on using the repository browser.