EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
setctq4.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file setctq4.F
1 
2  Subroutine setctq4 (Iset)
3  Implicit Double Precision (a-h,o-z)
4  INTEGER imxpdf
5  parameter(imxpdf=40)
6  COMMON /pepadm/cpdfnam(2,imxpdf),ipdfnam(2,imxpdf),
7  & iplst(10),cunpol,cpol
8  CHARACTER*256 cpdfnam,cunpol,cpol
9  INTEGER iplst,ipdfnam
10  SAVE /pepadm/
11 
12 **************************************************************
13 *
14 * IPLST(1) = 0 (default) : number of PDF warnings
15 * IPLST(2) = 11 (default) : unit -1- for pdf files
16 * IPLST(3) = 12 (default) : unit -2- for pdf files
17 *
18 **************************************************************
19 
20  parameter(isetmax=14)
21  Character flnm(isetmax)*12, tablefile*40
22  Data (flnm(i), i=1,isetmax)
23  > / 'cteq4m.tbl', 'cteq4d.tbl', 'cteq4l.tbl'
24  > , 'cteq4a1.tbl', 'cteq4a2.tbl', 'cteq4m.tbl', 'cteq4a4.tbl'
25  > , 'cteq4a5.tbl', 'cteq4hj.tbl', 'cteq4lq.tbl'
26  > , 'cteq4hq.tbl', 'cteq4hq1.tbl', 'cteq4f3.tbl', 'cteq4f4.tbl' /
27  Data tablefile / 'test.tbl' /
28  Data isetold, isetmin, isettest / -987, 1, 911 /
29 
30 C If data file not initialized, do so.
31 C Rewrite file name to fit Pepsi distribution format
32 C
33  If(iset.ne.isetold) then
34  iu= nextun()
35  If (iset .eq. isettest) then
36  print* ,'Opening ', tablefile
37  Open(iu, file=tablefile, status='OLD', err=101)
38  ElseIf (iset.lt.isetmin .or. iset.gt.isetmax) Then
39  print *, 'Invalid Iset number in SetCtq4 :', iset
40  stop
41  Else
42 * Tablefile=Flnm(Iset)
43 * Tablefile='./pdf/'
44  Open(iplst(2), file=cunpol, status='OLD', err=100)
45  iu=iplst(2)
46  Endif
47  Call readtbl(iu)
48  Close (iu)
49  isetold=iset
50  Endif
51  Return
52 
53  100 print *, ' Data file ', tablefile, ' cannot be opened '
54  >
55  stop
56  101 print*, tablefile, ' cannot be opened '
57  print*, 'Please input the .tbl file:'
58  Read (*,'(A)') tablefile
59 
60 C ********************
61  End