21#include <system_error>
22#include <unordered_map>
31 {
"Double_t",
"double"},
32 {
"string",
"std::string"},
34 {
"byte",
"std::byte"},
36 {
"int8_t",
"std::int8_t"},
37 {
"UChar_t",
"unsigned char"},
38 {
"uint8_t",
"std::uint8_t"},
41 {
"int16_t",
"std::int16_t"},
42 {
"UShort_t",
"unsigned short"},
43 {
"uint16_t",
"std::uint16_t"},
46 {
"int32_t",
"std::int32_t"},
47 {
"UInt_t",
"unsigned int"},
48 {
"unsigned",
"unsigned int"},
49 {
"uint32_t",
"std::uint32_t"},
54 {
"ULong_t",
"unsigned long"},
56 {
"Long64_t",
"long long"},
57 {
"int64_t",
"std::int64_t"},
58 {
"ULong64_t",
"unsigned long long"},
59 {
"uint64_t",
"std::uint64_t"}};
67 if (std::isdigit(arg[0]) || arg[0] ==
'-') {
74 if (arg.substr(0, 6) ==
"const " || (arg.length() > 14 && arg.substr(9, 6) ==
"const "))
76 if (arg.substr(0, 9) ==
"volatile " || (arg.length() > 14 && arg.substr(6, 9) ==
"volatile "))
81using AnglePos = std::pair<std::string::size_type, std::string::size_type>;
84 std::vector<AnglePos>
result;
88 if (
posOpen == std::string::npos) {
99 }
else if (
c ==
'>') {
112 if (
posClose < typeName.size() - 1) {
137 if (
angle != std::string::npos) {
143 if (next != end && *next ==
'>') {
174 }
else if (
canonicalType.substr(0, 14) ==
"unordered_map<") {
176 }
else if (
canonicalType.substr(0, 19) ==
"unordered_multimap<") {
178 }
else if (
canonicalType.substr(0, 19) ==
"unordered_multiset<") {
180 }
else if (
canonicalType.substr(0, 14) ==
"unordered_set<") {
335 return std::to_string(val);
340 if (val > std::numeric_limits<std::int64_t>::max())
341 return std::to_string(val) +
"u";
342 return std::to_string(val);
398 if (!
am || !
am->HasKey(
"rntuple.streamerMode"))
399 return ERNTupleSerializationMode::kUnset;
401 std::string
value =
am->GetPropertyAsString(
"rntuple.streamerMode");
403 if (
value ==
"TRUE") {
404 return ERNTupleSerializationMode::kForceStreamerMode;
405 }
else if (
value ==
"FALSE") {
406 return ERNTupleSerializationMode::kForceNativeMode;
409 <<
am->GetPropertyAsString(
"rntuple.streamerMode");
410 return ERNTupleSerializationMode::kUnset;
416 std::vector<std::size_t>
sizeVec;
419 std::string prefix{typeName};
420 while (prefix.back() ==
']') {
423 if (
posLBrace == std::string_view::npos) {
435 return std::make_tuple(prefix,
sizeVec);
440 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
Base class for all ROOT issued exceptions.
Classes with dictionaries that can be inspected by TClass.
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
ERNTupleSerializationMode
Possible settings for the "rntuple.streamerMode" class attribute in the dictionary.
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,...
ROOT::RLogChannel & NTupleLog()
Log channel for RNTuple diagnostics.
unsigned long long ParseUIntTypeToken(const std::string &uintToken)
std::string GetNormalizedInteger(const std::string &intTemplateArg)
Appends 'll' or 'ull' to the where necessary and strips the suffix if not needed.
ERNTupleSerializationMode GetRNTupleSerializationMode(TClass *cl)
std::string GetCanonicalTypePrefix(const std::string &typeName)
Applies RNTuple specific type name normalization rules (see specs) that help the string parsing in RF...
std::string GetNormalizedUnresolvedTypeName(const std::string &origName)
Applies all RNTuple type normalization rules except typedef resolution.
std::string GetRenormalizedDemangledTypeName(const std::type_info &ti)
Given a type info ask ROOT meta to demangle it, then renormalize the resulting type name for RNTuple.
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::vector< std::string > TokenizeTypeList(std::string_view templateType)
Used in RFieldBase::Create() in order to get the comma-separated list of template types E....
long long ParseIntTypeToken(const std::string &intToken)
std::string GetDemangledTypeName(const std::type_info &t)
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 ...