192 if '--help' in args
or '-h' in args:
196 if '--verbose' in args:
198 args.remove(
'--verbose')
200 if '--v1' in args
and '--v2' in args:
201 sys.stderr.write(
"ERROR: conflicting database version specifications \"--v1\" and \"--v2\"\n" )
215 _dbs[
'v1'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v1'] ] + [
'--runNumber' ]
216 _dbs[
'v2'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v2'] ] + [
'--runNumber' ]
217 _dbargs = set(args) & set(sum(_dbs.values(), []))
221 sys.stderr.write(
"ERROR: too many database specifications: \"" +
"\", \"".
join( _dbargs) +
"\"\n" )
226 if db ==
'runNumber':
231 if not db
in OfflineConverter.databases[version]:
232 sys.stderr.write(
"ERROR: database version \"%s\" incompatible with specification \"%s\"\n" % (version, db) )
235 converter =
OfflineConverter(version = version, database = db, verbose = verbose)
236 out, err = converter.query( * args )
238 sys.stderr.write(
"%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
241 sys.stdout.write( out )