COSMOS v7.655  COSMOSv7655
(AirShowerMC)
bin2ascii.f
Go to the documentation of this file.
1  implicit none
2 #define FNODATDEF 33
3 ! echo xxx.bdat | bin2ascii...
4 !
5 #include "../FleshHist/Zprivate1.h"
6 #include "../FleshHist/Zprivate3.h"
7  character*120 file
8  real*8 Et, wx, wy, wz, firstdep
9  integer EventNo
10  integer*2 code
11  integer i
12 
13  read(*,'(a)') file
14  write(0,*) ' file name is '
15  write(0,*) file
16  open(fnodat, file=file, form="unformatted")
17 ! read(fnodat, err=11)
18 ! * EventNo, code, Et, wx, wy, wz, firstdep
19 ! goto 12
20 ! 11 continue
21 ! write(0,*) ' assuming old data without firstdep info'
22 ! old version data has no firstdep
23 ! rewind(fnodat)
24 ! read(fnodat)
25 ! * EventNo, code, Et, wx, wy, wz
26 ! firstdep=-1.
27 ! 12 continue
28 ! write(*,'("i ", i3, i4, 1pE12.3,0p3f11.7, f8.1)')
29 ! * EventNo, code, Et, wx, wy, wz, firstdep
30 
31  do while(.true.)
32  read(fnodat,end=100) bufc, (buf(i), i=1, bufc)
33  do i = 1, bufc
34 #if KeepWeight != yes
35  write(*,
36  * '(6i3, 1pE11.3, 0p,f6.1,1p2E11.3,0p, 2f8.4,f10.6)')
37  * buf(i).ldep, buf(i).code, buf(i).subcode,
38  * buf(i).charge, buf(i).ridx, buf(i).faiidx,
39  * buf(i).rinmu, buf(i).fai, buf(i).ek,
40  * buf(i).t, buf(i).wx, buf(i).wy, buf(i).wz
41 #else
42  write(*,
43  * '(6i3, 1pE11.3, 0p,f6.1,1p2E11.3,0p, 2f8.4,f10.6,1pE11.3)')
44  * buf(i).ldep, buf(i).code, buf(i).subcode,
45  * buf(i).charge, buf(i).ridx, buf(i).faiidx,
46  * buf(i).rinmu, buf(i).fai, buf(i).ek,
47  * buf(i).t, buf(i).wx, buf(i).wy, buf(i).wz,
48  * buf(i).wgt
49 #endif
50  enddo
51  enddo
52  100 continue
53  end
nodes i
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
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p charge
Definition: ZavoidUnionMap.h:1
nodes t
*Zfirst p fm *Zfirst p Zfirst p Zfirst p *Zfirst p *Zfirst pos xyz Zfirst pos xyz *Zfirst pos *Zfirst pos Zfirst pos *Zfirst pos *Zfirst Zfirst vec w *Zfirst vec w Zfirst vec *Zfirst wgt
Definition: ZavoidUnionMap.h:1
*Zfirst p fm *Zfirst p Zfirst p Zfirst p subcode
Definition: ZavoidUnionMap.h:1