@@ -32,13 +32,14 @@ class TVirtualStreamerInfo;
32
32
33
33
namespace ROOT {
34
34
35
+ class RNTupleWriteOptions ;
36
+
35
37
namespace Internal {
38
+
36
39
class RRawFile ;
37
- }
38
40
39
- class RNTupleWriteOptions ;
41
+ TDirectory * GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer) ;
40
42
41
- namespace Internal {
42
43
// / Holds status information of an open ROOT file during writing
43
44
struct RTFileControlBlock ;
44
45
@@ -68,9 +69,6 @@ private:
68
69
// / Used when the file turns out to be a TFile container. The ntuplePath variable is either the ntuple name
69
70
// / or an ntuple name preceded by a directory (`myNtuple` or `foo/bar/myNtuple` or `/foo/bar/myNtuple`)
70
71
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
72
75
73
// / Searches for a key with the given name and type in the key index of the directory starting at offsetDir.
76
74
// / 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:
84
82
explicit RMiniFileReader (ROOT::Internal::RRawFile *rawFile);
85
83
// / Extracts header and footer location for the RNTuple identified by ntupleName
86
84
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);
87
88
// / Reads a given byte range from the file into the provided memory buffer.
88
89
// / If `nbytes > fMaxKeySize` it will perform chunked read from multiple blobs,
89
90
// / 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.
109
110
*/
110
111
// clang-format on
111
112
class RNTupleFileWriter {
113
+ friend TDirectory *ROOT::Internal::GetUnderlyingDirectory (ROOT::Internal::RNTupleFileWriter &writer);
114
+
112
115
public:
113
116
// / The key length of a blob. It is always a big key (version > 1000) with class name RBlob.
114
117
static constexpr std::size_t kBlobKeyLen = 42 ;
@@ -254,7 +257,7 @@ public:
254
257
void WriteIntoReservedBlob (const void *buffer, size_t nbytes, std::int64_t offset);
255
258
// / Ensures that the streamer info records passed as argument are written to the file
256
259
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.
258
261
void Commit (int compression = RCompressionSetting::EDefaults::kUseGeneralPurpose );
259
262
};
260
263
0 commit comments