1 c Automatically determine the path to the system's PDF set
2 c collection using the lhapdf-config utility (which must be
3 c in the user's execution path
4 c ---------------------------------------------------------
5 subroutine InitPDFsetByCodes(code1, code2, code3)
6 write(*,*) "Not implemented yet: this will move the 'glue' interf
7 +ace to LHAPDF proper and use the InitPDFsetByName function to get
8 +the path automatically."
11 c ---------------------------------------------------------
14 c Automatically determine the path to the system's PDF set
15 c collection using the lhapdf-config utility (which must be
16 c in the user's execution path
17 c --------------------------------------------------------
18 subroutine InitPDFsetByName(setname)
23 call InitPDFsetByNameM(nset,setname)
28 subroutine InitPDFsetByNameM(nset,setname)
30 include 'parmsetup.inc'
31 include 'pathsetup.inc'
33 common/LHAPDFC/lhapath
34 character*20 lhaparm(20)
36 common/LHACONTROL/lhaparm,lhavalue
40 integer n, dirpathlength, setnamelength
41 character*512 dirpath, homepath, dotlhapath, cachepath, setpath
47 c check enviromental variable LHAPATH
48 call getenv('LHAPATH',dirpath)
49 if (dirpath.eq.'') then
50 C Take the data from $ALICE_ROOT/LHAPDF/PDFsets
51 CALL GETENV('ALICE_ROOT',CHROOT)
52 LNROOT = LNBLNK(CHROOT)
54 dirpath='PDFsets' ! Default value
56 dirpath=CHROOT(1:LNROOT)//'/LHAPDF/PDFsets'
60 c Now build the path to the PDF set
61 setpath = dirpath(:LEN_TRIM(dirpath)) // "/" //
62 +setname(:LEN_TRIM(setname))
64 c Initialize using the detected PDF set
65 call InitPDFsetM(nset, setpath(:LEN_TRIM(setpath)))
68 c ---------------------------------------------------------
70 subroutine InitPDFset(setpath)
75 call InitPDFsetM(nset,setpath)
79 subroutine InitPDFsetM(nset,setpath)
81 include 'parmsetup.inc'
85 integer id,token,Ctoken
87 common/lhasilent/lhasilent
92 open(unit=1,file=setpath,status='old')
94 if ((index(s2,'1.0').ne.1)
95 +.and.(index(s2,'1.1').ne.1)
96 +.and.(index(s2,'2.0').ne.1)
97 +.and.(index(s2,'2.1').ne.1)
98 +.and.(index(s2,'3.0').ne.1)
99 +.and.(index(s2,'3.1').ne.1)
100 +.and.(index(s2,'4.0').ne.1)
101 +.and.(index(s2,'5.0').ne.1)
102 +.and.(index(s2,'5.3').ne.1))then
104 . 'Version ',s2,' not supported by this version of LHAPDF'
107 if(lhasilent.eq.0) then
108 write(*,*) '*************************************'
109 write(*,*) '* LHAPDF Version 5.3.0 *'
110 write(*,*) '*************************************'
117 c print *,'id = ',id,string
119 write(*,*) 'File description error:'
120 write(*,*) 'Command not understood: ',string
123 if (id.eq.1) call descriptionPDF(nset,id)
125 if (id.eq.2) call initEvolve(nset)
127 if (id.eq.3) call initAlphasPDF(nset)
129 if (id.eq.4) call initInputPDF(nset)
131 if (id.eq.5) call initListPDF(nset)
133 if (id.eq.6) call initQCDparams(nset)
135 if (id.eq.7) call initMinMax(nset)
139 c print *,'calling InitEvolveCode',nset
140 call InitEvolveCode(nset)
145 integer function token(s)
151 data t/'Description:','Evolution:','Alphas:',
152 . 'Parametrization:','Parameterlist:',
153 . 'QCDparams:','MinMax:',
160 if (s.eq.t(i)) token=i
163 count(token)=count(token)+1
164 if (count(token).eq.2) then
165 write(*,*) 'File description error:'
166 write(*,*) 'Second definition of entry: ',s
181 subroutine LHAprint(iprint)
183 integer lhasilent,iprint
184 common/lhasilent/lhasilent
186 c print *,'lhasilent',lhasilent