Documentation ¶
Overview ¶
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 ¶
- Constants
- type Marshaler
- type RBuffer
- func (r *RBuffer) CheckByteCount(pos, count int32, start int64, class string)
- func (r *RBuffer) DumpHex(n int)
- func (r *RBuffer) Err() error
- func (r *RBuffer) Len() int64
- func (r *RBuffer) Pos() int64
- func (r *RBuffer) Read(p []byte) (int, error)
- func (r *RBuffer) ReadBool() bool
- func (r *RBuffer) ReadCString(n int) string
- func (r *RBuffer) ReadF32() float32
- func (r *RBuffer) ReadF64() float64
- func (r *RBuffer) ReadFastArrayBool(n int) []bool
- func (r *RBuffer) ReadFastArrayF32(n int) []float32
- func (r *RBuffer) ReadFastArrayF64(n int) []float64
- func (r *RBuffer) ReadFastArrayI16(n int) []int16
- func (r *RBuffer) ReadFastArrayI32(n int) []int32
- func (r *RBuffer) ReadFastArrayI64(n int) []int64
- func (r *RBuffer) ReadFastArrayI8(n int) []int8
- func (r *RBuffer) ReadFastArrayString(n int) []string
- func (r *RBuffer) ReadFastArrayU16(n int) []uint16
- func (r *RBuffer) ReadFastArrayU32(n int) []uint32
- func (r *RBuffer) ReadFastArrayU64(n int) []uint64
- func (r *RBuffer) ReadFastArrayU8(n int) []uint8
- func (r *RBuffer) ReadI16() int16
- func (r *RBuffer) ReadI32() int32
- func (r *RBuffer) ReadI64() int64
- func (r *RBuffer) ReadI8() int8
- func (r *RBuffer) ReadObject(class string) root.Object
- func (r *RBuffer) ReadObjectAny() (obj root.Object)
- func (r *RBuffer) ReadSTLString() string
- func (r *RBuffer) ReadStaticArrayI32() []int32
- func (r *RBuffer) ReadString() string
- func (r *RBuffer) ReadU16() uint16
- func (r *RBuffer) ReadU32() uint32
- func (r *RBuffer) ReadU64() uint64
- func (r *RBuffer) ReadU8() uint8
- func (r *RBuffer) ReadVersion(class string) (vers int16, pos, n int32)
- func (r *RBuffer) SetErr(err error)
- func (r *RBuffer) SetPos(pos int64) error
- func (r *RBuffer) SkipObject()
- func (r *RBuffer) SkipVersion(class string)
- func (r *RBuffer) StreamerInfo(name string, version int) (StreamerInfo, error)
- type RStreamer
- type RVersioner
- type Streamer
- type StreamerElement
- type StreamerInfo
- type StreamerInfoContext
- type Unmarshaler
- type WBuffer
- func (w *WBuffer) Bytes() []byte
- func (w *WBuffer) DumpHex(n int)
- func (w *WBuffer) Err() error
- func (w *WBuffer) Grow(n int)
- func (w *WBuffer) Len() int64
- func (w *WBuffer) Pos() int64
- func (w *WBuffer) SetByteCount(beg int64, class string) (int, error)
- func (w *WBuffer) SetErr(err error)
- func (w *WBuffer) SetPos(pos int64)
- func (w *WBuffer) StreamerInfo(name string, version int) (StreamerInfo, error)
- func (w *WBuffer) Write(p []byte) (int, error)
- func (w *WBuffer) WriteBool(v bool)
- func (w *WBuffer) WriteCString(v string)
- func (w *WBuffer) WriteClass(beg int64, obj root.Object) (uint32, error)
- func (w *WBuffer) WriteF32(v float32)
- func (w *WBuffer) WriteF64(v float64)
- func (w *WBuffer) WriteFastArrayBool(v []bool)
- func (w *WBuffer) WriteFastArrayF32(v []float32)
- func (w *WBuffer) WriteFastArrayF64(v []float64)
- func (w *WBuffer) WriteFastArrayI16(v []int16)
- func (w *WBuffer) WriteFastArrayI32(v []int32)
- func (w *WBuffer) WriteFastArrayI64(v []int64)
- func (w *WBuffer) WriteFastArrayI8(v []int8)
- func (w *WBuffer) WriteFastArrayString(v []string)
- func (w *WBuffer) WriteFastArrayU16(v []uint16)
- func (w *WBuffer) WriteFastArrayU32(v []uint32)
- func (w *WBuffer) WriteFastArrayU64(v []uint64)
- func (w *WBuffer) WriteFastArrayU8(v []uint8)
- func (w *WBuffer) WriteI16(v int16)
- func (w *WBuffer) WriteI32(v int32)
- func (w *WBuffer) WriteI64(v int64)
- func (w *WBuffer) WriteI8(v int8)
- func (w *WBuffer) WriteObjectAny(obj root.Object) error
- func (w *WBuffer) WriteSTLString(v string)
- func (w *WBuffer) WriteStaticArrayI32(v []int32)
- func (w *WBuffer) WriteString(v string)
- func (w *WBuffer) WriteU16(v uint16)
- func (w *WBuffer) WriteU32(v uint32)
- func (w *WBuffer) WriteU64(v uint64)
- func (w *WBuffer) WriteU8(v uint8)
- func (w *WBuffer) WriteVersion(vers int16) int64
- type WStreamer
Constants ¶
const ( BypassStreamer uint32 = 1 << 12 CannotHandleMemberWiseStreaming uint32 = 1 << 17 )
const (
StreamedMemberWise = 0x4000
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Marshaler ¶
Marshaler is the interface implemented by an object that can marshal itself into a ROOT buffer
type RBuffer ¶
type RBuffer struct {
// contains filtered or unexported fields
}
RBuffer is a read-only ROOT buffer for streaming.
func NewRBuffer ¶
func NewRBuffer(data []byte, refs map[int64]interface{}, offset uint32, ctx StreamerInfoContext) *RBuffer
func (*RBuffer) CheckByteCount ¶
func (*RBuffer) ReadVersion ¶
type RStreamer ¶ added in v0.17.0
RStreamer is the interface implemented by types that can stream themselves from a ROOT buffer.
type RVersioner ¶ added in v0.17.0
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 ¶ added in v0.17.0
Streamer is the interface implemented by types that can stream themselves to and from a ROOT buffer.
type StreamerElement ¶
type StreamerElement interface { root.Named ArrayDim() int ArrayLen() int Type() rmeta.Enum Offset() uintptr Size() uintptr TypeName() string XMin() float64 XMax() float64 Factor() float64 }
StreamerElement describes a ROOT StreamerElement
type StreamerInfo ¶
type StreamerInfo interface { root.Named CheckSum() int ClassVersion() int Elements() []StreamerElement }
StreamerInfo describes a ROOT Streamer.
type StreamerInfoContext ¶
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 ¶
Unmarshaler is the interface implemented by an object that can unmarshal itself from a ROOT buffer
type WBuffer ¶
type WBuffer struct {
// contains filtered or unexported fields
}
WBuffer is a write-only ROOT buffer for streaming.
func NewWBuffer ¶
func NewWBuffer(data []byte, refs map[interface{}]int64, offset uint32, ctx StreamerInfoContext) *WBuffer
func (*WBuffer) StreamerInfo ¶ added in v0.18.0
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.