~maddevelopers/mg5amcnlo/2.9.4

« back to all changes in this revision

Viewing changes to vendor/StdHEP/src/stdhep/stdxwevtup.F

pass to v2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine stdxwevtup(ilbl,istream,lok)
 
2
 
 
3
C...Purpose: to write an event from the standard common block.
 
4
C
 
5
C          ilbl = 11    write HEPEUP common block
 
6
C          ilbl = 12    write HEPRUP common block
 
7
C          lok  = 0     if no problems were encountered
 
8
 
 
9
#include "hepeup.inc"
 
10
#include "heprup.inc"
 
11
#include "stdcnt.inc"
 
12
#include "stdlun.inc"
 
13
#include "mcfio.inc"
 
14
 
 
15
      integer ilbl,lok,istream
 
16
      integer xdr_hepeup, xdr_heprup
 
17
      external xdr_hepeup, xdr_heprup
 
18
 
 
19
      lok=0
 
20
 
 
21
      if(ilbl.eq.11)then
 
22
        if(nup.le.0)then
 
23
            write(lnhout,101) nup
 
24
        else
 
25
            if(mcfio_block(istream, MCFIO_HEPEUP, xdr_hepeup)
 
26
     1                   .eq. -1) go to 700
 
27
            if(mcfio_NextEvent(istream) .eq. -1) go to 900
 
28
            nlhwrt = nlhwrt + 1
 
29
          endif
 
30
      elseif(ilbl.eq.12)then
 
31
        if(mcfio_block(istream, MCFIO_HEPRUP, xdr_heprup)
 
32
     1      .eq. -1) go to 800
 
33
        if(mcfio_NextEvent(istream) .eq. -1) go to 900
 
34
        nlhwrt = nlhwrt + 1
 
35
      endif
 
36
 
 
37
      return
 
38
 
 
39
  700 write (lnhout,701) 
 
40
      lok=2
 
41
      stop
 
42
  800 write (lnhout,801) 
 
43
      lok=2
 
44
      stop
 
45
  900 write (lnhout,901) 
 
46
      lok=1
 
47
      stop
 
48
  101 format(/5X,'stdxwevtup: no particles to write for HEPEUP block')
 
49
  701 format(/5X,'stdxwevtup: error filling Les Houches HEPEUP block ')
 
50
  801 format(/5X,'stdxwevtup: error filling Les Houches HEPRUP block ')
 
51
  901 format(/5X,'stdxwevtup: error writing Les Houches event ')
 
52
      end