2 c...reads initialization information from a les houches events file on unit nlf.
3 subroutine lhefreadhdr(nlf)
9 1 read(nlf,fmt='(a)',err=998,end=998) string
10 if(string(1:5).eq.'<init') then
11 read(nlf,*) idbmup(1),idbmup(2),ebmup(1),ebmup(2),
12 & pdfgup(1),pdfgup(2),pdfsup(1),pdfsup(2),idwtup,nprup
14 read(nlf,*) xsecup(ipr),xerrup(ipr),xmaxup(ipr),
21 998 write(*,*) 'lhefreadhdr: could not find <init> data'
26 c...reads event information from a les houches events file on unit nlf.
27 subroutine lhefreadev(nlf)
30 character * 100 string
31 include 'LesHouches.h'
35 read(nlf,fmt='(a)',err=777,end=666) string
36 if(string.eq.'</LesHouchesEvents>') then
39 if(string(1:6).eq.'<event') then
40 c on error try next event. The error may be cause by merging
41 c truncated event files. On EOF return with no event found
42 read(nlf,*,end=998,err=1)nup,idprup,xwgtup,scalup,aqedup,aqcdup
44 read(nlf,*,end=998,err=1) idup(i),istup(i),mothup(1,i),
45 & mothup(2,i),icolup(1,i),icolup(2,i),(pup(j,i),j=1,5),
54 print *,"Error in reading"
62 print *,"read </LesHouchesEvents>"