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 | // |
---|
27 | // $Id: G4GDMLReadStructure.hh,v 1.24 2009/02/24 17:41:44 gcosmo Exp $ |
---|
28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
29 | // |
---|
30 | // |
---|
31 | // class G4GDMLReadStructure |
---|
32 | // |
---|
33 | // Class description: |
---|
34 | // |
---|
35 | // GDML class for import of structures. |
---|
36 | |
---|
37 | // History: |
---|
38 | // - Created. Zoltan Torzsok, November 2007 |
---|
39 | // ------------------------------------------------------------------------- |
---|
40 | |
---|
41 | #ifndef _G4GDMLREADSTRUCTURE_INCLUDED_ |
---|
42 | #define _G4GDMLREADSTRUCTURE_INCLUDED_ |
---|
43 | |
---|
44 | #include "G4AssemblyVolume.hh" |
---|
45 | #include "G4LogicalVolume.hh" |
---|
46 | #include "G4LogicalVolumeStore.hh" |
---|
47 | #include "G4PhysicalVolumeStore.hh" |
---|
48 | #include "G4PVDivision.hh" |
---|
49 | #include "G4PVPlacement.hh" |
---|
50 | #include "G4PVReplica.hh" |
---|
51 | #include "G4SolidStore.hh" |
---|
52 | #include "G4VPhysicalVolume.hh" |
---|
53 | #include "G4ReflectionFactory.hh" |
---|
54 | #include "G4PhysicalVolumeStore.hh" |
---|
55 | #include "G4LogicalSkinSurface.hh" |
---|
56 | #include "G4LogicalBorderSurface.hh" |
---|
57 | #include "G4PVDivisionFactory.hh" |
---|
58 | |
---|
59 | #include "G4GDMLReadParamvol.hh" |
---|
60 | |
---|
61 | struct G4GDMLAuxPairType |
---|
62 | { |
---|
63 | G4String type; |
---|
64 | G4double value; |
---|
65 | }; |
---|
66 | |
---|
67 | typedef std::vector<G4GDMLAuxPairType> G4GDMLAuxListType; |
---|
68 | typedef std::map<const G4LogicalVolume*,G4GDMLAuxListType> G4GDMLAuxMapType; |
---|
69 | |
---|
70 | class G4GDMLReadStructure : public G4GDMLReadParamvol |
---|
71 | { |
---|
72 | |
---|
73 | public: |
---|
74 | |
---|
75 | G4VPhysicalVolume* GetPhysvol(const G4String&) const; |
---|
76 | G4LogicalVolume* GetVolume(const G4String&) const; |
---|
77 | G4GDMLAuxListType GetVolumeAuxiliaryInformation(const G4LogicalVolume* const); |
---|
78 | G4VPhysicalVolume* GetWorldVolume(const G4String&); |
---|
79 | const G4GDMLAuxMapType* GetAuxMap() const; |
---|
80 | |
---|
81 | virtual void VolumeRead(const xercesc::DOMElement* const); |
---|
82 | virtual void Volume_contentRead(const xercesc::DOMElement* const); |
---|
83 | virtual void StructureRead(const xercesc::DOMElement* const); |
---|
84 | |
---|
85 | protected: |
---|
86 | |
---|
87 | G4GDMLAuxPairType AuxiliaryRead(const xercesc::DOMElement* const); |
---|
88 | void BordersurfaceRead(const xercesc::DOMElement* const); |
---|
89 | void DivisionvolRead(const xercesc::DOMElement* const); |
---|
90 | G4LogicalVolume* FileRead(const xercesc::DOMElement* const); |
---|
91 | void PhysvolRead(const xercesc::DOMElement* const); |
---|
92 | void ReplicavolRead(const xercesc::DOMElement* const, G4int number); |
---|
93 | void ReplicaRead(const xercesc::DOMElement* const replicaElement, |
---|
94 | G4LogicalVolume* logvol,G4int number); |
---|
95 | EAxis AxisRead(const xercesc::DOMElement* const axisElement); |
---|
96 | G4double QuantityRead(const xercesc::DOMElement* const readElement); |
---|
97 | void SkinsurfaceRead(const xercesc::DOMElement* const); |
---|
98 | |
---|
99 | protected: |
---|
100 | |
---|
101 | G4GDMLAuxMapType auxMap; |
---|
102 | G4LogicalVolume *pMotherLogical; |
---|
103 | |
---|
104 | }; |
---|
105 | |
---|
106 | #endif |
---|