func (g *tgraph) UnmarshalROOT(r *rbytes.RBuffer) error {
	beg := r.Pos()

	vers, pos, bcnt := r.ReadVersion(g.Class())

	for _, a := range []rbytes.Unmarshaler{
		&g.named,
		&rbase.AttLine{},
		&rbase.AttFill{},
		&rbase.AttMarker{},
	} {
		err := a.UnmarshalROOT(r)
		if err != nil {
			return err
		}
	}

	g.npoints = r.ReadI32()
	g.maxsize = g.npoints
	if vers < 2 {
		_ = r.ReadI8()
		xs := make([]float32, g.npoints)
		r.ReadArrayF32(xs)
		_ = r.ReadI8()
		ys := make([]float32, g.npoints)
		r.ReadArrayF32(ys)
		g.x = make([]float64, len(xs))
		g.y = make([]float64, len(ys))
		for i := range xs {
			g.x[i] = float64(xs[i])
			g.y[i] = float64(ys[i])
		}

	} else {
		_ = r.ReadI8()
		g.x = make([]float64, g.npoints)
		r.ReadArrayF64(g.x)
		_ = r.ReadI8()
		g.y = make([]float64, g.npoints)
		r.ReadArrayF64(g.y)
	}

	funcs := r.ReadObjectAny()
	if funcs != nil {
		g.funcs = funcs.(root.List)
	}

	histo := r.ReadObjectAny()
	if histo != nil {
		g.histo = histo.(*H1F)
	}

	if vers < 2 {
		g.min = float64(r.ReadF32())
		g.max = float64(r.ReadF32())
	} else {
		g.min = r.ReadF64()
		g.max = r.ReadF64()
	}

	r.CheckByteCount(pos, bcnt, beg, g.Class())
	return r.Err()
}
// ROOTUnmarshaler is the interface implemented by an object that can
// unmarshal itself from a ROOT buffer
ROOTUnmarshaler is the interface implemented by an object that can
unmarshal itself from a ROOT buffer
// ROOTUnmarshaler is the interface implemented by an object that can // unmarshal itself from a ROOT buffer
func (g *tgraph) UnmarshalROOT(r *rbytes.RBuffer) error {
	beg := r.Pos()
	vers, pos, bcnt := r.ReadVersion(g.Class())
	for _, a := range []rbytes.Unmarshaler{
		&g.named,
		&rbase.AttLine{},
		&rbase.AttFill{},
		&rbase.AttMarker{},
	} {
		err := a.UnmarshalROOT(r)
		if err != nil {
			return err
		}
	}
	g.npoints = r.ReadI32()
	g.maxsize = g.npoints
	if vers < 2 {
		_ = r.ReadI8()
		xs := make([]float32, g.npoints)
		r.ReadArrayF32(xs)
		_ = r.ReadI8()
		ys := make([]float32, g.npoints)
		r.ReadArrayF32(ys)
		g.x = make([]float64, len(xs))
		g.y = make([]float64, len(ys))
		for i := range xs {
			g.x[i] = float64(xs[i])
			g.y[i] = float64(ys[i])
		}
	} else {
		_ = r.ReadI8()
		g.x = make([]float64, g.npoints)
		r.ReadArrayF64(g.x)
		_ = r.ReadI8()
		g.y = make([]float64, g.npoints)
		r.ReadArrayF64(g.y)
	}
	funcs := r.ReadObjectAny()
	if funcs != nil {
		g.funcs = funcs.(root.List)
	}
	histo := r.ReadObjectAny()
	if histo != nil {
		g.histo = histo.(*H1F)
	}
	if vers < 2 {
		g.min = float64(r.ReadF32())
		g.max = float64(r.ReadF32())
	} else {
		g.min = r.ReadF64()
		g.max = r.ReadF64()
	}
	r.CheckByteCount(pos, bcnt, beg, g.Class())
	return r.Err()
}
func ( g * tgraph ) UnmarshalROOT ( r * rbytes . RBuffer ) error { beg := r . Pos ( ) vers , pos , bcnt := r . ReadVersion ( g . Class ( ) ) for _ , a := range [ ] rbytes . Unmarshaler { & g . named , & rbase . AttLine { } , & rbase . AttFill { } , & rbase . AttMarker { } , } { err := a . UnmarshalROOT ( r ) if err != nil { return err } } g . npoints = r . ReadI32 ( ) g . maxsize = g . npoints if vers < 2 { _ = r . ReadI8 ( ) xs := make ( [ ] float32 , g . npoints ) r . ReadArrayF32 ( xs ) _ = r . ReadI8 ( ) ys := make ( [ ] float32 , g . npoints ) r . ReadArrayF32 ( ys ) g . x = make ( [ ] float64 , len ( xs ) ) g . y = make ( [ ] float64 , len ( ys ) ) for i := range xs { g . x [ i ] = float64 ( xs [ i ] ) g . y [ i ] = float64 ( ys [ i ] ) } } else { _ = r . ReadI8 ( ) g . x = make ( [ ] float64 , g . npoints ) r . ReadArrayF64 ( g . x ) _ = r . ReadI8 ( ) g . y = make ( [ ] float64 , g . npoints ) r . ReadArrayF64 ( g . y ) } funcs := r . ReadObjectAny ( ) if funcs != nil { g . funcs = funcs . ( root . List ) } histo := r . ReadObjectAny ( ) if histo != nil { g . histo = histo . ( * H1F ) } if vers < 2 { g . min = float64 ( r . ReadF32 ( ) ) g . max = float64 ( r . ReadF32 ( ) ) } else { g . min = r . ReadF64 ( ) g . max = r . ReadF64 ( ) } r . CheckByteCount ( pos , bcnt , beg , g . Class ( ) ) return r . Err ( ) }
ROOTUnmarshaler is the interface implemented by an object that can
unmarshal itself from a ROOT buffer
ROOTUnmarshaler is the interface implemented by an object that can unmarshal itself from a ROOT buffer