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

package rmeta

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

Index

Package Files

consts.go cxx.go enum_string.go

Variables

var CxxBuiltins = map[string]reflect.Type{
    "bool": reflect.TypeOf(false),

    "unsigned":       reflect.TypeOf(uint(0)),
    "unsigned char":  reflect.TypeOf(uint8(0)),
    "unsigned short": reflect.TypeOf(uint16(0)),
    "unsigned int":   reflect.TypeOf(uint32(0)),
    "unsigned long":  reflect.TypeOf(uint64(0)),

    "char":  reflect.TypeOf(int8(0)),
    "short": reflect.TypeOf(int16(0)),
    "int":   reflect.TypeOf(int32(0)),
    "long":  reflect.TypeOf(int64(0)),

    "float":  reflect.TypeOf(float32(0)),
    "double": reflect.TypeOf(float64(0)),

    "string": reflect.TypeOf(""),

    "Bool_t": reflect.TypeOf(true),

    "Byte_t": reflect.TypeOf(uint8(0)),

    "Char_t":    reflect.TypeOf(int8(0)),
    "UChar_t":   reflect.TypeOf(uint8(0)),
    "Short_t":   reflect.TypeOf(int16(0)),
    "UShort_t":  reflect.TypeOf(uint16(0)),
    "Int_t":     reflect.TypeOf(int32(0)),
    "UInt_t":    reflect.TypeOf(uint32(0)),
    "Seek_t":    reflect.TypeOf(int64(0)),
    "Long_t":    reflect.TypeOf(int64(0)),
    "ULong_t":   reflect.TypeOf(uint64(0)),
    "Long64_t":  reflect.TypeOf(int64(0)),
    "ULong64_t": reflect.TypeOf(uint64(0)),

    "Float_t":    reflect.TypeOf(float32(0)),
    "Float16_t":  reflect.TypeOf(root.Float16(0)),
    "Double_t":   reflect.TypeOf(float64(0)),
    "Double32_t": reflect.TypeOf(root.Double32(0)),

    "Version_t": reflect.TypeOf(int16(0)),
    "Option_t":  reflect.TypeOf(""),
    "Ssiz_t":    reflect.TypeOf(int(0)),
    "Real_t":    reflect.TypeOf(float32(0)),

    "Axis_t": reflect.TypeOf(float64(0)),
    "Stat_t": reflect.TypeOf(float64(0)),

    "Font_t":   reflect.TypeOf(int16(0)),
    "Style_t":  reflect.TypeOf(int16(0)),
    "Marker_t": reflect.TypeOf(int16(0)),
    "Width_t":  reflect.TypeOf(int16(0)),
    "Color_t":  reflect.TypeOf(int16(0)),
    "SCoord_t": reflect.TypeOf(int16(0)),
    "Coord_t":  reflect.TypeOf(float64(0)),
    "Angle_t":  reflect.TypeOf(float32(0)),
    "Size_t":   reflect.TypeOf(float32(0)),
}
var GoType2Cxx = map[string]string{
    "bool":    "bool",
    "byte":    "unsigned char",
    "uint":    "unsigned int",
    "uint8":   "unsigned char",
    "uint16":  "unsigned short",
    "uint32":  "unsigned int",
    "uint64":  "unsigned long",
    "int":     "int",
    "int8":    "char",
    "int16":   "short",
    "int32":   "int",
    "int64":   "long",
    "float32": "float",
    "float64": "double",
}
var GoType2ROOTEnum = map[reflect.Type]Enum{
    reflect.TypeOf(int8(0)):  Char,
    reflect.TypeOf(int16(0)): Short,
    reflect.TypeOf(int32(0)): Int,
    reflect.TypeOf(int64(0)): Long,

    reflect.TypeOf(float32(0)): Float,
    reflect.TypeOf(float64(0)): Double,
    reflect.TypeOf(uint8(0)):   UChar,

    reflect.TypeOf(uint16(0)): UShort,
    reflect.TypeOf(uint32(0)): UInt,
    reflect.TypeOf(uint64(0)): ULong,

    reflect.TypeOf(false):            Bool,
    reflect.TypeOf(root.Float16(0)):  Float16,
    reflect.TypeOf(root.Double32(0)): Double32,
    reflect.TypeOf(""):               TString,
}

func STLNameFor Uses

func STLNameFor(vtype ESTLType, ctype Enum) string

STLNameFor creates a regular C++ STL container name given a STL enum type and a ROOT enum value for the contained element.

type ESTLType Uses

type ESTLType int32
const (
    NotSTL      ESTLType = 0
    STLvector   ESTLType = 1
    STLlist     ESTLType = 2
    STLdeque    ESTLType = 3
    STLmap      ESTLType = 4
    STLmultimap ESTLType = 5
    STLset      ESTLType = 6
    STLmultiset ESTLType = 7
    STLbitset   ESTLType = 8
    // Here the c++11 containers start. Order counts. For example,
    // tstreamerelements in written rootfiles carry a value and we cannot
    // introduce shifts.
    STLforwardlist       ESTLType = 9
    STLunorderedset      ESTLType = 10
    STLunorderedmultiset ESTLType = 11
    STLunorderedmap      ESTLType = 12
    STLunorderedmultimap ESTLType = 13
    STLend               ESTLType = 14
    STLany               ESTLType = 300 /* TVirtualStreamerInfo::kSTL */
)

constants from core/foundation/inc/ESTLType.h

type Enum Uses

type Enum int32

Enum is the set of ROOT streamer enums

const (
    Base       Enum = 0 // Base class
    Char       Enum = 1
    Short      Enum = 2
    Int        Enum = 3
    Long       Enum = 4
    Float      Enum = 5
    Counter    Enum = 6 // Counter for array size
    CharStar   Enum = 7 // Pointer to array of char
    Double     Enum = 8
    Double32   Enum = 9
    LegacyChar Enum = 10 // Equal to TDataType's kchar
    UChar      Enum = 11
    UShort     Enum = 12
    UInt       Enum = 13
    ULong      Enum = 14
    Bits       Enum = 15
    Long64     Enum = 16
    ULong64    Enum = 17
    Bool       Enum = 18
    Float16    Enum = 19
    OffsetL    Enum = 20 // Fixed size array
    OffsetP    Enum = 40 // Pointer to object
    Object     Enum = 61 // Class  derived from TObject, or for TStreamerSTL::fCtype non-pointer elements
    Any        Enum = 62 // Class  not derived from TObject
    Objectp    Enum = 63 // Class* derived from TObject and with    comment field //->Class, or for TStreamerSTL::fCtype: pointer elements
    ObjectP    Enum = 64 // Class* derived from TObject and with NO comment field //->Class
    TString    Enum = 65 // TString, special case
    TObject    Enum = 66 // TObject, special case
    TNamed     Enum = 67 // TNamed,  special case
    Anyp       Enum = 68 // Class* not derived from TObject with    comment field //->Class
    AnyP       Enum = 69 // Class* not derived from TObject with NO comment field //->Class
    AnyPnoVT   Enum = 70 // Class* not derived from TObject with NO comment field //->Class and Class has NO virtual table
    STLp       Enum = 71 // Pointer to STL container

    Skip  Enum = 100
    SkipL Enum = 120
    SkipP Enum = 140

    Conv  Enum = 200
    ConvL Enum = 220
    ConvP Enum = 240

    STL       Enum = 300
    STLstring Enum = 365

    Streamer   Enum = 500
    StreamLoop Enum = 501

    Cache       Enum = 600 /// Cache the value in memory than is not part of the object but is accessible via a SchemaRule
    Artificial  Enum = 1000
    CacheNew    Enum = 1001
    CacheDelete Enum = 1002

    NeedObjectForVirtualBaseClass Enum = 99997
    Missing                       Enum = 99999
)

constants for the streamers

const (
    Int8    Enum = Char
    Int16   Enum = Short
    Int32   Enum = Int
    Int64   Enum = Long
    Uint8   Enum = UChar
    Uint16  Enum = UShort
    Uint32  Enum = UInt
    Uint64  Enum = ULong
    Float32 Enum = Float
    Float64 Enum = Double
)

aliases for Go

func (Enum) String Uses

func (i Enum) String() string

Package rmeta imports 5 packages (graph) and is imported by 4 packages. Updated 2019-05-17. Refresh now. Tools for package owners.