21namespace Experimental {
107 explicit RFile(std::unique_ptr<TFile> file);
114 void PutUntyped(std::string_view path,
const std::type_info &
type,
const void *obj, std::uint32_t flags);
117 template <
typename T>
118 void PutInternal(std::string_view path,
const T &obj, std::uint32_t flags)
136 static std::unique_ptr<RFile>
Open(std::string_view path);
141 static std::unique_ptr<RFile>
Recreate(std::string_view path);
146 static std::unique_ptr<RFile>
Update(std::string_view path);
157 template <
typename T>
158 std::unique_ptr<T>
Get(std::string_view path)
const
161 return std::unique_ptr<T>(
static_cast<T *
>(obj));
171 template <
typename T>
172 void Put(std::string_view path,
const T &obj)
185 template <
typename T>
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
An interface to read from, or write to, a ROOT file, as well as performing other common operations.
void Close()
Flushes the RFile if needed and closes it, disallowing any further reading or writing.
static constexpr int kMaxPathNesting
static std::unique_ptr< RFile > Recreate(std::string_view path)
Opens the file for reading/writing, overwriting it if it already exists.
std::unique_ptr< TFile > fFile
size_t Flush()
Writes all objects and the file structure to disk.
static std::unique_ptr< RFile > Update(std::string_view path)
Opens the file for updating, creating a new one if it doesn't exist.
void PutInternal(std::string_view path, const T &obj, std::uint32_t flags)
TKey * GetTKey(std::string_view path) const
Given path, returns the TKey corresponding to the object at that path (assuming the path is fully spl...
static std::unique_ptr< RFile > Open(std::string_view path)
Opens the file for reading.
std::unique_ptr< T > Get(std::string_view path) const
Retrieves an object from the file.
void Overwrite(std::string_view path, const T &obj, bool backupPrevious=true)
Puts an object into the file, overwriting any previously-existing object at that path.
void PutUntyped(std::string_view path, const std::type_info &type, const void *obj, std::uint32_t flags)
Writes obj to file, without taking its ownership.
void Put(std::string_view path, const T &obj)
Puts an object into the file.
RFile(std::unique_ptr< TFile > file)
void * GetUntyped(std::string_view path, const std::type_info &type) const
Gets object path from the file and returns an owning pointer to it.
A log configuration for a channel, e.g.
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Book space in a file, create I/O buffers, to fill them, (un)compress them.
ROOT::RLogChannel & RFileLog()