1 def lumi_to_run(runs, events_in_sample, events_per_job):
2 '''Print tuple for use in firstLuminosityBlockForEachRun'''
4 n_lumis = events_in_sample // events_per_job
5 if n_lumis % n_iovs != 0:
6 raise Exception(
'n_lumis should be evenly divisible by n_iovs.')
8 for i, run
in enumerate(runs):
9 pairs.append((run, 1 + i*n_lumis//n_iovs))