EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
setctq6.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file setctq6.F
1 
2  Subroutine setctq6 (Iset)
3  Implicit Double Precision (a-h,o-z)
4  include "pepadm.inc"
5  parameter(isetmax0=3)
6  Character flnm(isetmax0)*20, nn*3, tablefile*40
7  Data (flnm(i), i=1,isetmax0)
8  & /'./pdf/cteq6l.tbl','./pdf/cteq6d.tbl','./pdf/cteq6m.tbl'/
9  Data isetold, isetmin0, isetmin1, isetmax1 /-987,1,101,140/
10 
11 C If data file not initialized, do so.
12  If(iset.ne.isetold) then
13  iu= nextun6()
14  If (iset.ge.isetmin0 .and. iset.le.isetmax0) Then
15 C Tablefile=Flnm(Iset)//'.tbl'
16  tablefile=flnm(iset)
17  Elseif (iset.ge.isetmin1 .and. iset.le.isetmax1) Then
18  write(nn,'(I3)') iset
19  tablefile=flnm(1)//nn//'.tbl'
20  Else
21  print *, 'Invalid Iset number in SetCtq6 :', iset
22  stop
23  Endif
24  Open(iu, file=tablefile, status='OLD', err=100)
25  21 Call readtbl6(iu)
26  Close (iu)
27  isetold=iset
28  Endif
29  Return
30 
31  100 print *, ' Data file ', tablefile, ' cannot be opened '
32  >//'in SetCtq6!!'
33  stop
34 C ********************
35  End