Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RtypesCore.h File Reference
#include <ROOT/RConfig.hxx>
#include "DllImport.h"
#include <cstddef>
Include dependency graph for RtypesCore.h:
This graph shows which files directly or indirectly include this file:

Typedefs

typedef float Angle_t
 Graphics angle (float)
 
typedef double Axis_t
 Axis values type (double)
 
typedef bool Bool_t
 Boolean (0=false, 1=true) (bool)
 
typedef unsigned char Byte_t
 Byte (8 bits) (unsigned char)
 
typedef char Char_t
 Character 1 byte (char)
 
typedef short Color_t
 Color number (short)
 
typedef double Coord_t
 Pad world coordinates (double)
 
typedef double Double32_t
 Double 8 bytes in memory, written to disk as a 4 bytes Float_t (32-bits) by default, or as 3 bytes (24-bits) float if range is customized, with a truncated mantissa (24-bit by default in memory, less if range is customized), and (7+1)-bits of exponent.
 
typedef double Double_t
 Double 8 bytes.
 
typedef float Float16_t
 Float 4 bytes in memory, written to disk as 3 bytes (24-bits) by default or as a 4 bytes fixed-point-arithmetic Int_t (32-bits) if range was customized, with a truncated mantissa (12-bit by default in memory), and (7+1)-bits of exponent.
 
typedef float Float_t
 Float 4 bytes (float)
 
typedef short Font_t
 Font number (short)
 
typedef int Int_t
 Signed integer 4 bytes (int)
 
typedef long long Long64_t
 Portable signed long integer 8 bytes.
 
typedef long Long_t
 Signed long integer 4 bytes (long). Size depends on architecture.
 
typedef long double LongDouble_t
 Long Double (not portable)
 
typedef long Longptr_t
 Integer large enough to hold a pointer (platform-dependent)
 
typedef short Marker_t
 Marker number (short)
 
typedef const char Option_t
 Option string (const char)
 
typedef float Real_t
 TVector and TMatrix element type (float)
 
typedef short SCoord_t
 Screen coordinates (short)
 
typedef int Seek_t
 File pointer (int).
 
typedef short Short_t
 Signed Short integer 2 bytes (short)
 
typedef float Size_t
 Attribute size (float)
 
typedef int Ssiz_t
 String size (currently int)
 
typedef double Stat_t
 Statistics type (double)
 
typedef short Style_t
 Style number (short)
 
typedef char Text_t
 General string (char)
 
typedef unsigned char UChar_t
 Unsigned Character 1 byte (unsigned char)
 
typedef unsigned int UInt_t
 Unsigned integer 4 bytes (unsigned int)
 
typedef unsigned long long ULong64_t
 Portable unsigned long integer 8 bytes.
 
typedef unsigned long ULong_t
 Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
 
typedef unsigned long ULongptr_t
 Unsigned integer large enough to hold a pointer (platform-dependent)
 
typedef unsigned short UShort_t
 Unsigned Short integer 2 bytes (unsigned short)
 
typedef short Version_t
 Class version identifier (short)
 
typedef short Width_t
 Line width (short)
 

Variables

Int_t gDebug
 Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase the level of debugging-printing verbosity when running ROOT commands.
 
constexpr ULong_t kBitsPerByte = 8
 
constexpr Bool_t kFALSE = false
 
constexpr Int_t kMaxChar = kMaxUChar >> 1
 
constexpr Int_t kMaxInt = Int_t(kMaxUInt >> 1)
 
constexpr Long_t kMaxLong = Long_t(kMaxULong >> 1)
 
constexpr Long64_t kMaxLong64 = Long64_t(kMaxULong64 >> 1)
 
constexpr Int_t kMaxShort = kMaxUShort >> 1
 
constexpr Int_t kMaxUChar = UChar_t(~0)
 
constexpr UInt_t kMaxUInt = UInt_t(~0)
 
constexpr ULong_t kMaxULong = ULong_t(~0)
 
constexpr ULong64_t kMaxULong64 = ULong64_t(~0LL)
 
constexpr Int_t kMaxUShort = UShort_t(~0)
 
constexpr Int_t kMinChar = -kMaxChar - 1
 
constexpr Int_t kMinInt = -kMaxInt - 1
 
constexpr Long_t kMinLong = -kMaxLong - 1
 
constexpr Long64_t kMinLong64 = -kMaxLong64 - 1
 
constexpr Int_t kMinShort = -kMaxShort - 1
 
constexpr Ssiz_t kNPOS = ~(Ssiz_t)0
 The equivalent of std::string::npos for the ROOT class TString.
 
constexpr Bool_t kTRUE = true
 

Detailed Description

Basic types used by ROOT and required by TInterpreter.

It ensures a portable fixed data type size across systems, since in the early days, sizeof(int) could be 2 or 4 depending on the architecture.

Deprecated
For future designs, unless for very specific needs, consider using instead standard fixed-width classes from <cstdint> such as std::int16_t, std::int32_t or from <cstdfloat> for floating types.
Warning
Long_t has not the same width across platforms, so it should be avoided if portability is envisioned. Also derived classes such as TArrayL. Use instead Long64_t or TArrayL64, or std::int64_t. Likewise with ULong_t.
In some architectures, std::int64_t may have a different underlying data type (long vs int) than in others and may lead to a different StreamerInfo than in others, thus it might be convenient to use (U)Long64_t instead. Hence, full fledge embrace of the std::types is actually waiting on ROOT I/O to be extended to support them explicitly.

Definition in file RtypesCore.h.

Typedef Documentation

◆ Angle_t

Graphics angle (float)

Definition at line 102 of file RtypesCore.h.

◆ Axis_t

Axis values type (double)

Definition at line 92 of file RtypesCore.h.

◆ Bool_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Bool_t

Boolean (0=false, 1=true) (bool)

Deprecated
Consider replacing with bool.

Definition at line 77 of file RtypesCore.h.

◆ Byte_t

typedef unsigned char Byte_t

Byte (8 bits) (unsigned char)

Deprecated
Consider replacing with unsigned char or std::byte.

Definition at line 78 of file RtypesCore.h.

◆ Char_t

Character 1 byte (char)

Warning
Can be signed (most common) or unsigned depending on platform and compiler flags.
Deprecated
Consider replacing with char, signed char or std::int8_t

Definition at line 51 of file RtypesCore.h.

◆ Color_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign Color_t

Color number (short)

Definition at line 99 of file RtypesCore.h.

◆ Coord_t

Pad world coordinates (double)

Definition at line 101 of file RtypesCore.h.

◆ Double32_t

Double 8 bytes in memory, written to disk as a 4 bytes Float_t (32-bits) by default, or as 3 bytes (24-bits) float if range is customized, with a truncated mantissa (24-bit by default in memory, less if range is customized), and (7+1)-bits of exponent.

Warning
Do not confuse Double32_t on file representation with a single-precision float such as std::float32_t

Definition at line 74 of file RtypesCore.h.

◆ Double_t

Double 8 bytes.

Deprecated
Consider replacing with double.

Definition at line 73 of file RtypesCore.h.

◆ Float16_t

Float 4 bytes in memory, written to disk as 3 bytes (24-bits) by default or as a 4 bytes fixed-point-arithmetic Int_t (32-bits) if range was customized, with a truncated mantissa (12-bit by default in memory), and (7+1)-bits of exponent.

Warning
Do not confuse Float16_t on file representation with a half-float such as std::float16_t.

Definition at line 72 of file RtypesCore.h.

◆ Float_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void Float_t

Float 4 bytes (float)

Deprecated
Consider replacing with float.

Definition at line 71 of file RtypesCore.h.

◆ Font_t

typedef short Font_t

Font number (short)

Definition at line 95 of file RtypesCore.h.

◆ Int_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t Int_t

Signed integer 4 bytes (int)

Deprecated
Consider replacing with std::int32_t

Definition at line 59 of file RtypesCore.h.

◆ Long64_t

typedef long long Long64_t

Portable signed long integer 8 bytes.

Deprecated
Consider replacing with long long or std::int64_t (unless you are worried about different StreamerInfos in different platforms).

Definition at line 83 of file RtypesCore.h.

◆ Long_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Long_t

Signed long integer 4 bytes (long). Size depends on architecture.

Deprecated
Consider replacing with long

Definition at line 68 of file RtypesCore.h.

◆ LongDouble_t

Long Double (not portable)

Deprecated
Consider replacing with long double.

Definition at line 75 of file RtypesCore.h.

◆ Longptr_t

Integer large enough to hold a pointer (platform-dependent)

Definition at line 89 of file RtypesCore.h.

◆ Marker_t

Marker number (short)

Definition at line 97 of file RtypesCore.h.

◆ Option_t

Option string (const char)

Definition at line 80 of file RtypesCore.h.

◆ Real_t

typedef float Real_t

TVector and TMatrix element type (float)

Deprecated
Consider replacing with float.

Definition at line 82 of file RtypesCore.h.

◆ SCoord_t

Screen coordinates (short)

Definition at line 100 of file RtypesCore.h.

◆ Seek_t

File pointer (int).

Definition at line 67 of file RtypesCore.h.

◆ Short_t

Signed Short integer 2 bytes (short)

Deprecated
Consider replacing with short or std::int16_t

Definition at line 53 of file RtypesCore.h.

◆ Size_t

typedef float Size_t

Attribute size (float)

Definition at line 103 of file RtypesCore.h.

◆ Ssiz_t

String size (currently int)

Definition at line 81 of file RtypesCore.h.

◆ Stat_t

Statistics type (double)

Definition at line 93 of file RtypesCore.h.

◆ Style_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth Style_t

Style number (short)

Definition at line 96 of file RtypesCore.h.

◆ Text_t

General string (char)

Definition at line 76 of file RtypesCore.h.

◆ UChar_t

typedef unsigned char UChar_t

Unsigned Character 1 byte (unsigned char)

Deprecated
Consider replacing with unsigned char or std::uint8_t

Definition at line 52 of file RtypesCore.h.

◆ UInt_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height UInt_t

Unsigned integer 4 bytes (unsigned int)

Deprecated
Consider replacing with std::uint32_t

Definition at line 60 of file RtypesCore.h.

◆ ULong64_t

typedef unsigned long long ULong64_t

Portable unsigned long integer 8 bytes.

Deprecated
Consider replacing with unsigned long long or std::uint64_t (unless you are worried about different StreamerInfos in different platforms).

Definition at line 84 of file RtypesCore.h.

◆ ULong_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char ULong_t

Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.

Deprecated
Consider replacing with unsigned long

Definition at line 69 of file RtypesCore.h.

◆ ULongptr_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height ULongptr_t

Unsigned integer large enough to hold a pointer (platform-dependent)

Definition at line 90 of file RtypesCore.h.

◆ UShort_t

typedef unsigned short UShort_t

Unsigned Short integer 2 bytes (unsigned short)

Deprecated
Consider replacing with unsigned short or std::uint16_t

Definition at line 54 of file RtypesCore.h.

◆ Version_t

Class version identifier (short)

Definition at line 79 of file RtypesCore.h.

◆ Width_t

Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor Width_t

Line width (short)

Definition at line 98 of file RtypesCore.h.

Variable Documentation

◆ gDebug

Int_t gDebug
extern

Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase the level of debugging-printing verbosity when running ROOT commands.

Definition at line 627 of file TROOT.cxx.

◆ kBitsPerByte

constexpr ULong_t kBitsPerByte = 8
constexpr
Deprecated
Consider replacing with std::numeric_limits<unsigned char>::digits.

Definition at line 130 of file RtypesCore.h.

◆ kFALSE

constexpr Bool_t kFALSE = false
constexpr
Deprecated
Consider replacing with false

Definition at line 108 of file RtypesCore.h.

◆ kMaxChar

constexpr Int_t kMaxChar = kMaxUChar >> 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<char>::max() (or std::int8_t)

Definition at line 111 of file RtypesCore.h.

◆ kMaxInt

constexpr Int_t kMaxInt = Int_t(kMaxUInt >> 1)
constexpr
Deprecated
Consider replacing with std::numeric_limits<int>::max() (or std::int32_t)

Definition at line 119 of file RtypesCore.h.

◆ kMaxLong

constexpr Long_t kMaxLong = Long_t(kMaxULong >> 1)
constexpr
Deprecated
Consider replacing with std::numeric_limits<long>::max()

Definition at line 123 of file RtypesCore.h.

◆ kMaxLong64

constexpr Long64_t kMaxLong64 = Long64_t(kMaxULong64 >> 1)
constexpr
Deprecated
Consider replacing with std::numeric_limits<long long>::max() (or std::int64_t)

Definition at line 127 of file RtypesCore.h.

◆ kMaxShort

constexpr Int_t kMaxShort = kMaxUShort >> 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<short>::max() (or std::int16_t)

Definition at line 115 of file RtypesCore.h.

◆ kMaxUChar

constexpr Int_t kMaxUChar = UChar_t(~0)
constexpr
Deprecated
Consider replacing with std::numeric_limits<unsigned char>::max() (or std::uint8_t)

Definition at line 110 of file RtypesCore.h.

◆ kMaxUInt

constexpr UInt_t kMaxUInt = UInt_t(~0)
constexpr
Deprecated
Consider replacing with std::numeric_limits<unsigned int>::max() (or std::uint32_t)

Definition at line 118 of file RtypesCore.h.

◆ kMaxULong

constexpr ULong_t kMaxULong = ULong_t(~0)
constexpr
Deprecated
Consider replacing with std::numeric_limits<unsigned long>::max()

Definition at line 122 of file RtypesCore.h.

◆ kMaxULong64

constexpr ULong64_t kMaxULong64 = ULong64_t(~0LL)
constexpr
Deprecated
Consider replacing with std::numeric_limits<unsigned long long>::max() (or std::uint64_t)

Definition at line 126 of file RtypesCore.h.

◆ kMaxUShort

constexpr Int_t kMaxUShort = UShort_t(~0)
constexpr
Deprecated
Consider replacing with std::numeric_limits<unsigned short>::max() (or std::uint16_t)

Definition at line 114 of file RtypesCore.h.

◆ kMinChar

constexpr Int_t kMinChar = -kMaxChar - 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<char>::lowest() (or std::int8_t)

Definition at line 112 of file RtypesCore.h.

◆ kMinInt

constexpr Int_t kMinInt = -kMaxInt - 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<int>::lowest() (or std::int32_t)

Definition at line 120 of file RtypesCore.h.

◆ kMinLong

constexpr Long_t kMinLong = -kMaxLong - 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<long>::lowest()

Definition at line 124 of file RtypesCore.h.

◆ kMinLong64

constexpr Long64_t kMinLong64 = -kMaxLong64 - 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<long long>::lowest() (or std::int64_t)

Definition at line 128 of file RtypesCore.h.

◆ kMinShort

constexpr Int_t kMinShort = -kMaxShort - 1
constexpr
Deprecated
Consider replacing with std::numeric_limits<short>::lowest() (or std::int16_t)

Definition at line 116 of file RtypesCore.h.

◆ kNPOS

constexpr Ssiz_t kNPOS = ~(Ssiz_t)0
constexpr

The equivalent of std::string::npos for the ROOT class TString.

Note
Consider using std::string instead of TString whenever possible

Definition at line 131 of file RtypesCore.h.

◆ kTRUE

constexpr Bool_t kTRUE = true
constexpr
Deprecated
Consider replacing with true

Definition at line 107 of file RtypesCore.h.