CMS 3D CMS Logo

Functions
das-selected-lumis Namespace Reference

Functions

def check_lumi_ranges (given_lumi_list, sub_range)
 
def match_in (sub_list, lumi_list)
 
def process_lumi (data)
 

Function Documentation

def das-selected-lumis.check_lumi_ranges (   given_lumi_list,
  sub_range 
)

Definition at line 25 of file das-selected-lumis.py.

References match_in().

Referenced by process_lumi().

25 def check_lumi_ranges(given_lumi_list , sub_range):
26  for lumi_r in given_lumi_list:
27  if match_in(sub_range, lumi_r):
28  return True
29  return False
30 
def check_lumi_ranges(given_lumi_list, sub_range)
def match_in(sub_list, lumi_list)
def das-selected-lumis.match_in (   sub_list,
  lumi_list 
)

Definition at line 18 of file das-selected-lumis.py.

References genParticles_cff.map.

Referenced by check_lumi_ranges().

18 def match_in(sub_list,lumi_list):
19  sub_list = map(int,sub_list)
20  lumi_list = map(int,lumi_list)
21  for i in range(sub_list[0],sub_list[1]+1):
22  if i >= lumi_list[0] and i <= lumi_list[1]: return True
23  return False
24 
def match_in(sub_list, lumi_list)
def das-selected-lumis.process_lumi (   data)

Definition at line 31 of file das-selected-lumis.py.

References check_lumi_ranges(), and edm.print().

31 def process_lumi(data):
32  for lumi_info in data:
33  if isinstance(lumi_info['lumi'], list):
34  lumi_nums = lumi_info['lumi'][0]['number']
35  lumi_file = lumi_info['file'][0]['name']
36  else:
37  lumi_nums = lumi_info['lumi']['number']
38  lumi_file = lumi_info['file']['name']
39  if not isinstance(lumi_nums[0], list): lumi_rang = [ [n,n] for n in lumi_nums ]
40  else: lumi_rang = lumi_nums
41  for sub_list in lumi_rang:
42  if check_lumi_ranges(input_range,tuple(sub_list)):
43  output_files_list.append(lumi_file)
44  break
45  for out_file_name in output_files_list:
46  print(out_file_name)
47 
48 #Get file names for desired lumi ranges
49 process_lumi(lumi_data)
50 
51 
def check_lumi_ranges(given_lumi_list, sub_range)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65