Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-26 00:03:02

0001 def lumi_to_run(runs, events_in_sample, events_per_job):
0002     '''Print tuple for use in firstLuminosityBlockForEachRun'''
0003     n_iovs = len(runs)
0004     n_lumis = events_in_sample // events_per_job
0005     if n_lumis % n_iovs != 0:
0006         raise Exception('n_lumis should be evenly divisible by n_iovs.')
0007     pairs = []
0008     for i, run in enumerate(runs):
0009         pairs.append((run, 1 + i*n_lumis//n_iovs))
0010     return tuple(pairs)