191 if '--help' in args
or '-h' in args:
195 if '--verbose' in args:
197 args.remove(
'--verbose')
199 if '--v1' in args
and '--v2' in args:
200 sys.stderr.write(
"ERROR: conflicting database version specifications \"--v1\" and \"--v2\"\n" )
214 _dbs[
'v1'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v1'] ] + [
'--runNumber' ]
215 _dbs[
'v2'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v2'] ] + [
'--runNumber' ]
216 _dbargs = set(args) & set(sum(_dbs.values(), []))
220 sys.stderr.write(
"ERROR: too many database specifications: \"" +
"\", \"".
join( _dbargs) +
"\"\n" )
225 if db ==
'runNumber':
230 if not db
in OfflineConverter.databases[version]:
231 sys.stderr.write(
"ERROR: database version \"%s\" incompatible with specification \"%s\"\n" % (version, db) )
234 converter = OfflineConverter(version = version, database = db, verbose = verbose)
235 out, err = converter.query( * args )
237 sys.stderr.write(
"%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
240 sys.stdout.write( out )