2 from sys
import stderr, exit
12 from optparse
import OptionParser
13 parser = OptionParser(usage=
"usage: %prog [options] ")
14 parser.add_option(
"--firstRun", dest=
"firstRun", help=
"first run", type=
"int", metavar=
"RUN", default=
"1")
15 parser.add_option(
"--lastRun", dest=
"lastRun", help=
"last run", type=
"int", metavar=
"RUN", default=
"9999999")
16 parser.add_option(
"--groupName", dest=
"groupName", help=
"select runs of name like NAME", metavar=
"NAME", default=
"Collisions%")
17 parser.add_option(
"--HLTkey", dest=
"HLTkey", help=
"name of the HLTkey e.g. /cdaq/physics/Run2010/v3.1/HLT_1.6E30/V1",metavar=
"HLT")
18 parser.add_option(
"--perKey", action=
"store_true",default=
False,dest=
"perKey",help=
"list the runs per HLT key",metavar=
"perKey")
19 (options, args) = parser.parse_args()
21 from queryRR
import queryRR
23 runKeys =
queryRR(options.firstRun,options.lastRun,options.groupName)
24 runs = runKeys.keys(); runs.sort()
30 if not key
in runsPerKey.keys():
33 runsPerKey[key] = tmpruns
35 runsPerKey[key].
append(run)
36 theKeys = runsPerKey.keys()
38 theruns = runsPerKey[key]
46 HLTkey = options.HLTkey
47 print "List of runs taken with HLT key = ",HLTkey
51 if not options.HLTkey:
54 if key == options.HLTkey: