*$ CREATE SOEVSV.FOR
*COPY SOEVSV
*
*=== Soevsv ===========================================================*
*
      SUBROUTINE SOEVSV

      INCLUDE '(DBLPRC)'
      INCLUDE '(DIMPAR)'
      INCLUDE '(IOUNIT)'
*
*----------------------------------------------------------------------*
*                                                                      *
*     Copyright (C) 1996-2020      by    Alfredo Ferrari & Paola Sala  *
*     All Rights Reserved.                                             *
*                                                                      *
*                                                                      *
*     SOurce EVent SaVing:                                             *
*                                                                      *
*     Created on 14 November 1996  by    Alfredo Ferrari & Paola Sala  *
*                                                Infn - Milan          *
*                                                                      *
*     Last change on  11-Jan-20    by             Paola Sala           *
*                                                Infn - Milan          *
*                                                                      *
*----------------------------------------------------------------------*
*
      INCLUDE '(FLKSTK)'
      INCLUDE '(SOUEVT)'
*
      NPSOEV = MIN ( NPFLKA, MXSOEV )
*  +-------------------------------------------------------------------*
*  |  Loop on stack events:
      DO 1000 I = 1, NPSOEV
         XSOEVT (I) = XFLK   (I)
         YSOEVT (I) = YFLK   (I)
         ZSOEVT (I) = ZFLK   (I)
         TXSOEV (I) = TXFLK  (I)
         TYSOEV (I) = TYFLK  (I)
         TZSOEV (I) = TZFLK  (I)
         TXPSOV (I) = TXPOL  (I)
         TYPSOV (I) = TYPOL  (I)
         TZPSOV (I) = TZPOL  (I)
         WTSOEV (I) = WTFLK  (I)
         PMSOEV (I) = PMOFLK (I)
         TKSOEV (I) = TKEFLK (I)
         AGSOEV (I) = AGESTK (I)
         AKSOEV (I) = AKNSHR (I)
         EXSOEV (I) = EEXSTK (I)
         TMSOEV (I) = TMNSTK (I)
         RDSOEV (I) = RADDLY (I)
         ECSOEV (I) = ECRFLK (I)
         EPSOEV (I) = EKPSTK (I)
         AFSOEV (I) = ANFSTK (I)
         IJSOEV (I) = ILOFLK (I)
         ILSOEV (I) = ILVSTK (I)
         IGSOEV (I) = IGROUP (I)
         NRSOEV (I) = NRGFLK (I)
         NLSOEV (I) = NLATTC (I)
         KCSOEV (I) = KCHFLK (I)
         IPSOEV (I) = IPRSTK (I)
         IFSOEV (I) = INFSTK (I)
         LFSOEV (I) = LNFSTK (I)
         IASOEV (I) = IRDAZM (I)
         LRSOEV (I) = LRADDC (I)
         LOSOEV (I) = LOUSE  (I)
         DO 200 ISPR = 1, MKBMX1
            USSOEV (ISPR,I) = SPAREK (ISPR,I)
  200    CONTINUE
         DO 300 ISPR = 1, MKBMX2
            IUSOEV (ISPR,I) = ISPARK (ISPR,I)
  300    CONTINUE
 1000 CONTINUE
*  |
*  +-------------------------------------------------------------------*
      RETURN
*=== End of subroutine Soevsv =========================================*
      END

