23#include <system_error>
24#include <unordered_map>
33 {
"Double_t",
"double"},
34 {
"string",
"std::string"},
36 {
"byte",
"std::byte"},
38 {
"int8_t",
"std::int8_t"},
39 {
"UChar_t",
"unsigned char"},
40 {
"uint8_t",
"std::uint8_t"},
43 {
"int16_t",
"std::int16_t"},
44 {
"UShort_t",
"unsigned short"},
45 {
"uint16_t",
"std::uint16_t"},
48 {
"int32_t",
"std::int32_t"},
49 {
"UInt_t",
"unsigned int"},
50 {
"unsigned",
"unsigned int"},
51 {
"uint32_t",
"std::uint32_t"},
56 {
"ULong_t",
"unsigned long"},
58 {
"Long64_t",
"long long"},
59 {
"int64_t",
"std::int64_t"},
60 {
"ULong64_t",
"unsigned long long"},
61 {
"uint64_t",
"std::uint64_t"}};
69 if (std::isdigit(arg[0]) || arg[0] ==
'-') {
76 if (arg.substr(0, 6) ==
"const " || (arg.length() > 14 && arg.substr(9, 6) ==
"const "))
78 if (arg.substr(0, 9) ==
"volatile " || (arg.length() > 14 && arg.substr(6, 9) ==
"volatile "))
85 auto idxOpen = typeName.find_first_of(
"<");
86 if (
idxOpen == std::string::npos)
87 return {typeName,
""};
112 if (
angle != std::string::npos) {
118 if (next != end && *next ==
'>') {
149 }
else if (
canonicalType.substr(0, 14) ==
"unordered_map<") {
151 }
else if (
canonicalType.substr(0, 19) ==
"unordered_multimap<") {
153 }
else if (
canonicalType.substr(0, 19) ==
"unordered_multiset<") {
155 }
else if (
canonicalType.substr(0, 14) ==
"unordered_set<") {
262 return std::to_string(val);
267 if (val > std::numeric_limits<std::int64_t>::max())
268 return std::to_string(val) +
"u";
269 return std::to_string(val);
326 if (!
am || !
am->HasKey(
"rntuple.streamerMode"))
327 return ERNTupleSerializationMode::kUnset;
329 std::string
value =
am->GetPropertyAsString(
"rntuple.streamerMode");
331 if (
value ==
"TRUE") {
332 return ERNTupleSerializationMode::kForceStreamerMode;
333 }
else if (
value ==
"FALSE") {
334 return ERNTupleSerializationMode::kForceNativeMode;
337 <<
am->GetPropertyAsString(
"rntuple.streamerMode");
338 return ERNTupleSerializationMode::kUnset;
342std::tuple<std::string, std::vector<std::size_t>>
345 std::vector<std::size_t>
sizeVec;
348 std::string prefix{typeName};
349 while (prefix.back() ==
']') {
352 if (
posLBrace == std::string_view::npos) {
364 return std::make_tuple(prefix,
sizeVec);
369 std::vector<std::string>
result;
#define R__FAIL(msg)
Short-hand to return an RResult<T> in an error state; the RError is implicitly converted into RResult...
#define R__LOG_WARNING(...)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
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 result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint angle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
static std::string TypeName()
Base class for all ROOT issued exceptions.
const_iterator begin() const
const_iterator end() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
TDictAttributeMap * GetAttributeMap() const
std::vector< std::string > TokenizeTypeList(std::string_view templateType)
Used in RFieldBase::Create() in order to get the comma-separated list of template types E....
std::string GetCanonicalTypePrefix(const std::string &typeName)
Applies RNTuple specific type name normalization rules (see specs) that help the string parsing in RF...
ERNTupleSerializationMode
Possible settings for the "rntuple.streamerMode" class attribute in the dictionary.
std::string GetNormalizedInteger(const std::string &intTemplateArg)
Appends 'll' or 'ull' to the where necessary and strips the suffix if not needed.
std::tuple< std::string, std::vector< std::size_t > > ParseArrayType(const std::string &typeName)
Parse a type name of the form T[n][m]... and return the base type T and a vector that contains,...
ERNTupleSerializationMode GetRNTupleSerializationMode(TClass *cl)
std::string GetRenormalizedTypeName(const std::string &metaNormalizedName)
Given a type name normalized by ROOT meta, renormalize it for RNTuple. E.g., insert std::prefix.
std::string GetNormalizedUnresolvedTypeName(const std::string &origName)
Applies all RNTuple type normalization rules except typedef resolution.
unsigned long long ParseUIntTypeToken(const std::string &uintToken)
long long ParseIntTypeToken(const std::string &intToken)
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
std::string CleanType(const char *typeDesc, int mode=0, const char **tail=nullptr)
Cleanup type description, redundant blanks removed and redundant tail ignored return *tail = pointer ...