go-hep.org/x/hep@v0.38.1/groot/rmeta/consts.go (about)

     1  // Copyright ©2017 The go-hep Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package rmeta // import "go-hep.org/x/hep/groot/rmeta"
     6  
     7  //go:generate go tool golang.org/x/tools/cmd/stringer -type Enum consts.go
     8  //go:generate go tool golang.org/x/tools/cmd/stringer -type ESTLType consts.go
     9  
    10  // Enum is the set of ROOT streamer enums
    11  type Enum int32
    12  
    13  // constants for the streamers
    14  const (
    15  	Base       Enum = 0 // Base class
    16  	Char       Enum = 1
    17  	Short      Enum = 2
    18  	Int        Enum = 3
    19  	Long       Enum = 4
    20  	Float      Enum = 5
    21  	Counter    Enum = 6 // Counter for array size
    22  	CharStar   Enum = 7 // Pointer to array of char
    23  	Double     Enum = 8
    24  	Double32   Enum = 9
    25  	LegacyChar Enum = 10 // Equal to TDataType's kchar
    26  	UChar      Enum = 11
    27  	UShort     Enum = 12
    28  	UInt       Enum = 13
    29  	ULong      Enum = 14
    30  	Bits       Enum = 15
    31  	Long64     Enum = 16
    32  	ULong64    Enum = 17
    33  	Bool       Enum = 18
    34  	Float16    Enum = 19
    35  	OffsetL    Enum = 20 // Fixed size array
    36  	OffsetP    Enum = 40 // Pointer to object
    37  	Object     Enum = 61 // Class  derived from TObject, or for TStreamerSTL::fCtype non-pointer elements
    38  	Any        Enum = 62 // Class  not derived from TObject
    39  	Objectp    Enum = 63 // Class* derived from TObject and with    comment field //->Class, or for TStreamerSTL::fCtype: pointer elements
    40  	ObjectP    Enum = 64 // Class* derived from TObject and with NO comment field //->Class
    41  	TString    Enum = 65 // TString, special case
    42  	TObject    Enum = 66 // TObject, special case
    43  	TNamed     Enum = 67 // TNamed,  special case
    44  	Anyp       Enum = 68 // Class* not derived from TObject with    comment field //->Class
    45  	AnyP       Enum = 69 // Class* not derived from TObject with NO comment field //->Class
    46  	AnyPnoVT   Enum = 70 // Class* not derived from TObject with NO comment field //->Class and Class has NO virtual table
    47  	STLp       Enum = 71 // Pointer to STL container
    48  
    49  	Skip  Enum = 100
    50  	SkipL Enum = 120
    51  	SkipP Enum = 140
    52  
    53  	Conv  Enum = 200
    54  	ConvL Enum = 220
    55  	ConvP Enum = 240
    56  
    57  	STL       Enum = 300
    58  	STLstring Enum = 365
    59  
    60  	Streamer   Enum = 500
    61  	StreamLoop Enum = 501
    62  
    63  	Cache       Enum = 600 /// Cache the value in memory than is not part of the object but is accessible via a SchemaRule
    64  	Artificial  Enum = 1000
    65  	CacheNew    Enum = 1001
    66  	CacheDelete Enum = 1002
    67  
    68  	NeedObjectForVirtualBaseClass Enum = 99997
    69  	Missing                       Enum = 99999
    70  )
    71  
    72  // aliases for Go
    73  const (
    74  	Int8    Enum = Char
    75  	Int16   Enum = Short
    76  	Int32   Enum = Int
    77  	Int64   Enum = Long
    78  	Uint8   Enum = UChar
    79  	Uint16  Enum = UShort
    80  	Uint32  Enum = UInt
    81  	Uint64  Enum = ULong
    82  	Float32 Enum = Float
    83  	Float64 Enum = Double
    84  )
    85  
    86  type ESTLType int32
    87  
    88  // constants from core/foundation/inc/ESTLType.h
    89  const (
    90  	NotSTL      ESTLType = 0
    91  	STLvector   ESTLType = 1
    92  	STLlist     ESTLType = 2
    93  	STLdeque    ESTLType = 3
    94  	STLmap      ESTLType = 4
    95  	STLmultimap ESTLType = 5
    96  	STLset      ESTLType = 6
    97  	STLmultiset ESTLType = 7
    98  	STLbitset   ESTLType = 8
    99  	// Here the c++11 containers start. Order counts. For example,
   100  	// tstreamerelements in written rootfiles carry a value and we cannot
   101  	// introduce shifts.
   102  	STLforwardlist       ESTLType = 9
   103  	STLunorderedset      ESTLType = 10
   104  	STLunorderedmultiset ESTLType = 11
   105  	STLunorderedmap      ESTLType = 12
   106  	STLunorderedmultimap ESTLType = 13
   107  	STLend               ESTLType = 14
   108  	STLany               ESTLType = 300                 /* TVirtualStreamerInfo::kSTL */
   109  	STLstdstring                  = ESTLType(STLstring) /* TVirtualStreamerInfo::kSTLstring */
   110  )