27 namespace Experimental {
32 class TFileStorageInterface;
33 class TFileSharedPtrCtor;
46 std::unique_ptr<Internal::TFileStorageInterface>
fStorage;
48 TFile(std::unique_ptr<Internal::TFileStorageInterface>&& storage);
55 friend Internal::TFileSharedPtrCtor;
65 bool fAsynchronousOpen =
false;
68 int fAsyncTimeout = 0;
73 bool fCachedRead =
false;
117 static std::string GetCacheDir();
145 return std::make_unique<T>(*Get<T>(
name));
164 WriteMemoryWithType(name, dep.GetPointer().get(), dep.GetType());
198 TFile* operator ->() {
return fFile.get(); }
202 const TFile* operator ->()
const {
return fFile.get(); }
205 operator bool()
const {
return fFile.get(); }
Options_t()
Default constructor needed for member inits.
void Write(std::string_view name, std::shared_ptr< T > &&obj)
Hand over lifetime management of an object to this TFileImplBase, and write it.
std::unique_ptr< Internal::TFileStorageInterface > fStorage
Storage backend.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Options for TFile construction.
std::unique_ptr< T > Read(std::string_view name)
Read the object for a key.
void Write(std::string_view name, const T *obj)
Write an object that is not lifetime managed by this TFileImplBase.
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
std::string fCacheDir
Where to cache the file. If empty, defaults to TFilePtr::GetCacheDir().
The ROOT global object gROOT contains a list of all defined classes.
std::shared_ptr< TFile > fFile
_LIBCPP_INLINE_VISIBILITY basic_string< _CharT, _Traits, _Allocator > to_string(const _Allocator &__a=_Allocator()) const
Points to an object that stores or reads objects in ROOT's binary format.
void Write(std::string_view name, const T &obj)
Write an object that is not lifetime managed by this TFileImplBase.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
UInt_t Find(std::list< std::pair< const Node< T > *, Float_t > > &nlist, const Node< T > *node, const T &event, UInt_t nfind)
Key/value store of objects.
void Write(std::string_view name)
Write an object that is already lifetime managed by this TFileImplBase.