From: hackbard Date: Tue, 14 Sep 2004 17:57:23 +0000 (+0000) Subject: - X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c53ee63cb2a377bf6f2ca58333a5dff30c2785;p=physik%2Fnlsop.git - --- diff --git a/parse_trim_collision.c b/parse_trim_collision.c index ea59d6b..5469bfa 100644 --- a/parse_trim_collision.c +++ b/parse_trim_collision.c @@ -30,7 +30,9 @@ int main(int argc,char **argv) { int fd,ion,i,j; int z,skipped; - float en; + double en; + double max_e; + int max_chfi,max_th; t_z Z[MAXZ]; unsigned char hit[MAXZ]; char buf[256],*p,value[6],value2[10]; @@ -63,10 +65,19 @@ int main(int argc,char **argv) { j=read(fd,&buf[i],1); if(j<=0) { close(fd); + /* norm */ + max_e=Z[0].energy; + max_th=Z[0].total_hits; + max_chfi=Z[0].cell_hits_from_ions; + for(i=0;imax_e) max_e=Z[i].energy; + if(Z[i].total_hits>max_th) max_th=Z[i].total_hits; + if(Z[i].cell_hits_from_ions>max_chfi) max_chfi=Z[i].cell_hits_from_ions; + } for(i=0;i