96 TMemFile(
const char *
name, std::unique_ptr<TBufferFile> buffer);
void tobuf(char *&buf, Bool_t x)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDefOverride(name, id)
Buffer base class used for serializing objects.
A ROOT file is structured in Directories (like a file system).
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
A TMemFile is like a normal TFile except that it reads and writes only from memory.
TMemFile & operator=(const TMemFile &)=delete
Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode) override
Open a file in 'MemFile'.
ExternalDataPtr_t fExternalData
shared file data / content
bool NeedsExistingFile(EMode mode) const
Long64_t fDefaultBlockSize
Bool_t fIsOwnedByROOT
if this is a C-style memory region
Long64_t GetSize() const override
Return the current size of the memory file.
Long64_t fBlockOffset
Seek offset within the block.
Int_t SysWrite(Int_t fd, const void *buf, Int_t len) override
Write a buffer into the file.
EMode ParseOption(Option_t *option)
Parse option strings and set fOption.
TMemBlock * fBlockSeek
Pointer to the block we seeked to.
static constexpr Long64_t fgDefaultBlockSize
Long64_t fSize
Total file size (sum of the size of the chunks)
TMemBlock fBlockList
Collection of memory blocks of size fgDefaultBlockSize.
Long64_t MemRead(Int_t fd, void *buf, Long64_t len) const
void Print(Option_t *option="") const override
Print all objects in the file.
Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime) override
Perform a stat on the file; see TFile::SysStat().
std::shared_ptr< const std::vector< char > > ExternalDataPtr_t
Long64_t fSysOffset
Seek offset in file.
Bool_t IsExternalData() const
bool NeedsToWrite(EMode mode) const
Int_t SysRead(Int_t fd, void *buf, Int_t len) override
Read specified number of bytes from current offset into the buffer.
Int_t SysClose(Int_t fd) override
Close the mem file.
Int_t SysWriteImpl(Int_t fd, const void *buf, Long64_t len)
Write a buffer into the file.
void ResetObjects(TDirectoryFile *, TFileMergeInfo *) const
Wipe all the data from the permanent buffer but keep, the in-memory object alive.
void ResetErrno() const override
Simply calls TSystem::ResetErrno().
virtual ~TMemFile()
Close and clean-up file.
Int_t SysReadImpl(Int_t fd, void *buf, Long64_t len)
Read specified number of bytes from current offset into the buffer.
virtual Long64_t CopyTo(void *to, Long64_t maxsize) const
Copy the binary representation of the TMemFile into the memory area starting at 'to' and of length at...
Int_t SysSync(Int_t fd) override
Sync remaining data to disk.
void ResetAfterMerge(TFileMergeInfo *) override
Wipe all the data from the permanent buffer but keep, the in-memory object alive.
Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence) override
Seek to a specified position in the file.
@ kUseCompiledDefault
Use the compile-time default setting.
~TMemBlock()
Usual destructors. Delete the block memory.
void CreateNext(Long64_t size)
TMemBlock & operator=(const TMemBlock &)=delete
TMemBlock(const TMemBlock &)=delete
A read-only memory range which we do not control.
ZeroCopyView_t(const char *start, const size_t size)