88 std::optional<TKeyMapNode>
fCur;
91 std::optional<TKeyMapNode>
Next();
282#if defined(__clang__) && __clang_major__ < 20
283#pragma clang diagnostic push
284#pragma clang diagnostic ignored "-Wshadow"
287#if defined(__clang__) && __clang_major__ < 20
288#pragma clang diagnostic pop
303 void Delete(
const char *namecycle=
"")
override;
352 virtual void MakeProject(
const char *dirname,
const char *classes=
"*",
429 UInt_t buffersize = 1000000);
439#define gFile (TFile::CurrentFile())
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool).
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
short Version_t
Class version identifier (short).
char Char_t
Character 1 byte (char).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
float Float_t
Float 4 bytes (float).
short Short_t
Signed Short integer 2 bytes (short).
double Double_t
Double 8 bytes.
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
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 offset
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 UChar_t len
Option_t Option_t TPoint TPoint const char mode
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 bytes
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
std::optional< TKeyMapNode > fCur
std::optional< TKeyMapNode > Next()
bool operator!=(const iterator &rh) const
TIterator(TFile *file, std::uint64_t addr)
std::ptrdiff_t difference_type
std::input_iterator_tag iterator_category
bool operator==(const iterator &rh) const
TKeyMapIterable(TFile *file)
This class is a thread-safe associative collection connecting a 256 bits digest/hash to a collection ...
Class describing an archive file containing multiple sub-files, like a ZIP or TAR archive.
Array of chars or bytes (8 bits per element).
TClass instances represent classes, structs and namespaces in the ROOT type system.
TDirectory(const TDirectory &directory)=delete
A cache when reading files over the network.
A cache when writing files over the network.
Class holding info about the file being opened.
TFile * fFile
TFile instance of the file being opened.
Int_t fNetOpt
Network options.
TFileOpenHandle(TFile *f)
TFileOpenHandle(const char *n, const char *o, const char *t, Int_t cmp, Int_t no)
TFileOpenHandle & operator=(const TFileOpenHandle &)=delete
Int_t fCompress
Compression level and algorithm.
const char * GetOpt() const
TFileOpenHandle(const TFileOpenHandle &)=delete
Bool_t Matches(const char *name)
~TFileOpenHandle() override
Int_t GetCompress() const
The prefetching mechanism uses two classes (TFilePrefetch and TFPBlock) to prefetch in advance a bloc...
virtual TKey * CreateKey(TDirectory *mother, const TObject *obj, const char *name, Int_t bufsize)
Int_t fReadCalls
Number of read calls ( not counting the cache calls ).
static Bool_t fgCacheFileForce
Indicates, to force all READ to CACHEREAD.
Long64_t fBytesRead
Number of bytes read from this file.
friend class TFilePrefetch
virtual Long64_t GetSeekFree() const
void ls(Option_t *option="") const override
List Directory contents.
ROOT::Detail::TKeyMapIterable WalkTKeys()
Traverses all TKeys in the TFile and returns information about them.
virtual TList * GetStreamerInfoList() final
static TFile *& CurrentFile()
virtual Int_t GetErrno() const
Long64_t fSeekFree
Location on disk of free segments structure.
static Int_t fgReadaheadSize
Readahead buffer size.
virtual Bool_t ReadBuffer(char *buf, Int_t len)
virtual Bool_t WriteBuffer(const char *buf, Int_t len)
void FillBuffer(char *&buffer) override
Encode TNamed into output buffer.
Double_t fSum2Buffer
Sum of squares of buffer sizes of objects written so far.
static Bool_t fgCacheFileDisconnected
Indicates, we trust in the files in the cache dir without stat on the cached file.
const TList * GetStreamerInfoCache()
virtual void WriteStreamerInfo()
virtual Bool_t Matches(const char *name)
TArchiveFile * fArchive
!Archive file from which we read this file
virtual Long64_t DirCreateEntry(TDirectory *)
static EAsyncOpenStatus GetAsyncOpenStatus(const char *name)
virtual Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) const override
Write this object to the current directory.
TArrayC * fClassIndex
!Index of TStreamerInfo classes written to this file
static Int_t GetFileReadCalls()
static void SetFileBytesWritten(Long64_t bytes=0)
Int_t GetCompressionSettings() const
Bool_t fNoAnchorInName
!True if we don't want to force the anchor to be appended to the file name
virtual Int_t DirReadKeys(TDirectory *)
TArrayC * GetClassIndex() const
Long64_t fSeekInfo
Location on disk of StreamerInfo record.
void Paint(Option_t *option="") override
Paint all objects in the directory.
TList * GetListOfFree() const
Int_t GetBestBuffer() const
TList * fOpenPhases
!Time info about open phases
static std::atomic< Long64_t > fgBytesRead
Number of bytes read by all TFile objects.
virtual void SetCacheWrite(TFileCacheWrite *cache)
TFileCacheWrite * GetCacheWrite() const
virtual Long64_t GetBytesWritten() const
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=nullptr, ECacheAction action=kDisconnect)
static TString fgCacheFileDir
Directory where to locally stage files.
static void IncrementFileCounter()
Int_t fVersion
File format version.
void Print(Option_t *option="") const override
Print all objects in the directory.
static const TUrl * GetEndpointUrl(const char *name)
virtual EAsyncOpenStatus GetAsyncOpenStatus()
virtual void ReadStreamerInfo()
void Copy(TObject &) const override
Copy this to obj.
Long64_t GetArchiveOffset() const
static Bool_t fgOnlyStaged
Before the file is opened, it is checked, that the file is staged, if not, the open fails.
virtual Int_t GetNProcessIDs() const
Bool_t fMustFlush
!True if the file buffers must be flushed
Int_t WriteBufferViaCache(const char *buf, Int_t len)
Int_t ReadBufferViaCache(char *buf, Int_t len)
void operator=(const TFile &)=delete
static Bool_t GetOnlyStaged()
virtual UShort_t WriteProcessID(TProcessID *pid)
static std::atomic< Long64_t > fgFileCounter
Counter for all opened files.
TMap * fCacheReadMap
!Pointer to the read cache (if any)
Long64_t fBEGIN
First used byte in file.
virtual Int_t ReOpen(Option_t *mode)
friend class TDirectoryFile
Long64_t fArchiveOffset
!Offset at which file starts in archive
EOpenTimeOut
Open timeout constants.
Int_t fNbytesInfo
Number of bytes for StreamerInfo record.
static Long64_t GetFileBytesRead()
virtual Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len)
TFileOpenHandle * fAsyncHandle
!For proper automatic cleanup
virtual Int_t GetReadCalls() const
virtual TString GetNewUrl()
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override
Write this object to the current directory.
virtual Int_t SysClose(Int_t fd)
virtual Long64_t GetBytesRead() const
virtual InfoListRet GetStreamerInfoListImpl(bool lookupSICache)
virtual Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence)
Int_t GetCompressionLevel() const
static Bool_t fgReadInfo
if true (default) ReadStreamerInfo is called when opening a file
virtual void WriteHeader()
virtual Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
TFile(const TFile &)=delete
Long64_t GetRelOffset() const
static std::atomic< Int_t > fgReadCalls
Number of bytes read from all TFile objects.
static std::atomic< Long64_t > fgBytesWrite
Number of bytes written by all TFile objects.
virtual void SetReadCalls(Int_t readcalls=0)
TString fOption
File options.
virtual void SetOffset(Long64_t offset, ERelativeTo pos=kBeg)
virtual Int_t GetNfree() const
virtual Int_t GetBytesToPrefetch() const
static Bool_t Cp(const char *src, const char *dst, Bool_t progressbar=kTRUE, UInt_t buffersize=1000000)
virtual Long64_t GetEND() const
virtual Int_t SysSync(Int_t fd)
void SumBuffer(Int_t bufsize)
static EFileType GetType(const char *name, Option_t *option="", TString *prefix=nullptr)
EAsyncOpenStatus
Asynchronous open request status.
virtual Int_t SysWrite(Int_t fd, const void *buf, Int_t len)
static Long64_t GetFileCounter()
virtual Long64_t GetSeekInfo() const
Int_t fCompress
Compression level and algorithm.
virtual Int_t GetNbytesFree() const
static UInt_t GetOpenTimeout()
virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
virtual Bool_t IsArchive() const
virtual void SetEND(Long64_t last)
virtual const TUrl * GetEndpointUrl() const
Int_t fNbytesFree
Number of bytes for free segments structure.
Int_t Sizeof() const override
Return size of the TNamed part of the TObject.
virtual void IncrementProcessIDs()
Bool_t fIsPcmFile
!True if the file is a ROOT pcm file.
virtual void MakeFree(Long64_t first, Long64_t last)
virtual void Init(Bool_t create)
TFileCacheRead * fCacheRead
!Pointer to the read cache (if any)
static TFile * Open(TFileOpenHandle *handle)
static Bool_t SetOnlyStaged(Bool_t onlystaged)
Char_t fUnits
Number of bytes for file pointers.
static void SetReadStreamerInfo(Bool_t readinfo=kTRUE)
TObjArray * fProcessIDs
!Array of pointers to TProcessIDs
virtual void SetOption(Option_t *option=">")
static UInt_t SetOpenTimeout(UInt_t timeout)
virtual Long64_t GetBytesReadExtra() const
ECacheAction
TTreeCache flushing semantics.
virtual TKey * CreateKey(TDirectory *mother, const void *obj, const TClass *cl, const char *name, Int_t bufsize)
static TFileOpenHandle * AsyncOpen(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
static ROOT::Internal::RConcurrentHashColl fgTsSIHashes
!TS Set of hashes built from read streamer infos
Long64_t fBytesReadExtra
Number of extra bytes (overhead) read by the readahead buffer.
static void SetFileReadCalls(Int_t readcalls=0)
virtual void ShowStreamerInfo()
Long64_t fBytesWrite
Number of bytes written to this file.
TArchiveFile * GetArchive() const
Bool_t fIsRootFile
!True is this is a ROOT file, raw file otherwise
virtual void DirWriteKeys(TDirectory *)
TList * fFree
Free segments linked list table.
std::mutex fWriteMutex
!Lock for writing baskets / keys into the file.
void Delete(const char *namecycle="") override
Delete Objects or/and keys in a directory.
static TList * fgAsyncOpenRequests
virtual TProcessID * ReadProcessID(UShort_t pidf)
Bool_t fInitDone
!True if the file has been initialized
virtual void DirWriteHeader(TDirectory *)
TFileCacheWrite * fCacheWrite
!Pointer to the write cache (if any)
virtual Long64_t GetSize() const
TString fRealName
Effective real file name (not original url).
Long64_t fOffset
!Seek offset cache
static TFile * OpenFromCache(const char *name, Option_t *="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
virtual Int_t GetNbytesInfo() const
static void SetFileBytesRead(Long64_t bytes=0)
static void CpProgress(Long64_t bytesread, Long64_t size, TStopwatch &watch)
TList * fInfoCache
!Cached list of the streamer infos in this file
static Int_t GetReadaheadSize()
TFile(const char *fname, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
virtual Bool_t MustFlush() const
static UInt_t fgOpenTimeout
Timeout for open operations in ms - 0 corresponds to blocking i/o.
virtual Int_t SysRead(Int_t fd, void *buf, Int_t len)
virtual Bool_t Cp(const char *dst, Bool_t progressbar=kTRUE, UInt_t bufsize=1000000)
Long64_t fEND
Last used byte in file.
virtual void SetCompressionAlgorithm(Int_t algorithm=ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
virtual void ResetErrno() const
virtual Bool_t IsOpen() const
EAsyncOpenStatus fAsyncOpenStatus
!Status of an asynchronous open request
bool fGlobalRegistration
! if true, bypass use of global lists
Double_t fSumBuffer
Sum of buffer sizes of objects written so far.
Bool_t fIsArchive
!True if this is a pure archive file
TObjArray * GetListOfProcessIDs() const
void Draw(Option_t *option="") override
Fill Graphics Structure and Paint.
void Close(Option_t *option="") override
Delete all objects from memory and directory structure itself.
Int_t GetCompressionAlgorithm() const
static Bool_t GetReadStreamerInfo()
virtual void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
virtual void MakeProject(const char *dirname, const char *classes="*", Option_t *option="new")
EStatusBits
TFile status bits. BIT(13) is taken up by TObject.
@ kCancelTTreeChangeRequest
@ k630forwardCompatibility
static const char * GetCacheFileDir()
virtual void DrawMap(const char *keys="*", Option_t *option="")
virtual void Map(Option_t *opt)
Int_t fNProcessIDs
Number of TProcessID written to this file.
virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len)
Int_t fWritten
Number of objects written so far.
Int_t GetRecordHeader(char *buf, Long64_t first, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen)
static Long64_t GetFileBytesWritten()
Float_t GetCompressionFactor()
static void SetReadaheadSize(Int_t bufsize=256000)
virtual void Seek(Long64_t offset, ERelativeTo pos=kBeg)
TFileCacheRead * GetCacheRead(const TObject *tree=nullptr) const
virtual void SetCompressionLevel(Int_t level=ROOT::RCompressionSetting::ELevel::kUseMin)
Option_t * GetOption() const override
static Bool_t ShrinkCacheFileDir(Long64_t shrinkSize, Long_t cleanupInteval=0)
static EAsyncOpenStatus GetAsyncOpenStatus(TFileOpenHandle *handle)
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Mother of all ROOT objects.
Bool_t TestBit(UInt_t f) const
void MayNotUse(const char *method) const
Use this method to signal that a method (defined in a base class) may not be called in a derived clas...
A TProcessID identifies a ROOT job in a unique way in time and space.
This class represents a WWW compatible URL.
Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target ty...
TKeyMapNode(std::uint64_t addr, EType type, std::uint32_t len=0)
@ kUseGlobal
Use the global compression algorithm.
@ kUseCompiledDefault
Use the compile-time default setting.
@ kUseMin
Compression level reserved when we are not sure what to use (1 is for the fastest compression).
Simple struct of the return value of GetStreamerInfoListImpl.
ROOT::Internal::RConcurrentHashColl::HashValue fHash