199 if '--help' in args
or '-h' in args:
203 if '--verbose' in args:
205 args.remove(
'--verbose')
207 if '--v1' in args
and '--v2' in args:
208 sys.stderr.write(
"ERROR: conflicting database version specifications \"--v1\" and \"--v2\"\n" )
222 _dbs[
'v1'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v1'] ] + [
'--runNumber' ]
223 _dbs[
'v2'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v2'] ] + [
'--runNumber' ]
224 _dbargs = set(args) & set(sum(_dbs.values(), []))
228 sys.stderr.write(
"ERROR: too many database specifications: \"" +
"\", \"".
join( _dbargs) +
"\"\n" )
233 if db ==
'runNumber':
238 if not db
in OfflineConverter.databases[version]:
239 sys.stderr.write(
"ERROR: database version \"%s\" incompatible with specification \"%s\"\n" % (version, db) )
242 converter =
OfflineConverter(version = version, database = db, verbose = verbose)
243 out, err = converter.query( * args )
245 sys.stderr.write(
"%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
248 sys.stdout.write( out )