CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LumiToRun.py
Go to the documentation of this file.
1 def lumi_to_run(runs, events_in_sample, events_per_job):
2  '''Print tuple for use in firstLuminosityBlockForEachRun'''
3  n_iovs = len(runs)
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.')
7  pairs = []
8  for i, run in enumerate(runs):
9  pairs.append((run, 1 + i*n_lumis//n_iovs))
10  return tuple(pairs)
def lumi_to_run
Definition: LumiToRun.py:1