2 from __future__
import print_function
3 from __future__
import absolute_import
4 from sys
import stderr, exit
14 from optparse
import OptionParser
15 parser = OptionParser(usage=
"usage: %prog [options] ")
16 parser.add_option(
"--firstRun", dest=
"firstRun", help=
"first run", type=
"int", metavar=
"RUN", default=
"1")
17 parser.add_option(
"--lastRun", dest=
"lastRun", help=
"last run", type=
"int", metavar=
"RUN", default=
"9999999")
18 parser.add_option(
"--groupName", dest=
"groupName", help=
"select runs of name like NAME", metavar=
"NAME", default=
"Collisions%")
19 parser.add_option(
"--HLTkey", dest=
"HLTkey", help=
"name of the HLTkey e.g. /cdaq/physics/Run2010/v3.1/HLT_1.6E30/V1",metavar=
"HLT")
20 parser.add_option(
"--perKey", action=
"store_true",default=
False,dest=
"perKey",help=
"list the runs per HLT key",metavar=
"perKey")
21 (options, args) = parser.parse_args()
23 from .queryRR
import queryRR
25 runKeys =
queryRR(options.firstRun,options.lastRun,options.groupName)
26 runs = runKeys.keys(); runs.sort()
32 if not key
in runsPerKey.keys():
35 runsPerKey[key] = tmpruns
37 runsPerKey[key].
append(run)
38 theKeys = runsPerKey.keys()
40 theruns = runsPerKey[key]
48 HLTkey = options.HLTkey
49 print(
"List of runs taken with HLT key = ",HLTkey)
53 if not options.HLTkey:
56 if key == options.HLTkey:
S & print(S &os, JobReport::InputFile const &f)