CMS 3D CMS Logo

Functions
LumiToRun Namespace Reference

Functions

def lumi_to_run (runs, events_in_sample, events_per_job)
 

Function Documentation

◆ lumi_to_run()

def LumiToRun.lumi_to_run (   runs,
  events_in_sample,
  events_per_job 
)
Print tuple for use in firstLuminosityBlockForEachRun

Definition at line 1 of file LumiToRun.py.

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)
11 
def lumi_to_run(runs, events_in_sample, events_per_job)
Definition: LumiToRun.py:1