diff --git a/Configuration/PyReleaseValidation/python/MatrixUtil.py b/Configuration/PyReleaseValidation/python/MatrixUtil.py index d3cd4862c0de9..e0cb155068f83 100644 --- a/Configuration/PyReleaseValidation/python/MatrixUtil.py +++ b/Configuration/PyReleaseValidation/python/MatrixUtil.py @@ -151,7 +151,11 @@ def lumis(self): if self.ls: for run in self.ls.keys(): run_lumis = [] - for rng in self.ls[run]: run_lumis.append(str(rng[0])+","+str(rng[1])) + for rng in self.ls[run]: + if isinstance(rng, int): + run_lumis.append(str(rng)) + else: + run_lumis.append(str(rng[0])+","+str(rng[1])) query_lumis.append(":".join(run_lumis)) return query_lumis diff --git a/Configuration/PyReleaseValidation/scripts/das-selected-lumis.py b/Configuration/PyReleaseValidation/scripts/das-selected-lumis.py index c316ecbafe079..72177c7b96c13 100755 --- a/Configuration/PyReleaseValidation/scripts/das-selected-lumis.py +++ b/Configuration/PyReleaseValidation/scripts/das-selected-lumis.py @@ -17,7 +17,10 @@ def match_in(sub_list,lumi_list): for i in range(int(sub_list[0]),int(sub_list[1])+1): - if i >= int(lumi_list[0]) and i <= int(lumi_list[1]): return True + if len(lumi_list) == 1: + if i == int(lumi_list[0]): return True + else: + if i >= int(lumi_list[0]) and i <= int(lumi_list[1]): return True return False def check_lumi_ranges(given_lumi_list , sub_range): diff --git a/FWCore/PythonUtilities/python/LumiList.py b/FWCore/PythonUtilities/python/LumiList.py index 987765aaa3371..694a0c1a12533 100644 --- a/FWCore/PythonUtilities/python/LumiList.py +++ b/FWCore/PythonUtilities/python/LumiList.py @@ -111,10 +111,13 @@ def __init__(self, filename = None, lumis = None, runsAndLumis = None, runs = No newLumis = [] for lumi in sorted(self.compactList[run]): # If the next lumi starts inside or just after the last just change the endpoint of the first - if newLumis and newLumis[-1][0] <= lumi[0] <= newLumis[-1][1] + 1: - newLumis[-1][1] = max(newLumis[-1][1], lumi[1]) - else: + if isinstance(lumi, int): newLumis.append(lumi) + else: + if newLumis and newLumis[-1][0] <= lumi[0] <= newLumis[-1][1] + 1: + newLumis[-1][1] = max(newLumis[-1][1], lumi[1]) + else: + newLumis.append(lumi) self.compactList[run] = newLumis def __sub__(self, other): # Things from self not in other @@ -272,6 +275,9 @@ def _getLumiParts(self): for run in runs: lumis = self.compactList[run] for lumiPair in sorted(lumis): + if isinstance(lumiPair, int): + parts.append(str("%s:%s" % (run, lumiPair))) + continue if lumiPair[0] == lumiPair[1]: parts.append(str("%s:%s" % (run, lumiPair[0]))) else: