~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to madgraph/interface/common_run_interface.py

merge with the latest 2.1.2 (294)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1631
1631
                    '(eg MSTW 90%CL error sets) \nare not available in aMC@NLO + LHAPDF 5.x.x')
1632
1632
 
1633
1633
 
1634
 
        # check if the file exists, otherwise install it
 
1634
        # check if the file exists, otherwise install it:
 
1635
        # also check that the PDFsets dir exists, otherwise create it.
 
1636
        # if fails, install the lhapdfset into lib/PDFsets
 
1637
        if not os.path.isdir(pdfsets_dir):
 
1638
            try:
 
1639
                os.mkdir(pdfsets_dir)
 
1640
            except OSError:
 
1641
                pdfsets_dir = pjoin(self.me_dir, 'lib', 'PDFsets')
 
1642
 
1635
1643
        if pdfsetname and not os.path.exists(pjoin(pdfsets_dir, pdfsetname)):
1636
1644
            self.install_lhapdf_pdfset(pdfsets_dir, pdfsetname)
1637
1645
            
1665
1673
        # check taht the file has been installed in the global dir
1666
1674
        if os.path.exists(pjoin(pdfsets_dir, filename)) or \
1667
1675
           os.path.isdir(pjoin(pdfsets_dir, filename)):
1668
 
            logger.info('%s successfully donloaded and stored in %s' \
 
1676
            logger.info('%s successfully downloaded and stored in %s' \
1669
1677
                    % (filename, pdfsets_dir))
1670
1678
        #otherwise save it locally
1671
1679
        else: