33 std::vector<ROOT::TCoopPtr<ROOT::Internal::TFileImplBase>> fFiles;
36 for (
auto& pFile: fFiles)
41 static CloseFiles_t closer;
43 std::lock_guard<std::mutex> lock(closer.fMutex);
44 closer.fFiles.emplace_back(pFile);
54 TFileSystemFile(
const std::string&
name,
const char* mode):
55 fOldFile(::
TFile::Open(name.c_str(), mode)) {
58 void Flush() final { fOldFile->
Flush(); }
60 void Close() final { fOldFile->
Close(); }
71 AddFilesToClose(impl);
77 return TFilePtr(MakeCoop<TFileSystemFile>(name.to_string(),
"READ"));
81 return TFilePtr(MakeCoop<TFileSystemFile>(name.to_string(),
"CREATE"));
85 return TFilePtr(MakeCoop<TFileSystemFile>(name.to_string(),
"RECREATE"));
89 return TFilePtr(MakeCoop<TFileSystemFile>(name.to_string(),
"UPDATE"));
virtual void Flush()
Synchronize a file's in-memory and on-disk states.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
TFilePtr(TCoopPtr< Internal::TFileImplBase >)
Constructed by.
Base class for storage-specific ROOT file implementations.
static TFilePtr Create(std::string_view name)
Open a file with name for reading and writing.
Key/value store of objects.
static TFilePtr OpenForRead(std::string_view name)
Open a file with name for reading.
Points to an object that stores or reads objects in ROOT's binary format.
static TDirectory & Heap()
Dedicated, process-wide TDirectory.
static TFilePtr OpenForUpdate(std::string_view name)
Open an existing file with name for reading and writing.
static TFilePtr Recreate(std::string_view name)
Open a file with name for reading and writing.
virtual void Close(Option_t *option="")
Close a file.
Several pointers point to the same object, any of them can delete the object, setting all of them to ...