@@ -32,13 +32,16 @@ class TVirtualStreamerInfo;
3232
3333namespace ROOT {
3434
35+ class RNTupleWriteOptions ;
36+
3537namespace Internal {
38+
39+ class RNTupleFileWriter ;
40+ class RPageSource ;
3641class RRawFile ;
37- }
3842
39- class RNTupleWriteOptions ;
43+ TDirectory * GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer) ;
4044
41- namespace Internal {
4245// / Holds status information of an open ROOT file during writing
4346struct RTFileControlBlock ;
4447
@@ -53,6 +56,8 @@ RNTuple data keys.
5356*/
5457// clang-format on
5558class RMiniFileReader {
59+ friend ROOT::Internal::RPageSource;
60+
5661private:
5762 // / The raw file used to read byte ranges
5863 ROOT::Internal::RRawFile *fRawFile = nullptr ;
@@ -68,9 +73,6 @@ private:
6873 // / Used when the file turns out to be a TFile container. The ntuplePath variable is either the ntuple name
6974 // / or an ntuple name preceded by a directory (`myNtuple` or `foo/bar/myNtuple` or `/foo/bar/myNtuple`)
7075 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);
7476
7577 // / Searches for a key with the given name and type in the key index of the directory starting at offsetDir.
7678 // / The offset points to the start of the TDirectory DATA section, without the key and without the name and title
@@ -84,6 +86,9 @@ public:
8486 explicit RMiniFileReader (ROOT::Internal::RRawFile *rawFile);
8587 // / Extracts header and footer location for the RNTuple identified by ntupleName
8688 RResult<RNTuple> GetNTuple (std::string_view ntupleName);
89+ // / Loads an RNTuple anchor from a TFile at the given file offset (unzipping it if necessary).
90+ RResult<RNTuple>
91+ GetNTupleProperAtOffset (std::uint64_t payloadOffset, std::uint64_t compSize, std::uint64_t uncompLen);
8792 // / Reads a given byte range from the file into the provided memory buffer.
8893 // / If `nbytes > fMaxKeySize` it will perform chunked read from multiple blobs,
8994 // / whose addresses are listed at the end of the first chunk.
@@ -109,6 +114,8 @@ A stand-alone version of RNTuple can remove the TFile based writer.
109114*/
110115// clang-format on
111116class RNTupleFileWriter {
117+ friend TDirectory *ROOT::Internal::GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer);
118+
112119public:
113120 // / The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
114121 static constexpr std::size_t kBlobKeyLen = 42 ;
@@ -254,7 +261,7 @@ public:
254261 void WriteIntoReservedBlob (const void *buffer, size_t nbytes, std::int64_t offset);
255262 // / Ensures that the streamer info records passed as argument are written to the file
256263 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
264+ // / Writes the RNTuple key to the file so that the header and footer keys can be found.
258265 void Commit (int compression = RCompressionSetting::EDefaults::kUseGeneralPurpose );
259266};
260267
0 commit comments