@@ -32,13 +32,15 @@ class TVirtualStreamerInfo;
3232
3333namespace ROOT {
3434
35+ class RNTupleWriteOptions ;
36+
3537namespace Internal {
38+
39+ class RPageSource ;
3640class RRawFile ;
37- }
3841
39- class RNTupleWriteOptions ;
42+ TDirectory * GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer) ;
4043
41- namespace Internal {
4244// / Holds status information of an open ROOT file during writing
4345struct RTFileControlBlock ;
4446
@@ -53,6 +55,8 @@ RNTuple data keys.
5355*/
5456// clang-format on
5557class RMiniFileReader {
58+ friend ROOT::Internal::RPageSource;
59+
5660private:
5761 // / The raw file used to read byte ranges
5862 ROOT::Internal::RRawFile *fRawFile = nullptr ;
@@ -68,9 +72,6 @@ private:
6872 // / Used when the file turns out to be a TFile container. The ntuplePath variable is either the ntuple name
6973 // / or an ntuple name preceded by a directory (`myNtuple` or `foo/bar/myNtuple` or `/foo/bar/myNtuple`)
7074 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);
7475
7576 // / Searches for a key with the given name and type in the key index of the directory starting at offsetDir.
7677 // / 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:
8485 explicit RMiniFileReader (ROOT::Internal::RRawFile *rawFile);
8586 // / Extracts header and footer location for the RNTuple identified by ntupleName
8687 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);
8791 // / Reads a given byte range from the file into the provided memory buffer.
8892 // / If `nbytes > fMaxKeySize` it will perform chunked read from multiple blobs,
8993 // / 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.
109113*/
110114// clang-format on
111115class RNTupleFileWriter {
116+ friend TDirectory *ROOT::Internal::GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer);
117+
112118public:
113119 // / The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
114120 static constexpr std::size_t kBlobKeyLen = 42 ;
@@ -254,7 +260,7 @@ public:
254260 void WriteIntoReservedBlob (const void *buffer, size_t nbytes, std::int64_t offset);
255261 // / Ensures that the streamer info records passed as argument are written to the file
256262 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.
258264 void Commit (int compression = RCompressionSetting::EDefaults::kUseGeneralPurpose );
259265};
260266
0 commit comments