Program Read_Ntuple * implicit none integer nhmax Parameter (Nhmax = 100000) integer hmemor Common /Pawc/ Hmemor(Nhmax) integer ista,i,j,ic integer ievent,idate,iadc,itdc,icnt,np,npa real xx,yy Common /clusters/ievent,idate,iadc(10), + itdc(2),icnt(10), + np(6),xx(15,6,6),npa(7:10),yy(15,6,7:10) Character*1000 Chform1,chform2 * chform1='ievent,idate,'// +'iadc(10),itdc(2),icnt(10),'// +'np1[0,15],np2[0,15],np3[0,15],'// +'np4[0,15],np5[0,15],np6[0,15],'// +'cog1(np1),ter1(np1),surf1(np1),sovn1(np1),'// +'first1(np1),xlen1(np1),'// +'cog2(np2),ter2(np2),surf2(np2),sovn2(np2),'// +'first2(np2),xlen2(np2),'// +'cog3(np3),ter3(np3),surf3(np3),sovn3(np3),'// +'first3(np3),xlen3(np3),'// +'cog4(np4),ter4(np4),surf4(np4),sovn4(np4),'// +'first4(np4),xlen4(np4),'// +'cog5(np5),ter5(np5),surf5(np5),sovn5(np5),'// +'first5(np5),xlen5(np5),'// +'cog6(np6),ter6(np6),surf6(np6),sovn6(np6),'// +'first6(np6),xlen6(np6)' chform2= +'np7[0,15],np8[0,15],np9[0,15],'// +'np10[0,15],'// +'cog7(np7),ter7(np7),surf7(np7),sovn7(np7),'// +'first7(np7),xlen7(np7),'// +'cog8(np8),ter8(np8),surf8(np8),sovn8(np8),'// +'first8(np8),xlen8(np8),'// +'cog9(np9),ter9(np9),surf9(np9),sovn9(np9),'// +'first9(np9),xlen9(np9),'// +'cog10(np10),ter10(np10),surf10(np10),'// +'sovn10(np10),'// +'first10(np10),xlen10(np10)' * Call Hlimit(Nhmax) * * Create and fill the Ntuple 100 * Call Hropen(10,'p','p.hbook','N',1024,Ista) If (Ista.Ne.0) Stop Call Hbnt(1,'Scsicor','D') Call Hbname(1,'clusters',ievent,chform1) call hbname(1,'clusters',npa(7),chform2) * open(20,file='run101.lis',status='old',form='formatted') 10 continue read(20,*,end=30)ievent read(20,*,end=30)idate read(20,*,end=30)iadc,itdc read(20,*,end=30)icnt do i=1,10 if (i.lt.7) then read(20,*,end=30)np(i) do j=1,np(i) read(20,101,err=40,end=30) + xx(j,1,i),xx(j,2,i),xx(j,3,i),xx(j,4,i), + xx(j,5,i),xx(j,6,i) enddo else read(20,*,end=30)npa(i) do j=1,npa(i) read(20,101,err=40,end=30) + yy(j,1,i),yy(j,2,i),yy(j,3,i),yy(j,4,i), + yy(j,5,i),yy(j,6,i) enddo endif enddo write(*,*)'event ',ievent Call Hfnt(1) goto 10 * 30 continue Call Hrout(0,IC,' ') Call Hrend('p') Close(10) * stop 40 write(*,*)'error in reading' goto 30 100 format(i7) 101 format(f7.2,1x,f7.2,1x,f7.2,1x,f7.2,1x,i4,1x,i2) End