COSMOS v7.655  COSMOSv7655
(AirShowerMC)
bin2bin.f
Go to the documentation of this file.
1 #define FNODATDEF 33
2 #include "../FleshHist/Zprivate1.h"
3 #include "../FleshHist/Zprivate3.h"
4 !
5 ! convert .bdat made by FlehsHist into another .bdat
6 ! with a shorter record length.
7 ! input:
8 ! number of particles to be put in a record (< 100000)
9 ! input filename
10 ! echo '10 "xxx.bdat"' | bin2binPCLinuxIFC
11 ! output: filelname automatically made to be xxx.bdat2
12 !
13  character*120 file, file2
14  real*8 Et, wx, wy, wz
15  integer EventNo
16  integer*2 code
17  integer fnodat2, nptcl, i,j,k,l
18 
19  fnodat2=fnodat+1
20 
21  read(*, *) nptcl, file
22  write(0,*) ' file name is '
23  write(0,*) nptcl, file
24  file2=trim(file)//"2"
25  open(fnodat, file=file, form="unformatted")
26  open(fnodat2, file=file2,form="unformatted")
27  read(fnodat)
28  * eventno, code, et, wx, wy, wz
29  write(fnodat2)
30  * eventno, code, et, wx, wy, wz
31 
32  do while(.true.)
33  read(fnodat,end=100) bufc, buf
34  do i = 1, bufc, nptcl
35  j = min(bufc, i+nptcl-1)
36  k = j-i+1
37  write(fnodat2) k, (buf(l), l= i, j)
38  enddo
39  enddo
40  100 continue
41  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
********************block data cblkHeavy ********************integer j data *HeavyG2symbol *data *HeavyG2code kiron data j
Definition: cblkHeavy.h:36
*Zfirst p fm *Zfirst p Zfirst p code
Definition: ZavoidUnionMap.h:1