@@ -32,13 +32,14 @@ class TVirtualStreamerInfo;
3232
3333namespace ROOT {
3434
35+ class RNTupleWriteOptions ;
36+
3537namespace Internal {
38+
3639class RRawFile ;
37- }
3840
39- class RNTupleWriteOptions ;
41+ TDirectory * GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer) ;
4042
41- namespace Internal {
4243// / Holds status information of an open ROOT file during writing
4344struct RTFileControlBlock ;
4445
@@ -68,9 +69,6 @@ private:
6869 // / Used when the file turns out to be a TFile container. The ntuplePath variable is either the ntuple name
6970 // / or an ntuple name preceded by a directory (`myNtuple` or `foo/bar/myNtuple` or `/foo/bar/myNtuple`)
7071 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);
7472
7573 // / Searches for a key with the given name and type in the key index of the directory starting at offsetDir.
7674 // / The offset points to the start of the TDirectory DATA section, without the key and without the name and title
@@ -84,6 +82,9 @@ public:
8482 explicit RMiniFileReader (ROOT::Internal::RRawFile *rawFile);
8583 // / Extracts header and footer location for the RNTuple identified by ntupleName
8684 RResult<RNTuple> GetNTuple (std::string_view ntupleName);
85+ // / Loads an RNTuple anchor from a TFile at the given file offset (unzipping it if necessary).
86+ RResult<RNTuple>
87+ GetNTupleProperAtOffset (std::uint64_t payloadOffset, std::uint64_t compSize, std::uint64_t uncompLen);
8788 // / Reads a given byte range from the file into the provided memory buffer.
8889 // / If `nbytes > fMaxKeySize` it will perform chunked read from multiple blobs,
8990 // / whose addresses are listed at the end of the first chunk.
@@ -109,6 +110,8 @@ A stand-alone version of RNTuple can remove the TFile based writer.
109110*/
110111// clang-format on
111112class RNTupleFileWriter {
113+ friend TDirectory *ROOT::Internal::GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer);
114+
112115public:
113116 // / The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
114117 static constexpr std::size_t kBlobKeyLen = 42 ;
@@ -254,7 +257,7 @@ public:
254257 void WriteIntoReservedBlob (const void *buffer, size_t nbytes, std::int64_t offset);
255258 // / Ensures that the streamer info records passed as argument are written to the file
256259 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
260+ // / Writes the RNTuple key to the file so that the header and footer keys can be found.
258261 void Commit (int compression = RCompressionSetting::EDefaults::kUseGeneralPurpose );
259262};
260263
0 commit comments