File indexing completed on 2023-03-17 11:03:35
0001
0002
0003 from __future__ import print_function
0004 import sys
0005 import optparse
0006 from FWCore.PythonUtilities.LumiList import LumiList
0007
0008
0009 if __name__ == '__main__':
0010
0011 parser = optparse.OptionParser ("Usage: %prog alpha.json")
0012 parser.add_option ('--range', dest='range', action='store_true',
0013 help='Print out run range only')
0014
0015 (options, args) = parser.parse_args()
0016 if len (args) != 1:
0017 raise RuntimeError("Must provide exactly one input file")
0018
0019 alphaList = LumiList (filename = args[0])
0020 if options.range:
0021 keys = alphaList.compactList.keys()
0022 minRun = min (keys)
0023 maxRun = max (keys)
0024 print("runs %s - %s" % (minRun, maxRun))
0025 sys.exit()
0026 print(alphaList)