Definition at line 55 of file D3PDSizeSummary.py.
◆ __init__()
def D3PDSizeSummary.Branchgroup.__init__ |
( |
|
self, |
|
|
|
name |
|
) |
| |
◆ add()
def D3PDSizeSummary.Branchgroup.add |
( |
|
self, |
|
|
|
b |
|
) |
| |
Definition at line 98 of file D3PDSizeSummary.py.
100 self.totbytes += b.GetTotalSize()
101 self.filebytes += b.GetZipBytes()
103 if bname == self.name +
'_n':
105 for i
in range(b.GetEntries()):
107 self.totobj +=
int(b.GetLeaf(bname).GetValue())
109 if options.subgroups:
110 sg = self.get_subgroup (b)
◆ get_dict()
def D3PDSizeSummary.Branchgroup.get_dict |
( |
|
self, |
|
|
|
nev |
|
) |
| |
Definition at line 118 of file D3PDSizeSummary.py.
118 def get_dict (self, nev):
119 if self.totobj ==
None:
123 d[
'name'] = self.name
124 d[
'nbr'] = `self.nbr`
125 d[
'nobj'] = `
int(self.totobj)`
126 d[
'nobjper'] =
"%.1f" % (
float(self.totobj) / nev)
127 d[
'totsiz'] =
"%dk" %
int(
float(self.totbytes) / 1024 + 0.5)
128 d[
'totsizper'] =
"%.2fk" % (
float(self.totbytes) / 1024 / nev )
129 d[
'filesiz'] =
"%dk" %
int(
float(self.filebytes) / 1024 + 0.5)
130 d[
'filesizper'] =
"%.2fk" % (
float(self.filebytes) / 1024 / nev)
131 d[
'comp'] =
"%.2f" % (
float(self.totbytes) / self.filebytes)
◆ get_subgroup()
def D3PDSizeSummary.Branchgroup.get_subgroup |
( |
|
self, |
|
|
|
b |
|
) |
| |
Definition at line 79 of file D3PDSizeSummary.py.
79 def get_subgroup (self, b):
80 sglist = subgroups.get (self.name)
81 if not sglist:
return None
83 for (sgname, pats)
in sglist:
84 for p
in pats.split():
85 pp = self.name +
'_' + p +
'$'
86 if re.match (pp, bname):
90 sg = self.subgroups.get (sgname)
92 sg = Branchgroup (sgname)
93 self.subgroups[sgname] = sg
◆ print_header()
def D3PDSizeSummary.Branchgroup.print_header |
( |
| ) |
|
|
static |
Definition at line 136 of file D3PDSizeSummary.py.
138 print '\\begin{tabular}{|l|r|r|r|r|r|r|r|r|}'
144 d[
'nobjper'] =
'Nobj/ev'
145 d[
'totsiz'] =
'Totsz'
146 d[
'totsizper'] =
'Totsz/ev'
147 d[
'filesiz'] =
'Filesz'
148 d[
'filesizper'] =
'Filesz/ev'
150 print Branchgroup.format % d
◆ print_stats()
def D3PDSizeSummary.Branchgroup.print_stats |
( |
|
self, |
|
|
|
nev |
|
) |
| |
Definition at line 155 of file D3PDSizeSummary.py.
155 def print_stats (self, nev):
156 print Branchgroup.format % self.get_dict (nev)
158 sl = self.subgroups.
values()
159 sl.sort (
lambda a, b:
int(b.filebytes - a.filebytes))
161 print Branchgroup.sg_format % sg.get_dict (nev)
◆ print_trailer()
def D3PDSizeSummary.Branchgroup.print_trailer |
( |
| ) |
|
|
static |
◆ filebytes
D3PDSizeSummary.Branchgroup.filebytes |
◆ format
string D3PDSizeSummary.Branchgroup.format = tex_format |
|
static |
◆ name
D3PDSizeSummary.Branchgroup.name |
◆ nbr
D3PDSizeSummary.Branchgroup.nbr |
◆ sg_format
◆ sg_tex_format
string D3PDSizeSummary.Branchgroup.sg_tex_format = tex_format |
|
static |
◆ sg_text_format
◆ subgroups
D3PDSizeSummary.Branchgroup.subgroups |
◆ tex_format
string D3PDSizeSummary.Branchgroup.tex_format = '%(name)-10s&%(nbr)5s&%(nobj)7s&%(nobjper)7s&%(totsiz)8s&%(totsizper)8s&%(filesiz)8s&%(filesizper)9s&%(comp)4s \\\\' |
|
static |
◆ text_format
string D3PDSizeSummary.Branchgroup.text_format = '%(name)-10s %(nbr)5s %(nobj)7s %(nobjper)7s %(totsiz)8s %(totsizper)8s %(filesiz)8s %(filesizper)9s %(comp)4s' |
|
static |
◆ totbytes
D3PDSizeSummary.Branchgroup.totbytes |
◆ totobj
D3PDSizeSummary.Branchgroup.totobj |
The documentation for this class was generated from the following file: