204 if '--help' in args
or '-h' in args:
208 if '--verbose' in args:
210 args.remove(
'--verbose')
213 db_count = arg_count[
'--v1'] + arg_count[
'--v2'] + arg_count[
'--v3'] + arg_count[
'--v3-beta'] + arg_count[
'--v3-test']
215 sys.stderr.write(
'ERROR: conflicting database version specifications: "--v1", "--v2", "--v3", "--v3-beta", and "--v3-test" are mutually exclusive options' )
233 if '--v3-beta' in args:
236 args.remove(
'--v3-beta')
238 if '--v3-test' in args:
241 args.remove(
'--v3-test')
244 _dbs[
'v1'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v1'] ] + [
'--runNumber' ]
245 _dbs[
'v2'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v2'] ] + [
'--runNumber' ]
246 _dbs[
'v3'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3'] ] + [
'--runNumber']
247 _dbs[
'v3-beta'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3-beta'] ] + [
'--runNumber' ]
248 _dbs[
'v3-test'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3-test'] ] + [
'--runNumber' ]
249 _dbargs = set(args) & set(sum(_dbs.values(), []))
253 sys.stderr.write(
"ERROR: too many database specifications: \"" +
"\", \"".
join( _dbargs) +
"\"\n" )
258 if db ==
'runNumber':
263 if not db
in OfflineConverter.databases[version]:
264 sys.stderr.write(
"ERROR: database version \"%s\" incompatible with specification \"%s\"\n" % (version, db) )
267 converter = OfflineConverter(version = version, database = db, verbose = verbose)
268 out, err = converter.query( * args )
270 sys.stderr.write(
"%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
273 sys.stdout.write( out )