]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TFluka/FLUKA_input.f
New functions (Marian)
[u/mrichter/AliRoot.git] / TFluka / FLUKA_input.f
1 *======================================================================*
2 * Routines to open and close a given file with a given FORTRAN unit    *
3 * from the C++ world                                                   *
4 *======================================================================*
5 *
6 *=== FLUKA_OPENINP ====================================================*
7 *
8       SUBROUTINE FLUKA_OPENINP(IOUNIT,FILNAM)
9 *
10 *----------------------------------------------------------------------*
11 * Opens a file with a given unit number
12 *
13 *
14 * IOUNIT: Input unit to be assiged to the file
15 * FILNAM: Name of the file
16 *
17 *----------------------------------------------------------------------*
18 *
19
20       IMPLICIT NONE
21       INTEGER IOUNIT
22       CHARACTER*(*) FILNAM
23
24       OPEN (UNIT=IOUNIT, FILE=FILNAM, STATUS="OLD")
25       RETURN
26  9999 END
27
28       SUBROUTINE FLUKA_OPENOUT(IOUNIT,FILNAM)
29 *
30 *----------------------------------------------------------------------*
31 * Opens a file with a given unit number
32 *
33 *
34 * IOUNIT: Input unit to be assiged to the file
35 * FILNAM: Name of the file
36 *
37 *----------------------------------------------------------------------*
38 *
39
40       IMPLICIT NONE
41       INTEGER IOUNIT
42       CHARACTER*(*) FILNAM
43
44       OPEN (UNIT=IOUNIT, FILE=FILNAM, STATUS="UNKNOWN")
45
46       RETURN
47  9999 END
48
49
50 *
51 *=== FLUKA_CLOSEINP ====================================================*
52 *
53       SUBROUTINE FLUKA_CLOSEINP(IOUNIT)
54 *
55 *----------------------------------------------------------------------*
56 * Closes the given unit number
57 *
58 *
59 * IOUNIT: Input unit to be assiged to the file
60 *
61 *----------------------------------------------------------------------*
62 *
63       IMPLICIT NONE
64       INTEGER IOUNIT
65
66
67       CLOSE (UNIT=IOUNIT)
68
69       RETURN
70  9999 END