Skip to content

Commit

Permalink
groot: apply go-vet
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastien Binet <[email protected]>
  • Loading branch information
sbinet committed Sep 21, 2023
1 parent 724506b commit a44838e
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 92 deletions.
4 changes: 2 additions & 2 deletions groot/gen.rhist.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (h *{{.Name}}) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *{{.Name}}) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th1.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down Expand Up @@ -795,7 +795,7 @@ func (h *{{.Name}}) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *{{.Name}}) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th2.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down
22 changes: 11 additions & 11 deletions groot/rbase/attaxis.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@ func (a *AttAxis) UnmarshalROOT(r *rbytes.RBuffer) error {

func (a *AttAxis) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, []rbytes.Member{
{"fNdivisions", &a.Ndivs},
{"fAxisColor", &a.AxisColor},
{"fLabelColor", &a.LabelColor},
{"fLabelFont", &a.LabelFont},
{"fLabelOffset", &a.LabelOffset},
{"fLabelSize", &a.LabelSize},
{"fTickLength", &a.Ticks},
{"fTitleOffset", &a.TitleOffset},
{"fTitleSize", &a.TitleSize},
{"fTitleColor", &a.TitleColor},
{"fTitleFont", &a.TitleFont},
{Name: "fNdivisions", Value: &a.Ndivs},
{Name: "fAxisColor", Value: &a.AxisColor},
{Name: "fLabelColor", Value: &a.LabelColor},
{Name: "fLabelFont", Value: &a.LabelFont},
{Name: "fLabelOffset", Value: &a.LabelOffset},
{Name: "fLabelSize", Value: &a.LabelSize},
{Name: "fTickLength", Value: &a.Ticks},
{Name: "fTitleOffset", Value: &a.TitleOffset},
{Name: "fTitleSize", Value: &a.TitleSize},
{Name: "fTitleColor", Value: &a.TitleColor},
{Name: "fTitleFont", Value: &a.TitleFont},
}...)
return mbrs
}
Expand Down
4 changes: 2 additions & 2 deletions groot/rbase/attfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ func (a *AttFill) UnmarshalROOT(r *rbytes.RBuffer) error {

func (a *AttFill) RMembers() []rbytes.Member {
return []rbytes.Member{
{"fFillColor", &a.Color},
{"fFillStyle", &a.Style},
{Name: "fFillColor", Value: &a.Color},
{Name: "fFillStyle", Value: &a.Style},
}
}

Expand Down
6 changes: 3 additions & 3 deletions groot/rbase/attline.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ func (a *AttLine) UnmarshalROOT(r *rbytes.RBuffer) error {

func (a *AttLine) RMembers() []rbytes.Member {
return []rbytes.Member{
{"fLineColor", &a.Color},
{"fLineStyle", &a.Style},
{"fLineWidth", &a.Width},
{Name: "fLineColor", Value: &a.Color},
{Name: "fLineStyle", Value: &a.Style},
{Name: "fLineWidth", Value: &a.Width},
}
}

Expand Down
6 changes: 3 additions & 3 deletions groot/rbase/attmarker.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ func (a *AttMarker) UnmarshalROOT(r *rbytes.RBuffer) error {

func (a *AttMarker) RMembers() []rbytes.Member {
return []rbytes.Member{
{"fMarkerColor", &a.Color},
{"fMarkerStyle", &a.Style},
{"fMarkerSize", &a.Width},
{Name: "fMarkerColor", Value: &a.Color},
{Name: "fMarkerStyle", Value: &a.Style},
{Name: "fMarkerSize", Value: &a.Width},
}
}

Expand Down
4 changes: 2 additions & 2 deletions groot/rbase/named.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func (n *Named) MarshalROOT(w *rbytes.WBuffer) (int, error) {
func (n *Named) RMembers() []rbytes.Member {
o := n.obj.RMembers()
return append(o, []rbytes.Member{
{"fName", &n.name},
{"fTitle", &n.title},
{Name: "fName", Value: &n.name},
{Name: "fTitle", Value: &n.title},
}...)
}

Expand Down
4 changes: 2 additions & 2 deletions groot/rbase/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ func (obj *Object) MarshalROOT(w *rbytes.WBuffer) (int, error) {

func (obj *Object) RMembers() []rbytes.Member {
return []rbytes.Member{
{"fUniqueID", &obj.ID},
{"fBits", &obj.Bits},
{Name: "fUniqueID", Value: &obj.ID},
{Name: "fBits", Value: &obj.Bits},
}
}

Expand Down
6 changes: 3 additions & 3 deletions groot/rcont/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ func (l *List) RMembers() (mbrs []rbytes.Member) {
opts = l.opts
}
mbrs = append(mbrs, []rbytes.Member{
{"name", &l.name},
{"arr", &arr},
{"opt", &opts},
{Name: "name", Value: &l.name},
{Name: "arr", Value: &arr},
{Name: "opt", Value: &opts},
}...)

return mbrs
Expand Down
22 changes: 11 additions & 11 deletions groot/rhist/axis.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,17 @@ func (a *taxis) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, a.Named.RMembers()...)
mbrs = append(mbrs, a.attaxis.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fNbins", &a.nbins},
{"fXmin", &a.xmin},
{"fXmax", &a.xmax},
{"fXbins", &a.xbins.Data},
{"fFirst", &a.first},
{"fLast", &a.last},
{"fBits2", &a.bits2},
{"fTimeDisplay", &a.time},
{"fTimeFormat", &a.tfmt},
{"fLabels", &a.labels},
{"fModLabs", &a.modlabs},
{Name: "fNbins", Value: &a.nbins},
{Name: "fXmin", Value: &a.xmin},
{Name: "fXmax", Value: &a.xmax},
{Name: "fXbins", Value: &a.xbins.Data},
{Name: "fFirst", Value: &a.first},
{Name: "fLast", Value: &a.last},
{Name: "fBits2", Value: &a.bits2},
{Name: "fTimeDisplay", Value: &a.time},
{Name: "fTimeFormat", Value: &a.tfmt},
{Name: "fLabels", Value: &a.labels},
{Name: "fModLabs", Value: &a.modlabs},
}...)
return mbrs
}
Expand Down
42 changes: 21 additions & 21 deletions groot/rhist/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ func (g *tgraph) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, g.attfill.RMembers()...)
mbrs = append(mbrs, g.attmarker.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fNpoints", &g.npoints},
{"fX", &g.x},
{"fY", &g.y},
{"fFunctions", g.funcs},
{"fHistogram", &g.histo},
{"fMinimum", &g.min},
{"fMaximum", &g.max},
{Name: "fNpoints", Value: &g.npoints},
{Name: "fX", Value: &g.x},
{Name: "fY", Value: &g.y},
{Name: "fFunctions", Value: g.funcs},
{Name: "fHistogram", Value: &g.histo},
{Name: "fMinimum", Value: &g.min},
{Name: "fMaximum", Value: &g.max},
}...)

return mbrs
Expand Down Expand Up @@ -401,8 +401,8 @@ func (g *tgrapherrs) UnmarshalROOT(r *rbytes.RBuffer) error {
func (g *tgrapherrs) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, g.tgraph.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fEX", &g.xerr},
{"fEY", &g.yerr},
{Name: "fEX", Value: &g.xerr},
{Name: "fEY", Value: &g.yerr},
}...)

return mbrs
Expand Down Expand Up @@ -624,10 +624,10 @@ func (g *tgraphasymmerrs) UnmarshalROOT(r *rbytes.RBuffer) error {
func (g *tgraphasymmerrs) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, g.tgraph.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fEXlow", &g.xerrlo},
{"fEXhigh", &g.xerrhi},
{"fEYlow", &g.yerrlo},
{"fEYhigh", &g.yerrhi},
{Name: "fEXlow", Value: &g.xerrlo},
{Name: "fEXhigh", Value: &g.xerrhi},
{Name: "fEYlow", Value: &g.yerrlo},
{Name: "fEYhigh", Value: &g.yerrhi},
}...)

return mbrs
Expand Down Expand Up @@ -828,14 +828,14 @@ func (g *tgraphmultierrs) RMembers() (mbrs []rbytes.Member) {
}
mbrs = append(mbrs, g.tgraph.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fNYErrors", &g.nyerr},
{"fSumErrorsMode", &g.sumErrMode},
{"fExL", &g.xerrlo},
{"fExH", &g.xerrhi},
{"fEyL", &yerrlo},
{"fEyH", &yerrhi},
{"fAttFill", attfills},
{"fAttLine", attlines},
{Name: "fNYErrors", Value: &g.nyerr},
{Name: "fSumErrorsMode", Value: &g.sumErrMode},
{Name: "fExL", Value: &g.xerrlo},
{Name: "fExH", Value: &g.xerrhi},
{Name: "fEyL", Value: &yerrlo},
{Name: "fEyH", Value: &yerrhi},
{Name: "fAttFill", Value: attfills},
{Name: "fAttLine", Value: attlines},
}...)

return mbrs
Expand Down
6 changes: 3 additions & 3 deletions groot/rhist/h1_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (h *H1F) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *H1F) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th1.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down Expand Up @@ -404,7 +404,7 @@ func (h *H1D) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *H1D) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th1.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down Expand Up @@ -690,7 +690,7 @@ func (h *H1I) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *H1I) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th1.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down
6 changes: 3 additions & 3 deletions groot/rhist/h2_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ func (h *H2F) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *H2F) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th2.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down Expand Up @@ -785,7 +785,7 @@ func (h *H2D) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *H2D) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th2.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down Expand Up @@ -1179,7 +1179,7 @@ func (h *H2I) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *H2I) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th2.RMembers()...)
mbrs = append(mbrs, rbytes.Member{
"fArray", &h.arr.Data,
Name: "fArray", Value: &h.arr.Data,
})
return mbrs
}
Expand Down
52 changes: 26 additions & 26 deletions groot/rhist/hist.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,28 +210,28 @@ func (h *th1) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.attfill.RMembers()...)
mbrs = append(mbrs, h.attmarker.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fNcells", &h.ncells},
{"fXaxis", &h.xaxis},
{"fYaxis", &h.yaxis},
{"fZaxis", &h.zaxis},
{"fBarOffset", &h.boffset},
{"fBarWidth", &h.bwidth},
{"fEntries", &h.entries},
{"fTsumw", &h.tsumw},
{"fTsumw2", &h.tsumw2},
{"fTsumwx", &h.tsumwx},
{"fTsumwx2", &h.tsumwx2},
{"fMaximum", &h.max},
{"fMinimum", &h.min},
{"fNormFactor", &h.norm},
{"fContour", &h.contour.Data},
{"fSumw2", &h.sumw2.Data},
{"fOption", &h.opt},
{"fFunctions", &h.funcs},
{"fBufferSize", len(h.buffer)}, // FIXME(sbinet)
{"fBuffer", &h.buffer},
{"fBinStatErrOpt", &h.erropt},
{"fStatOverflows", &h.oflow},
{Name: "fNcells", Value: &h.ncells},
{Name: "fXaxis", Value: &h.xaxis},
{Name: "fYaxis", Value: &h.yaxis},
{Name: "fZaxis", Value: &h.zaxis},
{Name: "fBarOffset", Value: &h.boffset},
{Name: "fBarWidth", Value: &h.bwidth},
{Name: "fEntries", Value: &h.entries},
{Name: "fTsumw", Value: &h.tsumw},
{Name: "fTsumw2", Value: &h.tsumw2},
{Name: "fTsumwx", Value: &h.tsumwx},
{Name: "fTsumwx2", Value: &h.tsumwx2},
{Name: "fMaximum", Value: &h.max},
{Name: "fMinimum", Value: &h.min},
{Name: "fNormFactor", Value: &h.norm},
{Name: "fContour", Value: &h.contour.Data},
{Name: "fSumw2", Value: &h.sumw2.Data},
{Name: "fOption", Value: &h.opt},
{Name: "fFunctions", Value: &h.funcs},
{Name: "fBufferSize", Value: len(h.buffer)}, // FIXME(sbinet)
{Name: "fBuffer", Value: &h.buffer},
{Name: "fBinStatErrOpt", Value: &h.erropt},
{Name: "fStatOverflows", Value: &h.oflow},
}...)

return mbrs
Expand Down Expand Up @@ -301,10 +301,10 @@ func (h *th2) UnmarshalROOT(r *rbytes.RBuffer) error {
func (h *th2) RMembers() (mbrs []rbytes.Member) {
mbrs = append(mbrs, h.th1.RMembers()...)
mbrs = append(mbrs, []rbytes.Member{
{"fScalefactor", &h.scale},
{"fTsumwy", &h.tsumwy},
{"fTsumwy2", &h.tsumwy2},
{"fTsumwxy", &h.tsumwxy},
{Name: "fScalefactor", Value: &h.scale},
{Name: "fTsumwy", Value: &h.tsumwy},
{Name: "fTsumwy2", Value: &h.tsumwy2},
{Name: "fTsumwxy", Value: &h.tsumwxy},
}...)

return mbrs
Expand Down

0 comments on commit a44838e

Please sign in to comment.