10 integer fnoI/31/, fnoO/32/
11 character*256 filename, Ofilename
12 integer kwhistReadAscii
29 *
" ascii2bin: convert 1D ascii histogram into binary histo" 30 write(0,*)
"Usage: ./ascii2bin$ARCH asciiInputFile " 31 write(0,*)
" asciiInputFile: its extension must be .ahist" 32 write(0,*)
" If input is xxx.ahist, then output file name " 33 write(0,*)
" is made to be ***** xxxx.hist **** " 37 call getarg(1, filename, status)
38 filel = klena(filename)
39 write(0,*) status, filename(1:filel)
41 * filename(filel-5:filel) .ne.
".ahist" )
then 42 write(0,*)
"input file name extension must be .ahist" 45 open(fnoi, file=filename,
46 * iostat=status, access=
'sequential',
47 * form=
'formatted', action=
'read')
48 if(status .ne. 0 )
then 49 write(0,*)
' cannot open file =' 53 ofilename = filename(1:filel-6)//
".hist" 54 open(fnoo, file=ofilename,
55 * iostat=status, access=
'sequential',
56 * form=
'unformatted', action=
'write')
57 if(status .ne. 0 )
then 58 write(0,*)
"could not open file" 65 nbinhisto=kwhistreadascii(h1, fnoi)
66 if(nbinhisto .le. 0 )
exit
void kwhistd(struct histogram1 *h)
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
void kwhists(struct histogram1 *h, float inorm)
void kwhistw(struct histogram1 *h, FILE *bfnow)