PROGRAM TSTIO C C read in events and histogram contents C #include "stdlun.inc" integer lok,ifl,istr,ntries,i,ihst(4) character*11 filin(4),filrd data filin/'stdtsthx.io','stdtstix.io','stdtstjx.io', 1 'stdtstpx.io'/ data ihst/0,40,20,60/ C initialize HEP logical units lnhwrt=0 lnhrd=23 lnhdcy=0 lnhout=22 open(unit=lnhout,file='stdtstio.lpt',status='new') call tstbkem(-1) C...initialize MCFio once only call mcfio_init() C...now open and read events do i=1,4 filrd=filin(i) call stdxropen(filrd,ntries,istr,lok) if(lok.ne.0) write(lnhout,1001) filrd if(lok.ne.0) go to 200 write(lnhout,1002) filrd 10 call stdxrd(ifl,istr,lok) if(lok.ne.0) go to 100 C... histogram cross section if it exists if(ifl.eq.100 .or. ifl.eq.200) call tstflxsec(ihst(i)) C... keep looping if this is not a STDHEP record if(ifl.ne.1) go to 10 call tstflem(ihst(i)) go to 10 100 continue call stdxend(istr) 200 continue enddo C...print histograms call houtpu(lnhout) call histdo 1001 format(' could not open file ',a12) 1002 format(' file ',a12,' has been opened') end