5#ifndef ROOT_RFieldUtils
6#define ROOT_RFieldUtils
46 bool isArgInTemplatedUserClass =
false );
76std::vector<std::string>
TokenizeTypeList(std::string_view templateType, std::size_t maxArgs = 0);
81bool IsMatchingFieldType(std::string_view actualTypeName, std::string_view expectedTypeName,
const std::type_info &ti);
90inline std::tuple<unsigned char **, std::int32_t *, std::int32_t *>
GetRVecDataMembers(
void *rvecPtr)
92 unsigned char **beginPtr =
reinterpret_cast<unsigned char **
>(rvecPtr);
94 std::int32_t *
size =
reinterpret_cast<std::int32_t *
>(beginPtr + 1);
97 std::int32_t *capacity =
size + 1;
98 assert(*capacity >= -1);
99 return {beginPtr,
size, capacity};
102inline std::tuple<const unsigned char *const *, const std::int32_t *, const std::int32_t *>
108std::size_t
EvalRVecValueSize(std::size_t alignOfT, std::size_t sizeOfT, std::size_t alignOfRVecT);
110void DestroyRVecWithChecks(std::size_t alignOfT,
unsigned char **beginPtr, std::int32_t *capacityPtr);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
A field translates read and write calls from/to underlying columns to/from tree values.
The on-storage metadata of an RNTuple.
TClass instances represent classes, structs and namespaces in the ROOT type system.
ERNTupleSerializationMode
Possible settings for the "rntuple.streamerMode" class attribute in the dictionary.
std::vector< std::string > TokenizeTypeList(std::string_view templateType, std::size_t maxArgs=0)
Used in RFieldBase::Create() in order to get the comma-separated list of template types E....
std::tuple< unsigned char **, std::int32_t *, std::int32_t * > GetRVecDataMembers(void *rvecPtr)
Retrieve the addresses of the data members of a generic RVec from a pointer to the beginning of the R...
unsigned long long ParseUIntTypeToken(const std::string &uintToken)
void DestroyRVecWithChecks(std::size_t alignOfT, unsigned char **beginPtr, std::int32_t *capacityPtr)
std::string GetRNTupleSoARecord(const TClass *cl)
Checks if the "rntuple.SoARecord" class attribute is set 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.
bool NeedsMetaNameAsAlias(const std::string &metaNormalizedName, std::string &renormalizedAlias, bool isArgInTemplatedUserClass=false)
Checks if the meta normalized name is different from the RNTuple normalized name in a way that would ...
std::string GetTypeTraceReport(const RFieldBase &field, const RNTupleDescriptor &desc)
Prints the hierarchy of types with their field names and field IDs for the given in-memory field and ...
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.
ERNTupleSerializationMode GetRNTupleSerializationMode(const TClass *cl)
bool IsMatchingFieldType(const std::string &actualTypeName)
Helper to check if a given type name is the one expected of Field<T>.
std::size_t EvalRVecAlignment(std::size_t alignOfSubfield)
std::string GetRenormalizedTypeName(const std::string &metaNormalizedName)
Given a type name normalized by ROOT meta, renormalize it for RNTuple. E.g., insert std::prefix.
long long ParseIntTypeToken(const std::string &intToken)
std::size_t EvalRVecValueSize(std::size_t alignOfT, std::size_t sizeOfT, std::size_t alignOfRVecT)