43 longopts = [
"run=",
"stream=",
"help",
"usage"]
44 opts, args = getopt.getopt( sys.argv[1:], shortopts, longopts )
46 except getopt.GetoptError:
48 print(
'ERROR: unknown options in argument %s' % sys.argv[1:], file=sys.stderr)
54 if o
in (
"-?",
"-h",
"--help",
"--usage"):
56 elif o
in (
"-r",
"--run"):
58 elif o
in (
"-s",
"--stream"):
61 if not runno
or not stream:
usage()
65 cursor = connection.cursor()
67 print(
'Results for run: %i, stream: "%s"' % (runno, stream))
76 print(
'First non-zero LB: ' +
str(lblist[0][1]))
77 print(
'Last non-zero LB: ' +
str(lblist[-1][1]))
83 for (nev,lb,nfiles,fsize)
in lblist:
85 print(
' ... Run %i, LB %i has %i events, %i RAW files and %f MB' % (runno,lb,nev,nfiles,fsize))
89 print(
'--------------------------------------------------')
90 print(
'Total #events : ', sumnev)
91 print(
'Total #files : ', sumnfiles)
92 print(
'Total RAW size: ', sumfsize/1000.0,
' GB')