      program cvtntp
      parameter(ih=4000000,ntidn=1)
      common/pawc/h(ih)
      character*480 chtmp
      common/quest/iquest(100)

      common/ntpc/itype,charge,energy,weight,x,y,r,z,t,vx,vy
      real*4 energy,weight,x,y,r,z,t,vx,vy
      integer*4 itype,charge

      
      
      call hlimit(ih)
      lrecl=1024
      iquest(10)=64000
      call hropen(8,'ntupl','gpgnd.ntp','q',lrecl,istat)
      call hcdir('//ntupl',' ')
      call hrin(1,9999,0)
      call hnoent(1,nevents)
      call hbname(1,' ',0,'$CLEAR')      
      call hbname(1,'PARTICLE',itype,'$SET')
      do i=1,nevents
         call hgntb(1,'PARTICLE',i,ier)
         print *,itype,charge,10**energy,10**weight,x,y,r,z,t,vx,vy
      enddo
 10   format(I1,I3,g9.2,e9.2,f7.0,f7.0,f6.0,f5.0,f8.0,f4.0,f5.0)
      end
      

