240 if '--help' in args
or '-h' in args:
244 if '--verbose' in args:
246 args.remove(
'--verbose')
249 db_count = arg_count[
'--v1'] + arg_count[
'--v2'] + arg_count[
'--v3'] + arg_count[
'--v3-beta'] + arg_count[
'--v3-test']
251 sys.stderr.write(
'ERROR: conflicting database version specifications: "--v1", "--v2", "--v3", "--v3-beta", and "--v3-test" are mutually exclusive options' )
269 if '--v3-beta' in args:
272 args.remove(
'--v3-beta')
274 if '--v3-test' in args:
277 args.remove(
'--v3-test')
280 proxy_host =
"localhost" 282 if '--dbproxy' in args:
284 args.remove(
'--dbproxy')
285 if '--dbproxyhost' in args:
286 proxy_host = args.pop(args.index(
'--dbproxyhost')+1)
287 args.remove(
'--dbproxyhost')
288 if '--dbproxyport' in args:
289 proxy_port = args.pop(args.index(
'--dbproxyport')+1)
290 args.remove(
'--dbproxyport')
294 _dbs[
'v1'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v1'] ] + [
'--runNumber' ]
295 _dbs[
'v2'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v2'] ] + [
'--runNumber' ]
296 _dbs[
'v3'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3'] ] + [
'--runNumber']
297 _dbs[
'v3-beta'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3-beta'] ] + [
'--runNumber' ]
298 _dbs[
'v3-test'] = [
'--%s' % _db
for _db
in OfflineConverter.databases[
'v3-test'] ] + [
'--runNumber' ]
299 _dbargs = set(args) & set(sum(_dbs.values(), []))
303 sys.stderr.write(
"ERROR: too many database specifications: \"" +
"\", \"".
join( _dbargs) +
"\"\n" )
308 if db ==
'runNumber':
313 if not db
in OfflineConverter.databases[version]:
314 sys.stderr.write(
"ERROR: database version \"%s\" incompatible with specification \"%s\"\n" % (version, db) )
317 converter = OfflineConverter(version = version, database = db, verbose = verbose,
318 proxy = proxy, proxyHost = proxy_host, proxyPort=proxy_port)
319 out, err = converter.query( * args )
321 sys.stderr.write(
"%s: error while retriving the HLT menu\n\n%s\n\n" % (sys.argv[0], err) )
324 sys.stdout.write( out )
std::function< unsigned int(align::ID)> Counter
static std::string join(char **cmd)