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
48 c check enviromental variable LHAPATH
49 call getenv('LHAPATH',dirpath)
50 if (dirpath.eq.'') then
51 C Take the data from $ALICE_ROOT/LHAPDF/PDFsets
52 CALL GETENV('ALICE_ROOT',CHROOT)
53 LNROOT = LNBLNK(CHROOT)
55 dirpath='PDFsets' ! Default value
57 dirpath=CHROOT(1:LNROOT)//'/LHAPDF/PDFsets'
61 c Now build the path to the PDF set
62 setpath = dirpath(:LEN_TRIM(dirpath)) // "/" //
63 +setname(:LEN_TRIM(setname))
65 c Initialize using the detected PDF set
66 call InitPDFsetM(nset, setpath(:LEN_TRIM(setpath)))
69 c ---------------------------------------------------------
71 subroutine InitPDFset(setpath)
76 call InitPDFsetM(nset,setpath)
80 subroutine InitPDFsetM(nset,setpath)
82 include 'parmsetup.inc'
86 integer id,token,Ctoken
88 common/lhasilent/lhasilent
93 open(unit=1,file=setpath,status='old')
95 if ((index(s2,'1.0').ne.1)
96 +.and.(index(s2,'1.1').ne.1)
97 +.and.(index(s2,'2.0').ne.1)
98 +.and.(index(s2,'2.1').ne.1)
99 +.and.(index(s2,'3.0').ne.1)
100 +.and.(index(s2,'3.1').ne.1)
101 +.and.(index(s2,'4.0').ne.1)
102 +.and.(index(s2,'5.0').ne.1)
103 +.and.(index(s2,'5.3').ne.1))then
105 . 'Version ',s2,' not supported by this version of LHAPDF'
108 if(lhasilent.eq.0) then
109 write(*,*) '*************************************'
110 write(*,*) '* LHAPDF Version 5.3.0 *'
111 write(*,*) '*************************************'
118 c print *,'id = ',id,string
120 write(*,*) 'File description error:'
121 write(*,*) 'Command not understood: ',string
124 if (id.eq.1) call descriptionPDF(nset,id)
126 if (id.eq.2) call initEvolve(nset)
128 if (id.eq.3) call initAlphasPDF(nset)
130 if (id.eq.4) call initInputPDF(nset)
132 if (id.eq.5) call initListPDF(nset)
134 if (id.eq.6) call initQCDparams(nset)
136 if (id.eq.7) call initMinMax(nset)
140 c print *,'calling InitEvolveCode',nset
141 call InitEvolveCode(nset)
146 integer function token(s)
152 data t/'Description:','Evolution:','Alphas:',
153 . 'Parametrization:','Parameterlist:',
154 . 'QCDparams:','MinMax:',
161 if (s.eq.t(i)) token=i
164 count(token)=count(token)+1
165 if (count(token).eq.2) then
166 write(*,*) 'File description error:'
167 write(*,*) 'Second definition of entry: ',s
182 subroutine LHAprint(iprint)
184 integer lhasilent,iprint
185 common/lhasilent/lhasilent
187 c print *,'lhasilent',lhasilent