This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gkine / gpvert.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:18  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.21  by  S.Giani
11 *-- Author :
12       SUBROUTINE GPVERT(IV)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *       Prints vertex bank JVERTX for vertex number IV           *
17 C.    *       If IV=0 Prints all vertex banks                          *
18 C.    *                                                                *
19 C.    *    ==>Called by : <USER>, GPRINT                               *
20 C.    *       Author    R.Brun  *********                              *
21 C.    *                                                                *
22 C.    ******************************************************************
23 C.
24 #include "geant321/gcbank.inc"
25 #include "geant321/gcnum.inc"
26 #include "geant321/gcunit.inc"
27 C.
28 C.    ------------------------------------------------------------------
29 C.
30       WRITE(CHMAIL,1000)
31       CALL GMAIL(1,0)
32 C
33       I1=1
34       I2=NVERTX
35       IF(IV.NE.0)I1=IV
36       IF(IV.NE.0)I2=IV
37       IF(I2.GT.NVERTX)GO TO 99
38       IF(I1.LT.1)GO TO 99
39       IF(JVERTX.LE.0)GO TO 99
40 C
41       DO 20 IVERT=I1,I2
42          JV=LQ(JVERTX-IVERT)
43          IF(JV.NE.0)THEN
44             TOFGN=Q(JV+4)*1.E+9
45             NL=IQ(JV-2)
46             NG=Q(JV+7)+7
47             NW=MIN(NG,16)
48             WRITE(CHMAIL,2000)IVERT,(Q(JV+I),I=1,3),TOFGN,
49      +          INT(Q(JV+5)),INT(Q(JV+6)),(INT(Q(JV+L)),L=8,NW)
50   10        CALL GMAIL(0,0)
51             IF(NG-NW.GT.0) THEN
52                NS=NW+1
53                NW=MIN(NG,NW+9)
54                WRITE(CHMAIL,3000)(INT(Q(JV+L)),L=NS,NW)
55                GOTO 10
56             ENDIF
57             IF(NL.GT.0) THEN
58                JUV = LQ(JV-1)
59                IF(JUV.GT.0) THEN
60                   WRITE(CHMAIL,4000)
61                   CALL GMAIL(0,0)
62                   ND  = IQ(JUV-1)
63                   NW=MIN(ND,9)
64                   WRITE(CHMAIL,5000) (Q(JUV+L),L=1,NW)
65    15             CALL GMAIL(0,0)
66                   IF(ND-NW.GT.0) THEN
67                      NS=NW+1
68                      NW=MIN(ND,NW+9)
69                      WRITE(CHMAIL,5000) (Q(JUV+L),L=NS,NW)
70                      GO TO 15
71                   END IF
72                END IF
73             END IF
74          ENDIF
75    20 CONTINUE
76 C
77  1000 FORMAT(3X,'Vert',8X,'Vx',11X,'Vy',11X,'Vz',8X,'Tofg',
78      +       3X,'Tbeam',3X,'Targ',14X,'Gener tracks')
79  2000 FORMAT(2X,I4,3(1X,F12.4),1X,F10.4,2X,2(I5,2X),9(1X,I4))
80  3000 FORMAT(72X,9(1X,I4))
81  4000 FORMAT(62X,'User words')
82  5000 FORMAT(1X,9(2X,E12.5))
83 C
84   99  RETURN
85       END