]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEANT321/gbase/gzinit.F
Cleaning up.
[u/mrichter/AliRoot.git] / GEANT321 / gbase / gzinit.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:11  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  17.18.27  by  S.Giani
11 *-- Author :
12       SUBROUTINE GZINIT
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Routine to initialise GEANT/ZEBRA data structures        *
17 C.    *                                                                *
18 C.    *    ==>Called by : <USER>, UGINIT                               *
19 C.    *       Author    R.Brun  *********                              *
20 C.    *                                                                *
21 C.    ******************************************************************
22 C.
23 #include "geant321/gcbank.inc"
24 #include "geant321/gcflag.inc"
25 #include "geant321/gcjloc.inc"
26 #include "geant321/gctime.inc"
27 #include "geant321/gcmzfo.inc"
28 #include "geant321/gcscal.inc"
29       COMMON/GCLOCA/NLOCAL(2),LOCAL(20)
30 C.
31 C.    ------------------------------------------------------------------
32 C.
33       IF(IFINIT(2).NE.0)RETURN
34       IFINIT(2)=1
35 C
36 C                 Create one long range division (reverse)
37 C                 to store all constants
38 C                 The event structures are created in division 2
39 C                 of the store
40 C
41       MINCON=2000
42       MAXCON=8*NZEBRA/10
43       CALL MZDIV(IXSTOR,IXCONS,'Constants',MINCON,MAXCON,'LRC')
44       IXDIV=IXSTOR+2
45 C
46 C                 IXDIV and IXCONS are two self contained divisions.
47 C                 To gain time we specify that to ZEBRA
48 C
49       CALL MZXREF(IXCONS,IXDIV,'C')
50       CALL MZXREF(IXDIV,IXCONS,'C')
51 C
52 C                 Define a default work space of KWWORK words
53 C
54       CALL GWORK(KWWORK)
55 C
56 C                 Create a permanent link area for master pointers
57 C
58       CALL MZLINK(IXSTOR,'/GCLINK/',JDIGI,JSKLT,JDIGI)
59 C
60 C                 Create a permanent link area for param. pointers
61 C
62       CALL MZLINK(IXSTOR,'/GCSLNK/',LSCAN,LSLAST,LSCAN)
63 C
64 C                 Create temporary link areas
65 C
66       CALL MZLINT(IXSTOR,'/GCLOCA/',NLOCAL,LOCAL(1),LOCAL(20))
67       CALL MZLINT(IXSTOR,'/GCJLOC/',NJLOC ,JTM,JRANG)
68       CALL MZLINT(IXSTOR,'/GCJLCK/',NJLCK ,JTCKOV,JTASHO)
69 C
70 C             Define IO descriptors of GEANT banks
71 C
72       CALL MZFORM('MATE','5H -F'      ,IOMATE)
73       CALL MZFORM('PART','5H -F'      ,IOPART)
74       CALL MZFORM('TMED','5H -F'      ,IOTMED)
75       CALL MZFORM('SEJD','10I / 1H 1I',IOSEJD)
76       CALL MZFORM('SJDD','/ 1H 1I'    ,IOSJDD)
77       CALL MZFORM('SJDH','/ 1H 1I 2F' ,IOSJDH)
78       CALL MZFORM ('STAK', '3I / 3I 9F',IOSTAK)
79       CALL MZFORM('RUNG','20I 8F 2I'   ,IORUNG)
80 C
81 C             Create RUN header bank
82 C
83       CALL MZBOOK(IXCONS,JRUNG,JRUNG,1,'RUNG',1,1,30,IORUNG,0)
84       IQ(JRUNG-5)=1
85       IQ(JRUNG+1)=IDRUN
86 C
87 C             Fill header with default date,time,Geant and Zebra
88 C             version numbers for the 4 main GEANT data structures
89 C             INIT,KINE,HITS,DIGI
90 C
91        DO 10 I=1,4
92          IQ(JRUNG+2*I+ 9)=IGDATE
93          IQ(JRUNG+2*I+10)=IGTIME
94           Q(JRUNG+2*I+19)=GVERSN
95           Q(JRUNG+2*I+20)=ZVERSN
96   10  CONTINUE
97 C
98   99  RETURN
99       END
100