croot: go-hep.org/x/cgo/croot Index | Files

package croot

import "go-hep.org/x/cgo/croot"

Package croot exposes a subset of the ROOT framework.

Index

Package Files

branch.go branchelement.go cgoedm.go class.go croot.go file.go gendict.go hist.go leaf.go objarray.go object.go random.go root.go tree.go utils.go

Constants

const (
    STLT_NotSTL               STLType = 0
    STLT_STLvector                    = 1
    STLT_STLlist                      = 2
    STLT_STLdeque                     = 3
    STLT_STLmap                       = 4
    STLT_STLmultimap                  = 5
    STLT_STLset                       = 6
    STLT_STLmultiset                  = 7
    STLT_STLbitset                    = 8
    STLT_STLforwardlist               = 9
    STLT_STLunorderedset              = 10
    STLT_STLunorderedmultiset         = 11
    STLT_STLunorderedmap              = 12
    STLT_STLunorderedmultimap         = 13
    STLT_STLend                       = 14
    STLT_STLany                       = 300 /* TVirtualStreamerInfo::kSTL */
    STLT_STLstring                    = 365 /* TVirtualStreamerInfo::kSTLstring */
)

STLType values defined in ESTLType.h

const (
    DTK_Char                    DataTypeKind = 1
    DTK_UChar                                = 11
    DTK_Short                                = 2
    DTK_UShort                               = 12
    DTK_Int                                  = 3
    DTK_UInt                                 = 13
    DTK_Long                                 = 4
    DTK_ULong                                = 14
    DTK_Float                                = 5
    DTK_Double                               = 8
    DTK_Double32                             = 9
    DTK_char                                 = 10
    DTK_Bool                                 = 18
    DTK_Long64                               = 16
    DTK_ULong64                              = 17
    DTK_Other                                = -1
    DTK_NoType                               = 0
    DTK_Float16                              = 19
    DTK_Counter                              = 6
    DTK_CharStar                             = 7
    DTK_Bits                                 = 15 /* for compatibility with TStreamerInfo */
    DTK_Void                                 = 20
    DTK_DataTypeAliasUnsigned                = 21
    DTK_DataTypeAliasSignedChar              = 22

    DTK_NumDataTypes DataTypeKind = 23
)

DataTypeKind defined in TDataType.h -- EDataType

func RegisterType Uses

func RegisterType(v interface{})

RegisterType declares the (equivalent) C-layout of value v to ROOT so values of the same type than v can be written out to ROOT files

type Branch Uses

type Branch interface {
    Object
    GetAddress() uintptr
    GetClassName() string
    GetListOfLeaves() []Leaf
    GetLeaf(n string) Leaf
}

Branch

type BranchElement Uses

type BranchElement interface {
    Branch
}

BranchElement

type Class Uses

type Class interface {
    Object

    GetBaseClass(class string) Class
    GetClassSize() int
    GetClassVersion() Version
    GetDataMember(name string) DataMember
}

func GetClass Uses

func GetClass(name string) Class

type DataMember Uses

type DataMember interface {
    Object

    GetArrayDim() int
    GetClass() Class
    GetDataType() DataType
    GetFullTypeName() string
    GetOffset() int
    GetTypeName() string

    IsaPointer() bool
    IsBasic() bool
    IsEnum() bool
    IsPersistent() bool
    IsSTLContainer() STLType
}

DataMember provides information about name of data member, its type, and comment field string.

type DataType Uses

type DataType interface {
    Object

    GetFullTypeName() string
    GetType() DataTypeKind
    GetTypeName() string
    Size() int
    Property() int64
}

DataType provides basic data type description.

type DataTypeKind Uses

type DataTypeKind int

DataTypeKind describes basic data types

type File Uses

type File interface {
    Object

    Cd(path string) bool
    Close(option string)
    GetFd() int
    Get(namecycle string) Object
    IsOpen() bool
    Write(name string, opt, bufsiz int) int
}

func OpenFile Uses

func OpenFile(name, option, title string, compress, netopt int) (File, error)

type H1F Uses

type H1F interface {
    Object

    AddBinContent(bin int, weight float64)
    GetBinContent(bin int) float64
    SetBinContent(bin int, value float64)

    Fill(value, weight float64) int
    FillN(data [][2]float64)

    GetBin(bin int) float64
    GetBinCenter(bin int) float64
    GetBinError(bin int) float64
    GetBinErrorLow(bin int) float64
    GetBinErrorUp(bin int) float64
    GetBinWidth(bin int) float64

    GetEntries() float64
    GetMean() float64
    GetMeanError() float64
    GetRMS() float64
    GetRMSError() float64
}

H1F

func NewH1F Uses

func NewH1F(name, title string, nbins int, xlow, xup float64) H1F

func NewH1FFrom Uses

func NewH1FFrom(name, title string, data []float64) H1F

type Leaf Uses

type Leaf interface {
    Object
    GetBranch() Branch
    GetLenStatic() int
    GetLeafCount() Leaf
    GetTypeName() string
    GetValuePointer() uintptr
    SetAddress(addr unsafe.Pointer)
}

Leaf

type LeafD Uses

type LeafD interface {
    Leaf
    GetValue(idx int) float64
}

LeafD

type LeafF Uses

type LeafF interface {
    Leaf
    GetValue(idx int) float64
}

LeafF

type LeafI Uses

type LeafI interface {
    Leaf
    GetValue(idx int) float64
}

LeafI

type LeafO Uses

type LeafO interface {
    Leaf
    GetValue(idx int) float64
}

LeafO

type ObjArray Uses

type ObjArray interface {
    Object
    At(idx int64) Object
    GetSize() int64
    GetEntries() int64
}

ObjArray

type Object Uses

type Object interface {
    ClassName() string
    Clone(option Option) Object
    FindObject(name string) Object
    GetName() string
    GetTitle() string
    InheritsFrom(clsname string) bool
    Print(opt Option)
}

type Option Uses

type Option string

type ROOT Uses

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

ROOT is the entry point to the ROOT system.

var GRoot *ROOT = nil

func (*ROOT) GetFile Uses

func (r *ROOT) GetFile(name string) File

func (*ROOT) GetVersion Uses

func (r *ROOT) GetVersion() string

type Random Uses

type Random interface {
    Object
    Gaus(mean, sigma float64) float64
    Rannorf() (a, b float32)
    Rannord() (a, b float64)
    Rndm(i int) float64
}

TRandom

var GRandom Random = &randomImpl{C.CRoot_gRandom}

type STLType Uses

type STLType int

STLType describes STL collections and some std classes.

type Tree Uses

type Tree interface {
    Object

    Branch(name string, obj interface{}, bufsiz, splitlevel int) (Branch, error)
    Branch2(name string, objaddr interface{}, leaflist string, bufsiz int) (Branch, error)
    Delete()
    Fill() (int, error)
    GetBranch(name string) Branch
    GetEntries() int64
    GetEntry(entry int64, getall int) int
    GetLeaf(name string) Leaf
    GetListOfBranches() []Branch
    GetListOfLeaves() []Leaf
    GetSelectedRows() int64
    GetVal(i int) []float64
    GetV1() []float64
    GetV2() []float64
    GetV3() []float64
    GetV4() []float64
    GetW() []float64
    LoadTree(entry int64) int64
    SetBranchAddress(name string, obj interface{}) int32
    SetBranchStatus(name string, status bool) uint32
    Write(name string, option, bufsize int) int
}

Tree

func NewTree Uses

func NewTree(name, title string, splitlevel int) Tree

type Version Uses

type Version int16

Package croot imports 8 packages (graph). Updated 2018-06-21. Refresh now. Tools for package owners.