source: trunk/source/g3tog4/src/rztog4.F@ 1036

Last change on this file since 1036 was 965, checked in by garnier, 17 years ago

update g3tog4

File size: 3.9 KB
Line 
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: rztog4.F,v 1.4 2006/06/29 18:15:18 gunter Exp $
28* GEANT4 tag $Name: geant4-09-02-ref-02 $
29*
30 program rztog4
31************************************************************************
32*
33* rztog4
34*
35* A standalone program to convert a Geant RZ initialization file
36* (containing geometry, materials, etc.) to a Geant4 C++
37* geometry.
38*
39* Torre Wenaus, LLNL 6/95
40*
41* todo:
42* - attributes
43*
44* JSHAPE routine of Jouko Vuoskoski, CERN employed.
45*
46*... History:
47* 15-Jan-1997 Lockman : put tog4 in a separate file
48************************************************************************
49 implicit none
50#include "G3toG4.inc"
51 integer iargc, lenocc, ln, lnout
52 character*256 file, ofile
53*
54 real h, q
55 integer nh, nz
56 parameter (nh=1000000, nz=2000000)
57 common/pawc/h(nh)
58 common/gcbank/q(nz)
59C
60 COMMON/GCUNIT/LIN,LOUT,NUNITS,LUNITS(5)
61 INTEGER LIN,LOUT,NUNITS,LUNITS
62 COMMON/GCMAIL/CHMAIL
63 CHARACTER*132 CHMAIL
64 logical lexist
65*
66 lout = 6
67*
68 if( iargc() .gt. 0 ) then
69 call getarg(1,file)
70 ln = lenocc(file)
71 else
72 print *,'rztog4 <rzfile> [ <call-list> ]'
73 print *,'<rzfile> : name of the ZEBRA rz file'
74 print *,'<call-list> : name of output call list file'
75 print *,'(def: g3calls.dat)'
76 print *,'You need to specify an rz file'
77 goto 999
78 endif
79
80 if (iargc() .gt. 1 ) then
81 call getarg(2,ofile)
82 else
83 ofile='g3calls.dat'
84 end if
85 inquire(file=file(:ln),exist=lexist)
86 if (.not.lexist) then
87 write(6,*) 'rz-file "',file(:ln),'" doesn''t exist.'
88 stop 1
89 end if
90*
91*** Geant/Zebra initialization
92 call gzebra(nz)
93 call gzinit
94 call grfile(90,file(:ln),'i')
95*
96*** conversion initialization
97 dogeom = .false.
98 context = '----'
99 lunlist = 98
100 lnout = lenocc(ofile)
101 open(unit=lunlist,file=ofile(:lnout),status='unknown')
102 print *,'Opened call list file ',ofile(:lnout)
103*
104 luncode = 99
105 luncode = 0
106 nfile = 1
107 call g3source
108*
109*** do conversion
110 call tog4
111*
112 999 end
113
Note: See TracBrowser for help on using the repository browser.