C  FUSER.FOR

      interface to subroutine debmsg[c,varying](fmt)
      character*32 fmt[reference]
      end

c================================================
      subroutine runavg(param, insig, outsig)
c*
c*
c*    INPUT(S):   insig(1)  = data to be averaged
c*    OUTPUT(S):  outsig(1) = running average
c*    PARAMETERS: param(1)  = data count
c*                param(2)  = running sum
c*
c*************** Dimensioning *****************************
      real*8 param(2), insig(1), outsig(1)

      param(1) = param(1) + 1
      param(2) = param(2) + insig(1)
      outsig(1) = param(2)/param(1)
! Uncomment next line to get debug output
!     call debMsg('data=%g count=%g sum=%g'c,insig(1),param(1),param(2))
      end

      subroutine runavgPI( param )
      real*8 param(2)
      param(1) = 0
      param(2) = 0
      end

      integer*4 function runavgPA( pCount )
      integer*2 pCount
      pCount = 2
      runavgPA = 8*2 	! room for 2 real*8's
      end

      integer*4 function runavgPC( )
      runavgPC = LOC( 'Data Count;Sum'c)
      end

C Place holders for Simulation Start and End events
      subroutine runavgSE( param, runCount )
      real*8 param(2)
      integer*4 runCount
      param(1) = 0
      param(2) = 0
      end

      subroutine runavgSS( param, runCount )
      real*8 param(2)
      integer*4 runCount    
      param(1) = 0
      param(2) = 0
      end

