~maddevelopers/mg5amcnlo/plugin_mode

« back to all changes in this revision

Viewing changes to madgraph/interface/madgraph_interface.py

  • Committer: olivier Mattelaer
  • Date: 2016-06-27 15:47:26 UTC
  • Revision ID: olivier.mattelaer@uclouvain.be-20160627154726-rb8lvv92gf258w55
fixing some small problem spotted by the tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1465
1465
            # check for PLUGIN format
1466
1466
            for plug in os.listdir(pjoin(MG5DIR, 'PLUGIN')):
1467
1467
                if os.path.exists(pjoin(MG5DIR, 'PLUGIN', plug, '__init__.py')):
1468
 
                    __import__('PLUGIN.%s' % plug)
 
1468
                    try:
 
1469
                        __import__('PLUGIN.%s' % plug)
 
1470
                    except Exception, error:
 
1471
                        logger.warning("error detected in plugin: %s.", plug)
 
1472
                        logger.warning("%s", error)
 
1473
                        continue
1469
1474
                    plugin = sys.modules['PLUGIN.%s' % plug]                
1470
1475
                    if hasattr(plugin, 'new_output'):
1471
1476
                        if not misc.is_plugin_supported(plugin):
7337
7342
        # grouping mode
7338
7343
        elif isinstance(self._curr_matrix_elements, group_subprocs.SubProcessGroupList) and\
7339
7344
            self._curr_exporter.grouped_mode:
7340
 
            misc.sprint(isinstance(self._curr_matrix_elements, group_subprocs.SubProcessGroupList), type(self._curr_matrix_elements))        
7341
7345
            modify, self._curr_matrix_elements = self._curr_exporter.modify_grouping(self._curr_matrix_elements)
7342
7346
            if modify:
7343
7347
                matrix_elements = self._curr_matrix_elements.get_matrix_elements()
7431
7435
        if online:
7432
7436
            flaglist.append('online')
7433
7437
            
7434
 
        # Dedicated finalize function.
7435
 
        self._curr_exporter.finalize(self._curr_matrix_elements,
7436
 
                                    self.history,
7437
 
                                    self.options,
7438
 
                                    flaglist)
7439
7438
 
7440
7439
        if self._export_format in ['NLO']:
7441
7440
            ## write fj_lhapdf_opts file            
7456
7455
            self.do_save('options %s' % filename.replace(' ', '\ '), check=False,
7457
7456
                         to_keep={'mg5_path':MG5DIR})
7458
7457
 
 
7458
        # Dedicated finalize function.
 
7459
        self._curr_exporter.finalize(self._curr_matrix_elements,
 
7460
                                    self.history,
 
7461
                                    self.options,
 
7462
                                    flaglist)
 
7463
 
 
7464
 
7459
7465
        if self._export_format in ['madevent', 'standalone', 'standalone_cpp','madweight', 'matchbox']:
7460
7466
            logger.info('Output to directory ' + self._export_dir + ' done.')
7461
7467