)) j.comment = ( '{1} {2} MC {0} ntuple creation for k3pi mixing measurement.' .format(event_type, year, polarity) ) j.application = DaVinci(version='v41r3') j.application.optsfile = [s.format(path=base, year=year) for s in OPTIONS] if args.test: # If testing, run over a couple of files locally, # saving the results to the sandbox j.inputdata = dataset[0:1] j.backend = Local() # Prepend test string to job name j.name = 'TEST_{0}'.format(j.name) j.outputfiles = [LocalFile(tfn)] else: # If not testing, run over everything on the grid, splitting jobs # into groups of 10 files, notifying me on job completion/subjob failure, # and save the results on the grid storage j.inputdata = dataset j.backend = Dirac() j.backend.settings['CPUTime'] = 60*60*24*7 j.do_auto_resubmit = True j.splitter = SplitByFiles(filesPerJob=5, ignoremissing=True) j.postprocessors = [Notifier(address=email)] j.outputfiles = [DiracFile(tfn)] if not args.inspect_job: queues.add(j.submit) # noqa