267 if '--help' in args
or '-h' in args:
271 if '--verbose' in args:
273 args.remove(
'--verbose')
276 db_count = arg_count[
'--v1'] + arg_count[
'--v2'] + arg_count[
'--v3'] + arg_count[
'--v3-beta'] + arg_count[
'--v3-test']
278 sys.stderr.write(
'ERROR: conflicting database version specifications: "--v1", "--v2", "--v3", "--v3-beta", and "--v3-test" are mutually exclusive options' )
296 if '--v3-beta' in args:
299 args.remove(
'--v3-beta')
301 if '--v3-test' in args:
304 args.remove(
'--v3-test')
307 proxy_host =
"localhost" 309 if '--dbproxy' in args:
311 args.remove(
'--dbproxy')
312 if '--dbproxyhost' in args:
313 proxy_host = args.pop(args.index(
'--dbproxyhost')+1)
314 args.remove(
'--dbproxyhost')
315 if '--dbproxyport' in args:
316 proxy_port = args.pop(args.index(
'--dbproxyport')+1)
317 args.remove(
'--dbproxyport')
320 tunnel_port =
"10121" 321 if '--dbtunnel' in args:
323 args.remove(
'--dbtunnel')
325 if '--dbtunnelport' in args:
326 tunnel_port = args.pop(args.index(
'--dbtunnelport')+1)
327 args.remove(
'--dbtunnelport')
330 sys.stderr.write(
'ERROR: conflicting connection specifications, "--dbtunnel" and "--dbproxy" are mutually exclusive options\n' )
334 _dbs[
'v1'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v1'] ] + [
'--runNumber' ]
335 _dbs[
'v2'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v2'] ] + [
'--runNumber' ]
336 _dbs[
'v3'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3'] ] + [
'--runNumber']
337 _dbs[
'v3-beta'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3-beta'] ] + [
'--runNumber' ]
338 _dbs[
'v3-test'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3-test'] ] + [
'--runNumber' ]
339 _dbargs = set(args) & set(sum(_dbs.values(), []))
343 sys.stderr.write(
"ERROR: too many database specifications: \"" +
"\", \"".
join( _dbargs) +
"\"\n" )
348 if db ==
'runNumber':
353 if not db
in OfflineConverter.databases[version]:
354 sys.stderr.write(
"ERROR: database version \"%s\" incompatible with specification \"%s\"\n" % (version, db) )
357 converter = OfflineConverter(version = version, database = db, verbose = verbose,
358 proxy = proxy, proxyHost = proxy_host, proxyPort = proxy_port,
359 tunnel = tunnel, tunnelPort = tunnel_port)
360 out, err = converter.query( * args )
362 sys.stderr.write(
"%s: error while retrieving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
365 sys.stdout.write( out )
std::function< unsigned int(align::ID)> Counter
static std::string join(char **cmd)