hep: go-hep.org/x/hep/groot/rbytes Index | Files

package rbytes

import "go-hep.org/x/hep/groot/rbytes"

Package rbytes contains the definitions of types useful for serializing and deserializing ROOT data buffers.

rbytes also defines the interfaces to interact with ROOT's metadata classes such as StreamerInfo and StreamerElements.

Index

Package Files

consts.go rbuffer.go rbytes.go wbuffer.go

Constants

const (
    BypassStreamer                  uint32 = 1 << 12
    CannotHandleMemberWiseStreaming uint32 = 1 << 17
)
const (
    StreamedMemberWise = 0x4000
)

type Marshaler Uses

type Marshaler interface {
    MarshalROOT(w *WBuffer) (int, error)
}

Marshaler is the interface implemented by an object that can marshal itself into a ROOT buffer

type RBuffer Uses

type RBuffer struct {
    // contains filtered or unexported fields
}

RBuffer is a read-only ROOT buffer for streaming.

func NewRBuffer Uses

func NewRBuffer(data []byte, refs map[int64]interface{}, offset uint32, ctx StreamerInfoContext) *RBuffer

func (*RBuffer) CheckByteCount Uses

func (r *RBuffer) CheckByteCount(pos, count int32, start int64, class string)

func (*RBuffer) DumpHex Uses

func (r *RBuffer) DumpHex(n int)

func (*RBuffer) Err Uses

func (r *RBuffer) Err() error

func (*RBuffer) Len Uses

func (r *RBuffer) Len() int64

func (*RBuffer) Pos Uses

func (r *RBuffer) Pos() int64

func (*RBuffer) Read Uses

func (r *RBuffer) Read(p []byte) (int, error)

func (*RBuffer) ReadBool Uses

func (r *RBuffer) ReadBool() bool

func (*RBuffer) ReadCString Uses

func (r *RBuffer) ReadCString(n int) string

func (*RBuffer) ReadF32 Uses

func (r *RBuffer) ReadF32() float32

func (*RBuffer) ReadF64 Uses

func (r *RBuffer) ReadF64() float64

func (*RBuffer) ReadFastArrayBool Uses

func (r *RBuffer) ReadFastArrayBool(n int) []bool

func (*RBuffer) ReadFastArrayF32 Uses

func (r *RBuffer) ReadFastArrayF32(n int) []float32

func (*RBuffer) ReadFastArrayF64 Uses

func (r *RBuffer) ReadFastArrayF64(n int) []float64

func (*RBuffer) ReadFastArrayI16 Uses

func (r *RBuffer) ReadFastArrayI16(n int) []int16

func (*RBuffer) ReadFastArrayI32 Uses

func (r *RBuffer) ReadFastArrayI32(n int) []int32

func (*RBuffer) ReadFastArrayI64 Uses

func (r *RBuffer) ReadFastArrayI64(n int) []int64

func (*RBuffer) ReadFastArrayI8 Uses

func (r *RBuffer) ReadFastArrayI8(n int) []int8

func (*RBuffer) ReadFastArrayString Uses

func (r *RBuffer) ReadFastArrayString(n int) []string

func (*RBuffer) ReadFastArrayU16 Uses

func (r *RBuffer) ReadFastArrayU16(n int) []uint16

func (*RBuffer) ReadFastArrayU32 Uses

func (r *RBuffer) ReadFastArrayU32(n int) []uint32

func (*RBuffer) ReadFastArrayU64 Uses

func (r *RBuffer) ReadFastArrayU64(n int) []uint64

func (*RBuffer) ReadFastArrayU8 Uses

func (r *RBuffer) ReadFastArrayU8(n int) []uint8

func (*RBuffer) ReadI16 Uses

func (r *RBuffer) ReadI16() int16

func (*RBuffer) ReadI32 Uses

func (r *RBuffer) ReadI32() int32

func (*RBuffer) ReadI64 Uses

func (r *RBuffer) ReadI64() int64

func (*RBuffer) ReadI8 Uses

func (r *RBuffer) ReadI8() int8

func (*RBuffer) ReadObject Uses

func (r *RBuffer) ReadObject(class string) root.Object

func (*RBuffer) ReadObjectAny Uses

func (r *RBuffer) ReadObjectAny() (obj root.Object)

func (*RBuffer) ReadSTLString Uses

func (r *RBuffer) ReadSTLString() string

func (*RBuffer) ReadStaticArrayI32 Uses

func (r *RBuffer) ReadStaticArrayI32() []int32

func (*RBuffer) ReadString Uses

func (r *RBuffer) ReadString() string

func (*RBuffer) ReadU16 Uses

func (r *RBuffer) ReadU16() uint16

func (*RBuffer) ReadU32 Uses

func (r *RBuffer) ReadU32() uint32

func (*RBuffer) ReadU64 Uses

func (r *RBuffer) ReadU64() uint64

func (*RBuffer) ReadU8 Uses

func (r *RBuffer) ReadU8() uint8

func (*RBuffer) ReadVersion Uses

func (r *RBuffer) ReadVersion(class string) (vers int16, pos, n int32)

func (*RBuffer) SetErr Uses

func (r *RBuffer) SetErr(err error)

func (*RBuffer) SetPos Uses

func (r *RBuffer) SetPos(pos int64) error

func (*RBuffer) SkipObject Uses

func (r *RBuffer) SkipObject()

func (*RBuffer) SkipVersion Uses

func (r *RBuffer) SkipVersion(class string)

func (*RBuffer) StreamerInfo Uses

func (r *RBuffer) StreamerInfo(name string, version int) (StreamerInfo, error)

StreamerInfo returns the named StreamerInfo. If version is negative, the latest version should be returned.

type RStreamer Uses

type RStreamer interface {
    RStreamROOT(*RBuffer) error
}

RStreamer is the interface implemented by types that can stream themselves from a ROOT buffer.

type RVersioner Uses

type RVersioner interface {
    RVersion() int16
}

RVersioner is the interface implemented by an object that can tell the ROOT system what is its current version.

type Streamer Uses

type Streamer interface {
    WStreamer
    RStreamer
}

Streamer is the interface implemented by types that can stream themselves to and from a ROOT buffer.

type StreamerElement Uses

type StreamerElement interface {
    root.Named

    ArrayDim() int
    ArrayLen() int
    Type() rmeta.Enum
    Offset() uintptr
    Size() uintptr
    TypeName() string
}

StreamerElement describes a ROOT StreamerElement

type StreamerInfo Uses

type StreamerInfo interface {
    root.Named

    CheckSum() int
    ClassVersion() int
    Elements() []StreamerElement
}

StreamerInfo describes a ROOT Streamer.

type StreamerInfoContext Uses

type StreamerInfoContext interface {
    // StreamerInfo returns the named StreamerInfo.
    // If version is negative, the latest version should be returned.
    StreamerInfo(name string, version int) (StreamerInfo, error)
}

StreamerInfoContext defines the protocol to retrieve a ROOT StreamerInfo metadata type by name.

Implementations should make sure the protocol is goroutine safe.

type Unmarshaler Uses

type Unmarshaler interface {
    UnmarshalROOT(r *RBuffer) error
}

Unmarshaler is the interface implemented by an object that can unmarshal itself from a ROOT buffer

type WBuffer Uses

type WBuffer struct {
    // contains filtered or unexported fields
}

WBuffer is a write-only ROOT buffer for streaming.

func NewWBuffer Uses

func NewWBuffer(data []byte, refs map[interface{}]int64, offset uint32, ctx StreamerInfoContext) *WBuffer

func (*WBuffer) Bytes Uses

func (w *WBuffer) Bytes() []byte

func (*WBuffer) Err Uses

func (w *WBuffer) Err() error

func (*WBuffer) Grow Uses

func (w *WBuffer) Grow(n int)

func (*WBuffer) Pos Uses

func (w *WBuffer) Pos() int64

func (*WBuffer) SetByteCount Uses

func (w *WBuffer) SetByteCount(beg int64, class string) (int, error)

func (*WBuffer) SetErr Uses

func (w *WBuffer) SetErr(err error)

func (*WBuffer) SetPos Uses

func (w *WBuffer) SetPos(pos int64)

func (*WBuffer) StreamerInfo Uses

func (w *WBuffer) StreamerInfo(name string, version int) (StreamerInfo, error)

StreamerInfo returns the named StreamerInfo. If version is negative, the latest version should be returned.

func (*WBuffer) Write Uses

func (w *WBuffer) Write(p []byte) (int, error)

func (*WBuffer) WriteBool Uses

func (w *WBuffer) WriteBool(v bool)

func (*WBuffer) WriteCString Uses

func (w *WBuffer) WriteCString(v string)

func (*WBuffer) WriteClass Uses

func (w *WBuffer) WriteClass(beg int64, obj root.Object) (uint32, error)

func (*WBuffer) WriteF32 Uses

func (w *WBuffer) WriteF32(v float32)

func (*WBuffer) WriteF64 Uses

func (w *WBuffer) WriteF64(v float64)

func (*WBuffer) WriteFastArrayBool Uses

func (w *WBuffer) WriteFastArrayBool(v []bool)

func (*WBuffer) WriteFastArrayF32 Uses

func (w *WBuffer) WriteFastArrayF32(v []float32)

func (*WBuffer) WriteFastArrayF64 Uses

func (w *WBuffer) WriteFastArrayF64(v []float64)

func (*WBuffer) WriteFastArrayI16 Uses

func (w *WBuffer) WriteFastArrayI16(v []int16)

func (*WBuffer) WriteFastArrayI32 Uses

func (w *WBuffer) WriteFastArrayI32(v []int32)

func (*WBuffer) WriteFastArrayI64 Uses

func (w *WBuffer) WriteFastArrayI64(v []int64)

func (*WBuffer) WriteFastArrayI8 Uses

func (w *WBuffer) WriteFastArrayI8(v []int8)

func (*WBuffer) WriteFastArrayString Uses

func (w *WBuffer) WriteFastArrayString(v []string)

func (*WBuffer) WriteFastArrayU16 Uses

func (w *WBuffer) WriteFastArrayU16(v []uint16)

func (*WBuffer) WriteFastArrayU32 Uses

func (w *WBuffer) WriteFastArrayU32(v []uint32)

func (*WBuffer) WriteFastArrayU64 Uses

func (w *WBuffer) WriteFastArrayU64(v []uint64)

func (*WBuffer) WriteFastArrayU8 Uses

func (w *WBuffer) WriteFastArrayU8(v []uint8)

func (*WBuffer) WriteI16 Uses

func (w *WBuffer) WriteI16(v int16)

func (*WBuffer) WriteI32 Uses

func (w *WBuffer) WriteI32(v int32)

func (*WBuffer) WriteI64 Uses

func (w *WBuffer) WriteI64(v int64)

func (*WBuffer) WriteI8 Uses

func (w *WBuffer) WriteI8(v int8)

func (*WBuffer) WriteObjectAny Uses

func (w *WBuffer) WriteObjectAny(obj root.Object) error

func (*WBuffer) WriteSTLString Uses

func (w *WBuffer) WriteSTLString(v string)

func (*WBuffer) WriteStaticArrayI32 Uses

func (w *WBuffer) WriteStaticArrayI32(v []int32)

func (*WBuffer) WriteString Uses

func (w *WBuffer) WriteString(v string)

func (*WBuffer) WriteU16 Uses

func (w *WBuffer) WriteU16(v uint16)

func (*WBuffer) WriteU32 Uses

func (w *WBuffer) WriteU32(v uint32)

func (*WBuffer) WriteU64 Uses

func (w *WBuffer) WriteU64(v uint64)

func (*WBuffer) WriteU8 Uses

func (w *WBuffer) WriteU8(v uint8)

func (*WBuffer) WriteVersion Uses

func (w *WBuffer) WriteVersion(vers int16) int64

type WStreamer Uses

type WStreamer interface {
    WStreamROOT(*WBuffer) error
}

WStreamer is the interface implemented by types that can stream themselves to a ROOT buffer.

Package rbytes imports 13 packages (graph) and is imported by 9 packages. Updated 2019-05-31. Refresh now. Tools for package owners.