@@ -32,13 +32,15 @@ class TVirtualStreamerInfo;
32
32
33
33
namespace ROOT {
34
34
35
+ class RNTupleWriteOptions ;
36
+
35
37
namespace Internal {
38
+
39
+ class RPageSource ;
36
40
class RRawFile ;
37
- }
38
41
39
- class RNTupleWriteOptions ;
42
+ TDirectory * GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer) ;
40
43
41
- namespace Internal {
42
44
// / Holds status information of an open ROOT file during writing
43
45
struct RTFileControlBlock ;
44
46
@@ -53,6 +55,8 @@ RNTuple data keys.
53
55
*/
54
56
// clang-format on
55
57
class RMiniFileReader {
58
+ friend ROOT::Internal::RPageSource;
59
+
56
60
private:
57
61
// / The raw file used to read byte ranges
58
62
ROOT::Internal::RRawFile *fRawFile = nullptr ;
@@ -68,9 +72,6 @@ private:
68
72
// / Used when the file turns out to be a TFile container. The ntuplePath variable is either the ntuple name
69
73
// / or an ntuple name preceded by a directory (`myNtuple` or `foo/bar/myNtuple` or `/foo/bar/myNtuple`)
70
74
RResult<RNTuple> GetNTupleProper (std::string_view ntuplePath);
71
- // / Loads an RNTuple anchor from a TFile at the given file offset (unzipping it if necessary).
72
- RResult<RNTuple>
73
- GetNTupleProperAtOffset (std::uint64_t payloadOffset, std::uint64_t compSize, std::uint64_t uncompLen);
74
75
75
76
// / Searches for a key with the given name and type in the key index of the directory starting at offsetDir.
76
77
// / The offset points to the start of the TDirectory DATA section, without the key and without the name and title
@@ -84,6 +85,9 @@ public:
84
85
explicit RMiniFileReader (ROOT::Internal::RRawFile *rawFile);
85
86
// / Extracts header and footer location for the RNTuple identified by ntupleName
86
87
RResult<RNTuple> GetNTuple (std::string_view ntupleName);
88
+ // / Loads an RNTuple anchor from a TFile at the given file offset (unzipping it if necessary).
89
+ RResult<RNTuple>
90
+ GetNTupleProperAtOffset (std::uint64_t payloadOffset, std::uint64_t compSize, std::uint64_t uncompLen);
87
91
// / Reads a given byte range from the file into the provided memory buffer.
88
92
// / If `nbytes > fMaxKeySize` it will perform chunked read from multiple blobs,
89
93
// / whose addresses are listed at the end of the first chunk.
@@ -109,6 +113,8 @@ A stand-alone version of RNTuple can remove the TFile based writer.
109
113
*/
110
114
// clang-format on
111
115
class RNTupleFileWriter {
116
+ friend TDirectory *ROOT::Internal::GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer);
117
+
112
118
public:
113
119
// / The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
114
120
static constexpr std::size_t kBlobKeyLen = 42 ;
@@ -254,7 +260,7 @@ public:
254
260
void WriteIntoReservedBlob (const void *buffer, size_t nbytes, std::int64_t offset);
255
261
// / Ensures that the streamer info records passed as argument are written to the file
256
262
void UpdateStreamerInfos (const ROOT::Internal::RNTupleSerializer::StreamerInfoMap_t &streamerInfos);
257
- // / Writes the RNTuple key to the file so that the header and footer keys can be found
263
+ // / Writes the RNTuple key to the file so that the header and footer keys can be found.
258
264
void Commit (int compression = RCompressionSetting::EDefaults::kUseGeneralPurpose );
259
265
};
260
266
0 commit comments