~maddevelopers/mg5amcnlo/3.0.2_loopparams

« back to all changes in this revision

Viewing changes to madgraph/interface/madgraph_interface.py

  • Committer: Marco Zaro
  • Date: 2019-01-14 10:02:07 UTC
  • mfrom: (78.413.15 2.6.5)
  • Revision ID: marco.zaro@gmail.com-20190114100207-7ir5f1og3nxqd5g5
merged with 2.6.5 up to rev 294 (fix for applgrid)

Show diffs side-by-side

added added

removed removed

Lines of Context:
216
216
            info_line = info_line.replace("#*","*")
217
217
            
218
218
 
219
 
 
220
219
        logger.info(self.intro_banner % info_line)
221
220
 
222
221
        cmd.Cmd.__init__(self, *arg, **opt)
460
459
        logger.info("      -d: specify other MG/ME directory")
461
460
        logger.info("      -noclean: no cleaning performed in \"path\".")
462
461
        logger.info("      -nojpeg: no jpeg diagrams will be generated.")
 
462
        logger.info("      -noeps: no jpeg and eps diagrams will be generated.")
463
463
        logger.info("      -name: the postfix of the main file in pythia8 mode.")
464
464
        logger.info("   Examples:",'$MG:color:GREEN')
465
465
        logger.info("       output",'$MG:color:GREEN')
2374
2374
    @cmd.debug()
2375
2375
    def complete_output(self, text, line, begidx, endidx,
2376
2376
                        possible_options = ['f', 'noclean', 'nojpeg'],
2377
 
                        possible_options_full = ['-f', '-noclean', '-nojpeg']):
 
2377
                        possible_options_full = ['-f', '-noclean', '-nojpeg', '--noeps=True']):
2378
2378
        "Complete the output command"
2379
2379
 
2380
2380
        possible_format = self._export_formats
3134
3134
        
3135
3135
        model_path = args[0]
3136
3136
        recreate = ('--recreate' in args)
 
3137
        if recreate:
 
3138
            args.remove('--recreate')
3137
3139
        keep_decay = ('--keep_decay' in args)
 
3140
        if keep_decay:
 
3141
            args.remove('--keep_decay')
3138
3142
        output_dir = [a.split('=',1)[1] for a in args if a.startswith('--output')]
3139
3143
        if output_dir:
3140
3144
            output_dir = output_dir[0]
3141
3145
            recreate = True
3142
3146
            restrict_name = ''
 
3147
            args.remove('--output=%s' % output_dir)
3143
3148
        else:
3144
3149
            name = os.path.basename(self._curr_model.get('modelpath'))
3145
3150
            restrict_name = self._curr_model.get('restrict_name')
7453
7458
                raise self.InvalidCmd('expected bool for notification_center')
7454
7459
        # True/False formatting
7455
7460
        elif args[0] in ['crash_on_error']:
7456
 
            tmp = banner_module.ConfigFile.format_variable(args[1], bool, 'crash_on_error')
 
7461
            try:
 
7462
                tmp = banner_module.ConfigFile.format_variable(args[1], bool, 'crash_on_error')
 
7463
            except Exception:
 
7464
                if args[1].lower() in ['never']:
 
7465
                    tmp = args[1].lower()
 
7466
                else: 
 
7467
                    raise
7457
7468
            self.options[args[0]] = tmp        
7458
7469
        elif args[0] in ['cluster_queue']:
7459
7470
            self.options[args[0]] = args[1].strip()
7506
7517
        noclean = '-noclean' in args
7507
7518
        force = '-f' in args
7508
7519
        nojpeg = '-nojpeg' in args
 
7520
        if '--noeps=True' in args:
 
7521
            nojpeg = True
7509
7522
        flaglist = []
7510
7523
                    
7511
7524
        if '--postpone_model' in args: