COSMOS v7.655  COSMOSv7655
(AirShowerMC)
seeascii.f
Go to the documentation of this file.
1  implicit none
2 #include "Zprivate.h"
3 #include "Ztrack.h"
4 
5 
6 
7  integer num, cumnum, irevent(2), i, nr, firstev, lastev
8  type(track)::Zfirst
9  character*160 str
10  character*80 skelin, stro(3)
11 
12  real*8 temp
13 
14  integer klena, nlow
15 
16  mdev = 71
17  rdev = 70
18 
19  str = ' '
20  read(*,'(a)') str
21 !
22  do i = 1, 3
23  stro(i) = ' '
24  enddo
25 !
26  call ksplit(str, 80, 3, stro, nr)
27  if(nr .lt. 3) stop 'must give 1 file and 2 event #'
28 
29  skelin = stro(1)
30  read( stro(2), * ) firstev
31  read( stro(3), * ) lastev
32 
33 
34  open(rdev, file=skelin(1:klena(skelin)), form='unformatted',
35  * status='old')
36 
37  do while(.true.)
38  read(rdev, end= 1000) cumnum, num, irevent, zfirst
39 
40  if(cumnum .gt. lastev) goto 1000
41 
42  copy =cumnum .ge. firstev .and. cumnum .le. lastev
43  if(copy) then
44  call toasciih(cumnum, num, irevent, zfirst)
45  endif
46  call cgethes(rdev)
47  nlow = 1
48  do while (nlow .ne. -1)
49  read(rdev) nlow, p
50  if(copy) then
51  call toasciin( nlow, p)
52  endif
53  do i = 1, nlow
54  read(rdev) c
55  if(copy) then
56  call toasciic(c)
57  endif
58  enddo
59  enddo
60  enddo
61  1000 continue
62  if(lastev .gt. cumnum) then
63  call cerrormsg(
64  * 'EOF before the specified last event reached; ok?', 1)
65  else
66  call cerrormsg(
67  * ' all events processed successfully', 1)
68  endif
69 
70  end
71 
72 
73  subroutine cgethes(from)
74  implicit none
75 #include "Zprivate.h"
76  integer from
77 !
78 
79  integer i
80 
81  read(from) np
82  if(copy) then
83  call toasciinp(np)
84  endif
85  do i = 1, np
86  read(from) o(i)
87  if(copy) then
88  call toasciihe(o(i))
89  endif
90  enddo
91 
92  end
subroutine ksplit(a, m, n, b, nr)
Definition: ksplit.f:2
subroutine cerrormsg(msg, needrtn)
Definition: cerrorMsg.f:4
subroutine toasciih(cnum, num, ir, zf)
Definition: asciiprint.f:2
nodes i
subroutine toasciinp(n)
Definition: asciiprint.f:51
Definition: Ztrack.h:44
block data cblkElemag data *AnihiE ! Eposi< 1 TeV, anihilation considered *X0/365.667/, ! radiation length of air in kg/m2 *Ecrit/81.e-3/, ! critical energy of air in GeV *MaxComptonE/1./, ! compton is considered below 1 GeV *MaxPhotoE/1.e-3/, ! above this, PhotoElectric effect neg. *MinPhotoProdE/153.e-3/, ! below 153 MeV, no gp --> hadrons ! scattering const not MeV *Knockon true
Definition: cblkElemag.h:7
********************block data cblkHeavy ********************integer j data *HeavyG2symbol p
Definition: cblkHeavy.h:7
subroutine toasciihe(he)
Definition: asciiprint.f:62
subroutine cgethes(from)
Definition: chookFlesh.f:322
struct ob o[NpMax]
Definition: Zprivate.h:34
integer function klena(cha)
Definition: klena.f:20
subroutine toasciic(cc)
Definition: asciiprint.f:41
subroutine toasciin(nlow, pp)
Definition: asciiprint.f:22
dE dx *! Nuc Int sampling table c
Definition: cblkMuInt.h:130