~maddevelopers/mg5amcnlo/2.3.3_scan_options

« back to all changes in this revision

Viewing changes to madgraph/various/lhe_parser.py

  • Committer: olivier Mattelaer
  • Date: 2015-08-22 14:13:58 UTC
  • Revision ID: olivier.mattelaer@uclouvain.be-20150822141358-lrjyhk43v7c4jwvm
fix a problem in the RunCard handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
467
467
    def apply_fct_on_event(self, *fcts, **opts):
468
468
        """ apply one or more fct on all event. """
469
469
        
470
 
        opt= {"print_step": 2000}
 
470
        opt= {"print_step": 2000, "maxevent":float("inf")}
471
471
        opt.update(opts)
472
472
        
473
473
        nb_fct = len(fcts)
485
485
                    logger.info("currently at %s event" % nb_event)
486
486
            for i in range(nb_fct):
487
487
                out[i].append(fcts[i](event))
 
488
            if nb_event > opt['maxevent']:
 
489
                break
488
490
        if nb_fct == 1:
489
491
            return out[0]
490
492
        else: