Function to get lhapdf id and name from either id or name.
Definition at line 33 of file LHAPDFsupport.py.
34 ''' Function to get lhapdf id and name from either id or name.'''
38 pdflist =
open(LHADATAPATH+
'/pdfsets.index',
'r')
39 if isinstance(pdf,int)
or pdf.isdigit():
43 splitline=line.split()
44 if int(splitline[0]) == pdfid:
50 splitline=line.split()
51 if splitline[1] == pdfname:
52 pdfid=
int(splitline[0])
57 err=
'Couldn\'t find PDF name associated to ID %i in %s.'%(pdfid,LHADATAPATH+
'/pdfsets.index')
59 raise RuntimeError(err)
61 err=
'Couldn\'t find PDF ID associated to name %s in %s.'%(pdfname,LHADATAPATH+
'/pdfsets.index')
63 raise RuntimeError(err)