2024-07-11 12:00:43 +00:00
|
|
|
internal
|
2024-07-12 07:53:01 +00:00
|
|
|
String8 rntuple_description(Arena *arena, const RNTuple_Anchor &anchor)
|
2024-07-11 12:00:43 +00:00
|
|
|
{
|
|
|
|
String8 desc = push_str8f(arena, "version %u.%u.%u.%u",
|
2024-07-12 07:53:01 +00:00
|
|
|
anchor.fVersionEpoch,
|
|
|
|
anchor.fVersionMajor,
|
|
|
|
anchor.fVersionMinor,
|
|
|
|
anchor.fVersionPatch);
|
2024-07-11 12:00:43 +00:00
|
|
|
return desc;
|
|
|
|
}
|
|
|
|
|
|
|
|
internal
|
2024-07-11 14:49:18 +00:00
|
|
|
RNTuple_Info get_rntuple_info(const char *fname, const char *ntpl_name)
|
2024-07-11 12:00:43 +00:00
|
|
|
{
|
2024-07-11 12:27:19 +00:00
|
|
|
RNTuple_Info info = {};
|
2024-07-11 12:00:43 +00:00
|
|
|
|
2024-07-11 14:29:44 +00:00
|
|
|
// TODO: proper error handling
|
2024-07-12 07:53:01 +00:00
|
|
|
RMicroFileReader file_reader { fname };
|
|
|
|
RNTuple_File_Info file_info = file_reader.GetNTupleProper(ntpl_name);
|
|
|
|
if (!file_info.failed) {
|
|
|
|
info.rng_header.start = file_info.anchor.fSeekHeader;
|
|
|
|
info.rng_header.len = file_info.anchor.fNBytesHeader;
|
|
|
|
info.rng_footer.start = file_info.anchor.fSeekFooter;
|
|
|
|
info.rng_footer.len = file_info.anchor.fNBytesFooter;
|
2024-07-11 14:29:44 +00:00
|
|
|
info.rng_anchor.start = file_info.anchor_seek;
|
|
|
|
info.rng_anchor.len = file_info.anchor_nbytes;
|
|
|
|
info.rng_anchor_key.start = file_info.anchor_key_seek;
|
|
|
|
info.rng_anchor_key.len = file_info.anchor_key_nbytes;
|
|
|
|
info.rblob_header_size = file_info.rblob_key_header_nbytes;
|
|
|
|
info.root_file_header_size = file_info.tfile_header_nbytes;
|
|
|
|
}
|
|
|
|
|
2024-07-11 12:00:43 +00:00
|
|
|
return info;
|
|
|
|
}
|