Logo ROOT  
Reference Guide
TFile.h
Go to the documentation of this file.
1 // @(#)root/io:$Id$
2 // Author: Rene Brun 28/11/94
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TFile
13 #define ROOT_TFile
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TFile //
19 // //
20 // ROOT file. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #include <atomic>
25 #include <string>
26 
27 #include "Compression.h"
28 #include "TDirectoryFile.h"
29 #include "TUrl.h"
31 
32 // Not a part of TFile interface; provide a forward declaration instead of #include.
33 // #ifndef R__LESS_INCLUDES
34 // #include "TMap.h"
35 // #endif
36 
37 #ifdef R__USE_IMT
38 #include "ROOT/TRWSpinLock.hxx"
39 #include <mutex>
40 #endif
41 
42 
43 class TMap;
44 class TFree;
45 class TArrayC;
46 class TArchiveFile;
47 class TFileOpenHandle;
48 class TFileCacheRead;
49 class TFileCacheWrite;
50 class TProcessID;
51 class TStopwatch;
52 class TFilePrefetch;
53 
54 class TFile : public TDirectoryFile {
55  friend class TDirectoryFile;
56  friend class TFilePrefetch;
57 // TODO: We need to make sure only one TBasket is being written at a time
58 // if we are writing multiple baskets in parallel.
59 #ifdef R__USE_IMT
60  friend class TBasket;
61 #endif
62 
63 public:
64  /// Asynchronous open request status
67  /// Open timeout constants
68  enum EOpenTimeOut { kInstantTimeout = 0, kEternalTimeout = 999999999 };
69 
70  /// TTreeCache flushing semantics
72 
73 protected:
74  Double_t fSumBuffer{0}; ///<Sum of buffer sizes of objects written so far
75  Double_t fSum2Buffer{0}; ///<Sum of squares of buffer sizes of objects written so far
76  Long64_t fBytesWrite{0}; ///<Number of bytes written to this file
77  Long64_t fBytesRead{0}; ///<Number of bytes read from this file
78  Long64_t fBytesReadExtra{0}; ///<Number of extra bytes (overhead) read by the readahead buffer
79  Long64_t fBEGIN{0}; ///<First used byte in file
80  Long64_t fEND{0}; ///<Last used byte in file
81  Long64_t fSeekFree{0}; ///<Location on disk of free segments structure
82  Long64_t fSeekInfo{0}; ///<Location on disk of StreamerInfo record
83  Int_t fD{-1}; ///<File descriptor
84  Int_t fVersion{0}; ///<File format version
85  Int_t fCompress{0}; ///<Compression level and algorithm
86  Int_t fNbytesFree{0}; ///<Number of bytes for free segments structure
87  Int_t fNbytesInfo{0}; ///<Number of bytes for StreamerInfo record
88  Int_t fWritten{0}; ///<Number of objects written so far
89  Int_t fNProcessIDs{0}; ///<Number of TProcessID written to this file
90  Int_t fReadCalls{0}; ///<Number of read calls ( not counting the cache calls )
91  TString fRealName; ///<Effective real file name (not original url)
92  TString fOption; ///<File options
93  Char_t fUnits{0}; ///<Number of bytes for file pointers
94  TList *fFree{nullptr}; ///<Free segments linked list table
95  TArrayC *fClassIndex{nullptr}; ///<!Index of TStreamerInfo classes written to this file
96  TObjArray *fProcessIDs{nullptr}; ///<!Array of pointers to TProcessIDs
97  Long64_t fOffset{0}; ///<!Seek offset cache
98  TArchiveFile *fArchive{nullptr}; ///<!Archive file from which we read this file
99  TFileCacheRead *fCacheRead{nullptr}; ///<!Pointer to the read cache (if any)
100  TMap *fCacheReadMap{nullptr}; ///<!Pointer to the read cache (if any)
101  TFileCacheWrite *fCacheWrite{nullptr}; ///<!Pointer to the write cache (if any)
102  Long64_t fArchiveOffset{0}; ///<!Offset at which file starts in archive
103  Bool_t fIsArchive{kFALSE}; ///<!True if this is a pure archive file
104  Bool_t fNoAnchorInName{kFALSE}; ///<!True if we don't want to force the anchor to be appended to the file name
105  Bool_t fIsRootFile{kTRUE}; ///<!True is this is a ROOT file, raw file otherwise
106  Bool_t fInitDone{kFALSE}; ///<!True if the file has been initialized
107  Bool_t fMustFlush{kTRUE}; ///<!True if the file buffers must be flushed
108  Bool_t fIsPcmFile{kFALSE}; ///<!True if the file is a ROOT pcm file.
109  TFileOpenHandle *fAsyncHandle{nullptr}; ///<!For proper automatic cleanup
110  EAsyncOpenStatus fAsyncOpenStatus{kAOSNotAsync}; ///<!Status of an asynchronous open request
111  TUrl fUrl; ///<!URL of file
112 
113  TList *fInfoCache{nullptr}; ///<!Cached list of the streamer infos in this file
114  TList *fOpenPhases{nullptr}; ///<!Time info about open phases
115 
116 #ifdef R__USE_IMT
117  std::mutex fWriteMutex; ///<!Lock for writing baskets / keys into the file.
118  static ROOT::Internal::RConcurrentHashColl fgTsSIHashes; ///<!TS Set of hashes built from read streamer infos
119 #endif
120 
121  static TList *fgAsyncOpenRequests; //List of handles for pending open requests
122 
123  static TString fgCacheFileDir; ///<Directory where to locally stage files
124  static Bool_t fgCacheFileDisconnected; ///<Indicates, we trust in the files in the cache dir without stat on the cached file
125  static Bool_t fgCacheFileForce; ///<Indicates, to force all READ to CACHEREAD
126  static UInt_t fgOpenTimeout; ///<Timeout for open operations in ms - 0 corresponds to blocking i/o
127  static Bool_t fgOnlyStaged ; ///<Before the file is opened, it is checked, that the file is staged, if not, the open fails
128 
129  static std::atomic<Long64_t> fgBytesWrite; ///<Number of bytes written by all TFile objects
130  static std::atomic<Long64_t> fgBytesRead; ///<Number of bytes read by all TFile objects
131  static std::atomic<Long64_t> fgFileCounter; ///<Counter for all opened files
132  static std::atomic<Int_t> fgReadCalls; ///<Number of bytes read from all TFile objects
133  static Int_t fgReadaheadSize; ///<Readahead buffer size
134  static Bool_t fgReadInfo; ///<if true (default) ReadStreamerInfo is called when opening a file
135 
137  virtual void Init(Bool_t create);
139  Int_t ReadBufferViaCache(char *buf, Int_t len);
140  Int_t WriteBufferViaCache(const char *buf, Int_t len);
141 
142  ////////////////////////////////////////////////////////////////////////////////
143  /// \brief Simple struct of the return value of GetStreamerInfoListImpl
144  struct InfoListRet {
148  };
149 
150  virtual InfoListRet GetStreamerInfoListImpl(bool lookupSICache);
151 
152  // Creating projects
153  Int_t MakeProjectParMake(const char *packname, const char *filename);
154  Int_t MakeProjectParProofInf(const char *packname, const char *proofinfdir);
155 
156  // Interface to basic system I/O routines
157  virtual Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode);
158  virtual Int_t SysClose(Int_t fd);
159  virtual Int_t SysRead(Int_t fd, void *buf, Int_t len);
160  virtual Int_t SysWrite(Int_t fd, const void *buf, Int_t len);
161  virtual Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence);
162  virtual Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime);
163  virtual Int_t SysSync(Int_t fd);
164 
165  // Interface for text-based TDirectory I/O
166  virtual Long64_t DirCreateEntry(TDirectory*) { return 0; }
167  virtual Int_t DirReadKeys(TDirectory*) { return 0; }
168  virtual void DirWriteKeys(TDirectory*) {}
169  virtual void DirWriteHeader(TDirectory*) {}
170 
171 private:
172  TFile(const TFile &) = delete; //Files cannot be copied
173  void operator=(const TFile &) = delete;
174 
175  static void CpProgress(Long64_t bytesread, Long64_t size, TStopwatch &watch);
176  static TFile *OpenFromCache(const char *name, Option_t * = "",
177  const char *ftitle = "", Int_t compress = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault,
178  Int_t netopt = 0);
179 
180 public:
181  /// TFile status bits. BIT(13) is taken up by TObject
182  enum EStatusBits {
185  kDevNull = BIT(12),
190  };
191  enum ERelativeTo { kBeg = 0, kCur = 1, kEnd = 2 };
192  enum { kStartBigFile = 2000000000 };
193  /// File type
194  enum EFileType { kDefault = 0, kLocal = 1, kNet = 2, kWeb = 3, kFile = 4, kMerge = 5 };
195 
196  TFile();
197  TFile(const char *fname, Option_t *option="", const char *ftitle="", Int_t compress = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault);
198  virtual ~TFile();
199 
200  void Close(Option_t *option="") override; // *MENU*
201  void Copy(TObject &) const override { MayNotUse("Copy(TObject &)"); }
202  virtual Bool_t Cp(const char *dst, Bool_t progressbar = kTRUE,UInt_t buffersize = 1000000);
203  virtual TKey* CreateKey(TDirectory* mother, const TObject* obj, const char* name, Int_t bufsize);
204  virtual TKey* CreateKey(TDirectory* mother, const void* obj, const TClass* cl,
205  const char* name, Int_t bufsize);
206  static TFile *&CurrentFile(); // Return the current file for this thread.
207  void Delete(const char *namecycle="") override;
208  void Draw(Option_t *option="") override;
209  virtual void DrawMap(const char *keys="*",Option_t *option=""); // *MENU*
210  void FillBuffer(char *&buffer) override;
211  virtual void Flush();
212  TArchiveFile *GetArchive() const { return fArchive; }
214  Int_t GetBestBuffer() const;
215  virtual Int_t GetBytesToPrefetch() const;
216  TFileCacheRead *GetCacheRead(const TObject* tree = nullptr) const;
218  TArrayC *GetClassIndex() const { return fClassIndex; }
220  Int_t GetCompressionLevel() const;
223  virtual Long64_t GetEND() const { return fEND; }
224  virtual Int_t GetErrno() const;
225  virtual void ResetErrno() const;
226  Int_t GetFd() const { return fD; }
227  virtual const TUrl *GetEndpointUrl() const { return &fUrl; }
229  TList *GetListOfFree() const { return fFree; }
230  virtual Int_t GetNfree() const { return fFree->GetSize(); }
231  virtual Int_t GetNProcessIDs() const { return fNProcessIDs; }
232  Option_t *GetOption() const override { return fOption.Data(); }
233  virtual Long64_t GetBytesRead() const { return fBytesRead; }
234  virtual Long64_t GetBytesReadExtra() const { return fBytesReadExtra; }
235  virtual Long64_t GetBytesWritten() const;
236  virtual Int_t GetReadCalls() const { return fReadCalls; }
237  Int_t GetVersion() const { return fVersion; }
238  Int_t GetRecordHeader(char *buf, Long64_t first, Int_t maxbytes,
239  Int_t &nbytes, Int_t &objlen, Int_t &keylen);
240  virtual Int_t GetNbytesInfo() const {return fNbytesInfo;}
241  virtual Int_t GetNbytesFree() const {return fNbytesFree;}
242  virtual TString GetNewUrl() { return ""; }
244  virtual Long64_t GetSeekFree() const {return fSeekFree;}
245  virtual Long64_t GetSeekInfo() const {return fSeekInfo;}
246  virtual Long64_t GetSize() const;
247  virtual TList *GetStreamerInfoList() final; // Note: to override behavior, please override GetStreamerInfoListImpl
248  const TList *GetStreamerInfoCache();
249  virtual void IncrementProcessIDs() { fNProcessIDs++; }
250  virtual Bool_t IsArchive() const { return fIsArchive; }
251  Bool_t IsBinary() const { return TestBit(kBinaryFile); }
252  Bool_t IsRaw() const { return !fIsRootFile; }
253  virtual Bool_t IsOpen() const;
254  void ls(Option_t *option="") const override;
255  virtual void MakeFree(Long64_t first, Long64_t last);
256  virtual void MakeProject(const char *dirname, const char *classes="*",
257  Option_t *option="new"); // *MENU*
258  virtual void Map(Option_t *opt); // *MENU*
259  virtual void Map() { Map(""); }; // *MENU*
260  virtual Bool_t Matches(const char *name);
261  virtual Bool_t MustFlush() const {return fMustFlush;}
262  void Paint(Option_t *option="") override;
263  void Print(Option_t *option="") const override;
264  virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len);
265  virtual Bool_t ReadBuffer(char *buf, Int_t len);
266  virtual Bool_t ReadBuffer(char *buf, Long64_t pos, Int_t len);
267  virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf);
268  virtual void ReadFree();
269  virtual TProcessID *ReadProcessID(UShort_t pidf);
270  virtual void ReadStreamerInfo();
271  virtual Int_t Recover();
272  virtual Int_t ReOpen(Option_t *mode);
273  virtual void Seek(Long64_t offset, ERelativeTo pos = kBeg);
274  virtual void SetCacheRead(TFileCacheRead *cache, TObject* tree = 0, ECacheAction action = kDisconnect);
275  virtual void SetCacheWrite(TFileCacheWrite *cache);
279  virtual void SetEND(Long64_t last) { fEND = last; }
280  virtual void SetOffset(Long64_t offset, ERelativeTo pos = kBeg);
281  virtual void SetOption(Option_t *option=">") { fOption = option; }
282  virtual void SetReadCalls(Int_t readcalls = 0) { fReadCalls = readcalls; }
283  virtual void ShowStreamerInfo();
284  Int_t Sizeof() const override;
285  void SumBuffer(Int_t bufsize);
286  virtual Bool_t WriteBuffer(const char *buf, Int_t len);
287  Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override;
288  Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) const override;
289  virtual void WriteFree();
290  virtual void WriteHeader();
291  virtual UShort_t WriteProcessID(TProcessID *pid);
292  virtual void WriteStreamerInfo();
293 
294  static TFileOpenHandle
295  *AsyncOpen(const char *name, Option_t *option = "",
296  const char *ftitle = "", Int_t compress = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault,
297  Int_t netopt = 0);
298  static TFile *Open(const char *name, Option_t *option = "",
299  const char *ftitle = "", Int_t compress = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault,
300  Int_t netopt = 0);
301  static TFile *Open(TFileOpenHandle *handle);
302 
303  static EFileType GetType(const char *name, Option_t *option = "", TString *prefix = nullptr);
304 
305  static EAsyncOpenStatus GetAsyncOpenStatus(const char *name);
307  static const TUrl *GetEndpointUrl(const char *name);
308 
309  static Long64_t GetFileBytesRead();
310  static Long64_t GetFileBytesWritten();
311  static Int_t GetFileReadCalls();
312  static Int_t GetReadaheadSize();
313 
314  static void SetFileBytesRead(Long64_t bytes = 0);
315  static void SetFileBytesWritten(Long64_t bytes = 0);
316  static void SetFileReadCalls(Int_t readcalls = 0);
317  static void SetReadaheadSize(Int_t bufsize = 256000);
318  static void SetReadStreamerInfo(Bool_t readinfo=kTRUE);
319  static Bool_t GetReadStreamerInfo();
320 
321  static Long64_t GetFileCounter();
322  static void IncrementFileCounter();
323 
324  static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected = kTRUE,
325  Bool_t forceCacheread = kFALSE)
326  { return SetCacheFileDir(std::string_view(cacheDir), operateDisconnected, forceCacheread); }
327  static Bool_t SetCacheFileDir(std::string_view cacheDir, Bool_t operateDisconnected = kTRUE,
328  Bool_t forceCacheread = kFALSE);
329  static const char *GetCacheFileDir();
330  static Bool_t ShrinkCacheFileDir(Long64_t shrinkSize, Long_t cleanupInteval = 0);
331  static Bool_t Cp(const char *src, const char *dst, Bool_t progressbar = kTRUE,
332  UInt_t buffersize = 1000000);
333 
334  static UInt_t SetOpenTimeout(UInt_t timeout); // in ms
335  static UInt_t GetOpenTimeout(); // in ms
336  static Bool_t SetOnlyStaged(Bool_t onlystaged);
337  static Bool_t GetOnlyStaged();
338 
339  ClassDefOverride(TFile,8) //ROOT file
340 };
341 
342 #ifndef __CINT__
343 #define gFile (TFile::CurrentFile())
344 
345 #elif defined(__MAKECINT__)
346 // To properly handle the use of gFile in header files (in static declarations)
348 #endif
349 
350 /**
351 \class TFileOpenHandle
352 \ingroup IO
353 Class holding info about the file being opened
354 */
355 class TFileOpenHandle : public TNamed {
356 
357 friend class TFile;
358 friend class TAlienFile;
359 
360 private:
361  TString fOpt; ///< Options
362  Int_t fCompress{0}; ///< Compression level and algorithm
363  Int_t fNetOpt{0}; ///< Network options
364  TFile *fFile{nullptr}; ///< TFile instance of the file being opened
365 
366  TFileOpenHandle(TFile *f) : TNamed("",""), fOpt(""), fCompress(ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault),
367  fNetOpt(0), fFile(f) { }
368  TFileOpenHandle(const char *n, const char *o, const char *t, Int_t cmp,
369  Int_t no) : TNamed(n,t), fOpt(o), fCompress(cmp),
370  fNetOpt(no), fFile(nullptr) { }
371  TFileOpenHandle(const TFileOpenHandle&) = delete;
372  TFileOpenHandle& operator=(const TFileOpenHandle&) = delete;
373 
374  TFile *GetFile() const { return fFile; }
375 
376 public:
378 
379  Bool_t Matches(const char *name);
380 
381  const char *GetOpt() const { return fOpt; }
382  Int_t GetCompress() const { return fCompress; }
383  Int_t GetNetOpt() const { return fNetOpt; }
384 };
385 
386 //______________________________________________________________________________
388 {
389  return (fCompress < 0) ? -1 : fCompress / 100;
390 }
391 
392 //______________________________________________________________________________
394 {
395  return (fCompress < 0) ? -1 : fCompress % 100;
396 }
397 
398 //______________________________________________________________________________
400 {
401  return (fCompress < 0) ? -1 : fCompress;
402 }
403 
404 #endif
TFile::fBEGIN
Long64_t fBEGIN
First used byte in file.
Definition: TFile.h:79
TFile::DirWriteHeader
virtual void DirWriteHeader(TDirectory *)
Definition: TFile.h:169
TFile::fNProcessIDs
Int_t fNProcessIDs
Number of TProcessID written to this file.
Definition: TFile.h:89
TFile::kRecovered
@ kRecovered
Definition: TFile.h:183
Compression.h
n
const Int_t n
Definition: legend1.C:16
TFile::fBytesWrite
Long64_t fBytesWrite
Number of bytes written to this file.
Definition: TFile.h:76
TFileOpenHandle::GetFile
TFile * GetFile() const
Definition: TFile.h:374
TFile::ReadBufferAsync
virtual Bool_t ReadBufferAsync(Long64_t offs, Int_t len)
Definition: TFile.cxx:5048
TFile::fVersion
Int_t fVersion
File format version.
Definition: TFile.h:84
TFile::kCur
@ kCur
Definition: TFile.h:191
TArchiveFile
Definition: TArchiveFile.h:24
first
Definition: first.py:1
TFile::fgBytesRead
static std::atomic< Long64_t > fgBytesRead
Number of bytes read by all TFile objects.
Definition: TFile.h:130
TFile::ReOpen
virtual Int_t ReOpen(Option_t *mode)
Reopen a file with a different access mode.
Definition: TFile.cxx:2026
TFile::fCompress
Int_t fCompress
Compression level and algorithm.
Definition: TFile.h:85
TFile::operator=
void operator=(const TFile &)=delete
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
TFile::ReadFree
virtual void ReadFree()
Read the FREE linked list.
Definition: TFile.cxx:1789
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:172
TFile::EOpenTimeOut
EOpenTimeOut
Open timeout constants.
Definition: TFile.h:68
TFile::SetCompressionAlgorithm
virtual void SetCompressionAlgorithm(Int_t algorithm=ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
See comments for function SetCompressionSettings.
Definition: TFile.cxx:2169
TObjArray
Definition: TObjArray.h:37
f
#define f(i)
Definition: RSha256.hxx:122
TFile::kDoNotDisconnect
@ kDoNotDisconnect
Definition: TFile.h:71
TFile::fUnits
Char_t fUnits
Number of bytes for file pointers.
Definition: TFile.h:93
ROOT::RCompressionSetting::ELevel::kUseMin
@ kUseMin
Compression level reserved when we are not sure what to use (1 is for the fastest compression)
Definition: Compression.h:80
TFile::OpenFromCache
static TFile * OpenFromCache(const char *name, Option_t *="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Open a file for reading through the file cache.
Definition: TFile.cxx:3737
TFile::fSeekFree
Long64_t fSeekFree
Location on disk of free segments structure.
Definition: TFile.h:81
TFile::FillBuffer
void FillBuffer(char *&buffer) override
Encode file output buffer.
Definition: TFile.cxx:1087
TFile::fReadCalls
Int_t fReadCalls
Number of read calls ( not counting the cache calls )
Definition: TFile.h:90
TFile::InfoListRet::fHash
ROOT::Internal::RConcurrentHashColl::HashValue fHash
Definition: TFile.h:147
TFile::fProcessIDs
TObjArray * fProcessIDs
!Array of pointers to TProcessIDs
Definition: TFile.h:96
TFile::Seek
virtual void Seek(Long64_t offset, ERelativeTo pos=kBeg)
Seek to a specific position in the file. Pos it either kBeg, kCur or kEnd.
Definition: TFile.cxx:2138
ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault
@ kUseCompiledDefault
Use the compile-time default setting.
Definition: Compression.h:74
TFile::fBytesRead
Long64_t fBytesRead
Number of bytes read from this file.
Definition: TFile.h:77
TFile::SetCacheFileDir
static Bool_t SetCacheFileDir(ROOT::Internal::TStringView cacheDir, Bool_t operateDisconnected=kTRUE, Bool_t forceCacheread=kFALSE)
Definition: TFile.h:324
TFile::kBeg
@ kBeg
Definition: TFile.h:191
TFile::ReadProcessID
virtual TProcessID * ReadProcessID(UShort_t pidf)
The TProcessID with number pidf is read from this file.
Definition: TFile.cxx:1815
UShort_t
unsigned short UShort_t
Definition: RtypesCore.h:40
TFile::fgReadInfo
static Bool_t fgReadInfo
if true (default) ReadStreamerInfo is called when opening a file
Definition: TFile.h:134
TFile::SysSeek
virtual Long64_t SysSeek(Int_t fd, Long64_t offset, Int_t whence)
Interface to system lseek.
Definition: TFile.cxx:4364
TFile::GetBestBuffer
Int_t GetBestBuffer() const
Return the best buffer size of objects on this file.
Definition: TFile.cxx:1100
TString::Data
const char * Data() const
Definition: TString.h:369
TFile::SetCompressionLevel
virtual void SetCompressionLevel(Int_t level=ROOT::RCompressionSetting::ELevel::kUseMin)
See comments for function SetCompressionSettings.
Definition: TFile.cxx:2183
TFile::ECacheAction
ECacheAction
TTreeCache flushing semantics.
Definition: TFile.h:71
TFile::IsRaw
Bool_t IsRaw() const
Definition: TFile.h:252
tree
Definition: tree.py:1
TFile::SetFileBytesWritten
static void SetFileBytesWritten(Long64_t bytes=0)
Definition: TFile.cxx:4450
TFile::GetArchive
TArchiveFile * GetArchive() const
Definition: TFile.h:212
TFile::IncrementFileCounter
static void IncrementFileCounter()
Definition: TFile.cxx:4459
TFile::GetSeekFree
virtual Long64_t GetSeekFree() const
Definition: TFile.h:244
TFile::GetRelOffset
Long64_t GetRelOffset() const
Definition: TFile.h:243
TFile::fClassIndex
TArrayC * fClassIndex
!Index of TStreamerInfo classes written to this file
Definition: TFile.h:95
TFileOpenHandle::GetCompress
Int_t GetCompress() const
Definition: TFile.h:382
TFile::fIsArchive
Bool_t fIsArchive
!True if this is a pure archive file
Definition: TFile.h:103
TFile::fIsPcmFile
Bool_t fIsPcmFile
!True if the file is a ROOT pcm file.
Definition: TFile.h:108
TFile::kDefault
@ kDefault
Definition: TFile.h:194
TFile::fCacheReadMap
TMap * fCacheReadMap
!Pointer to the read cache (if any)
Definition: TFile.h:100
TFile::ResetErrno
virtual void ResetErrno() const
Method resetting the errno.
Definition: TFile.cxx:1171
Long64_t
long long Long64_t
Definition: RtypesCore.h:73
TFile::CreateKey
virtual TKey * CreateKey(TDirectory *mother, const TObject *obj, const char *name, Int_t bufsize)
Creates key for object and converts data to buffer.
Definition: TFile.cxx:973
string_view
basic_string_view< char > string_view
Definition: libcpp_string_view.h:785
TFile::ERelativeTo
ERelativeTo
Definition: TFile.h:191
TFile::fgOpenTimeout
static UInt_t fgOpenTimeout
Timeout for open operations in ms - 0 corresponds to blocking i/o.
Definition: TFile.h:126
TFile::fSeekInfo
Long64_t fSeekInfo
Location on disk of StreamerInfo record.
Definition: TFile.h:82
gFile
#define gFile
Definition: TFile.h:343
TFile::kAOSInProgress
@ kAOSInProgress
Definition: TFile.h:66
TFile::SysStat
virtual Int_t SysStat(Int_t fd, Long_t *id, Long64_t *size, Long_t *flags, Long_t *modtime)
Return file stat information.
Definition: TFile.cxx:4382
TFile::GetClassIndex
TArrayC * GetClassIndex() const
Definition: TFile.h:218
TFile::fRealName
TString fRealName
Effective real file name (not original url)
Definition: TFile.h:91
TFile::SetFileReadCalls
static void SetFileReadCalls(Int_t readcalls=0)
Definition: TFile.cxx:4453
TFile::GetFileBytesRead
static Long64_t GetFileBytesRead()
Static function returning the total number of bytes read from all files.
Definition: TFile.cxx:4413
Float_t
float Float_t
Definition: RtypesCore.h:57
TProcessID
Definition: TProcessID.h:74
TFile::Paint
void Paint(Option_t *option="") override
Paint all objects in the file.
Definition: TFile.cxx:1562
TFile::SetReadCalls
virtual void SetReadCalls(Int_t readcalls=0)
Definition: TFile.h:282
TFile::Open
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition: TFile.cxx:3946
TFileOpenHandle::TFileOpenHandle
TFileOpenHandle(TFile *f)
Definition: TFile.h:366
Int_t
int Int_t
Definition: RtypesCore.h:45
TFile::kEnd
@ kEnd
Definition: TFile.h:191
TFile::GetArchiveOffset
Long64_t GetArchiveOffset() const
Definition: TFile.h:213
TFile::GetBytesWritten
virtual Long64_t GetBytesWritten() const
Return the total number of bytes written so far to the file.
Definition: TFile.cxx:4405
TFile::fSumBuffer
Double_t fSumBuffer
Sum of buffer sizes of objects written so far.
Definition: TFile.h:74
TFile::GetSeekInfo
virtual Long64_t GetSeekInfo() const
Definition: TFile.h:245
TFile::Cp
virtual Bool_t Cp(const char *dst, Bool_t progressbar=kTRUE, UInt_t buffersize=1000000)
Allows to copy this file to the dst URL.
Definition: TFile.cxx:4843
TFile::InfoListRet::fList
TList * fList
Definition: TFile.h:145
TFile::GetErrno
virtual Int_t GetErrno() const
Method returning errno.
Definition: TFile.cxx:1163
TFile::kWeb
@ kWeb
Definition: TFile.h:194
TFile::IsBinary
Bool_t IsBinary() const
Definition: TFile.h:251
TFile::fgAsyncOpenRequests
static TList * fgAsyncOpenRequests
Definition: TFile.h:121
TObject::MayNotUse
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...
Definition: TObject.cxx:943
TFile::fBytesReadExtra
Long64_t fBytesReadExtra
Number of extra bytes (overhead) read by the readahead buffer.
Definition: TFile.h:78
TFile::GetVersion
Int_t GetVersion() const
Definition: TFile.h:237
TFile::SetEND
virtual void SetEND(Long64_t last)
Definition: TFile.h:279
TFile::GetReadStreamerInfo
static Bool_t GetReadStreamerInfo()
If the streamerinfos are to be read at file opening.
Definition: TFile.cxx:3604
TFile::Draw
void Draw(Option_t *option="") override
Fill Graphics Structure and Paint.
Definition: TFile.cxx:1037
TFile::SetReadStreamerInfo
static void SetReadStreamerInfo(Bool_t readinfo=kTRUE)
Specify if the streamerinfos must be read at file opening.
Definition: TFile.cxx:3594
TFile::MakeProject
virtual void MakeProject(const char *dirname, const char *classes="*", Option_t *option="new")
Generate source code necessary to access the objects stored in the file.
Definition: TFile.cxx:2590
TFile::kDevNull
@ kDevNull
Definition: TFile.h:185
TFileOpenHandle
Definition: TFile.h:355
TFileOpenHandle::Matches
Bool_t Matches(const char *name)
Return kTRUE if this async request matches the open request specified by 'url'.
Definition: TFile.cxx:4629
ROOT::Internal::RConcurrentHashColl
This class is a TS set of unsigned set.
Definition: RConcurrentHashColl.hxx:32
TFile::GetListOfProcessIDs
TObjArray * GetListOfProcessIDs() const
Definition: TFile.h:228
TFile::ReadBuffer
virtual Bool_t ReadBuffer(char *buf, Int_t len)
Read a buffer from the file.
Definition: TFile.cxx:1634
TString
Definition: TString.h:136
ClassDefOverride
#define ClassDefOverride(name, id)
Definition: Rtypes.h:329
TFile::kWriteError
@ kWriteError
Definition: TFile.h:186
TFile::SysClose
virtual Int_t SysClose(Int_t fd)
Interface to system close. All arguments like in POSIX close().
Definition: TFile.cxx:4336
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TFile::GetOpenTimeout
static UInt_t GetOpenTimeout()
Returns open timeout (in ms).
Definition: TFile.cxx:4573
TFileOpenHandle::GetNetOpt
Int_t GetNetOpt() const
Definition: TFile.h:383
TFile::Write
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override
Write memory objects to this file.
Definition: TFile.cxx:2300
TFile::ShrinkCacheFileDir
static Bool_t ShrinkCacheFileDir(Long64_t shrinkSize, Long_t cleanupInteval=0)
Try to shrink the cache to the desired size.
Definition: TFile.cxx:4505
bool
TFile::InfoListRet::fReturnCode
Int_t fReturnCode
Definition: TFile.h:146
TFile::GetNfree
virtual Int_t GetNfree() const
Definition: TFile.h:230
TFile::WriteBufferViaCache
Int_t WriteBufferViaCache(const char *buf, Int_t len)
Write buffer via cache.
Definition: TFile.cxx:2383
ROOT::Internal::TStringView
Definition: RStringView.hxx:77
TFile::WriteStreamerInfo
virtual void WriteStreamerInfo()
Write the list of TStreamerInfo as a single object in this file The class Streamer description for al...
Definition: TFile.cxx:3654
TFile::fUrl
TUrl fUrl
!URL of file
Definition: TFile.h:111
TFile::Map
virtual void Map()
Definition: TFile.h:259
TFile::fD
Int_t fD
File descriptor.
Definition: TFile.h:83
TFile::GetStreamerInfoList
virtual TList * GetStreamerInfoList() final
Read the list of TStreamerInfo objects written to this file.
Definition: TFile.cxx:1358
TFile::fInfoCache
TList * fInfoCache
!Cached list of the streamer infos in this file
Definition: TFile.h:113
TAlienFile
Definition: TAlienFile.h:39
TFile::GetBytesToPrefetch
virtual Int_t GetBytesToPrefetch() const
Max number of bytes to prefetch.
Definition: TFile.cxx:5062
TFile::kReproducible
@ kReproducible
Definition: TFile.h:189
TFile::kDisconnect
@ kDisconnect
Definition: TFile.h:71
TFile::SysWrite
virtual Int_t SysWrite(Int_t fd, const void *buf, Int_t len)
Interface to system write. All arguments like in POSIX write().
Definition: TFile.cxx:4353
TFile::fArchive
TArchiveFile * fArchive
!Archive file from which we read this file
Definition: TFile.h:98
TFile::GetType
static EFileType GetType(const char *name, Option_t *option="", TString *prefix=nullptr)
Resolve the file type as a function of the protocol field in 'name'.
Definition: TFile.cxx:4660
TFile::DirCreateEntry
virtual Long64_t DirCreateEntry(TDirectory *)
Definition: TFile.h:166
TFile::SetReadaheadSize
static void SetReadaheadSize(Int_t bufsize=256000)
Definition: TFile.cxx:4444
TRWSpinLock.hxx
TFile::GetCompressionAlgorithm
Int_t GetCompressionAlgorithm() const
Definition: TFile.h:387
TFileOpenHandle::operator=
TFileOpenHandle & operator=(const TFileOpenHandle &)=delete
TFile::IsArchive
virtual Bool_t IsArchive() const
Definition: TFile.h:250
TFile::SumBuffer
void SumBuffer(Int_t bufsize)
Increment statistics for buffer sizes of objects in this file.
Definition: TFile.cxx:2281
TFile::kLocal
@ kLocal
Definition: TFile.h:194
TFile::CpProgress
static void CpProgress(Long64_t bytesread, Long64_t size, TStopwatch &watch)
Print file copy progress.
Definition: TFile.cxx:4815
TFile::EFileType
EFileType
File type.
Definition: TFile.h:194
Option_t
const typedef char Option_t
Definition: RtypesCore.h:66
TFile::InfoListRet
Simple struct of the return value of GetStreamerInfoListImpl.
Definition: TFile.h:144
TFile::fNbytesInfo
Int_t fNbytesInfo
Number of bytes for StreamerInfo record.
Definition: TFile.h:87
TFile::Init
virtual void Init(Bool_t create)
Initialize a TFile object.
Definition: TFile.cxx:552
TFile::GetNewUrl
virtual TString GetNewUrl()
Definition: TFile.h:242
RConcurrentHashColl.hxx
TFile::GetBytesRead
virtual Long64_t GetBytesRead() const
Definition: TFile.h:233
TFile::WriteFree
virtual void WriteFree()
Write FREE linked list on the file.
Definition: TFile.cxx:2407
TFile::WriteBuffer
virtual Bool_t WriteBuffer(const char *buf, Int_t len)
Write a buffer to the file.
Definition: TFile.cxx:2340
TFileOpenHandle::fOpt
TString fOpt
Options.
Definition: TFile.h:361
TFile::fWriteMutex
std::mutex fWriteMutex
!Lock for writing baskets / keys into the file.
Definition: TFile.h:117
TFile::SysSync
virtual Int_t SysSync(Int_t fd)
Interface to system fsync. All arguments like in POSIX fsync().
Definition: TFile.cxx:4391
TFile::GetNbytesFree
virtual Int_t GetNbytesFree() const
Definition: TFile.h:241
TFile::TFile
TFile()
File default Constructor.
Definition: TFile.cxx:177
TFile::GetRecordHeader
Int_t GetRecordHeader(char *buf, Long64_t first, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen)
Read the logical record header starting at a certain postion.
Definition: TFile.cxx:1216
TNamed
Definition: TNamed.h:29
TFile::GetOption
Option_t * GetOption() const override
Definition: TFile.h:232
TFile::IsOpen
virtual Bool_t IsOpen() const
Returns kTRUE in case file is open and kFALSE if file is not open.
Definition: TFile.cxx:1382
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TFile::GetFileBytesWritten
static Long64_t GetFileBytesWritten()
Static function returning the total number of bytes written to all files.
Definition: TFile.cxx:4422
TFile::ShowStreamerInfo
virtual void ShowStreamerInfo()
Show the StreamerInfo of all classes written to this file.
Definition: TFile.cxx:3612
TFile::GetReadCalls
virtual Int_t GetReadCalls() const
Definition: TFile.h:236
TFile::kRedirected
@ kRedirected
Definition: TFile.h:188
Long_t
long Long_t
Definition: RtypesCore.h:54
TFile::SysRead
virtual Int_t SysRead(Int_t fd, void *buf, Int_t len)
Interface to system read. All arguments like in POSIX read().
Definition: TFile.cxx:4345
TFile::GetReadaheadSize
static Int_t GetReadaheadSize()
Static function returning the readahead buffer size.
Definition: TFile.cxx:4438
TFile::GetFileReadCalls
static Int_t GetFileReadCalls()
Static function returning the total number of read calls from all files.
Definition: TFile.cxx:4430
TFile::GetSize
virtual Long64_t GetSize() const
Returns the current file size.
Definition: TFile.cxx:1262
TFile::ls
void ls(Option_t *option="") const override
List file contents.
Definition: TFile.cxx:1370
TFile::kNet
@ kNet
Definition: TFile.h:194
TDirectoryFile.h
TFile::SysOpen
virtual Int_t SysOpen(const char *pathname, Int_t flags, UInt_t mode)
Interface to system open. All arguments like in POSIX open().
Definition: TFile.cxx:4320
BIT
#define BIT(n)
Definition: Rtypes.h:85
TFile::CurrentFile
static TFile *& CurrentFile()
Return the current ROOT file if any.
Definition: TFile.cxx:993
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TFileOpenHandle::~TFileOpenHandle
~TFileOpenHandle()
Definition: TFile.h:377
TFile::GetCompressionFactor
Float_t GetCompressionFactor()
Return the file compression factor.
Definition: TFile.cxx:1119
TFile::GetOnlyStaged
static Bool_t GetOnlyStaged()
Returns staged only flag.
Definition: TFile.cxx:4593
TFile::Delete
void Delete(const char *namecycle="") override
Delete object namecycle.
Definition: TFile.cxx:1024
TFile::GetStreamerInfoListImpl
virtual InfoListRet GetStreamerInfoListImpl(bool lookupSICache)
See documentation of GetStreamerInfoList for more details.
Definition: TFile.cxx:1291
TFile::fSum2Buffer
Double_t fSum2Buffer
Sum of squares of buffer sizes of objects written so far.
Definition: TFile.h:75
TFile::IncrementProcessIDs
virtual void IncrementProcessIDs()
Definition: TFile.h:249
TFile::fgTsSIHashes
static ROOT::Internal::RConcurrentHashColl fgTsSIHashes
!TS Set of hashes built from read streamer infos
Definition: TFile.h:118
ROOT::RCompressionSetting::EAlgorithm::kUseGlobal
@ kUseGlobal
Use the global compression algorithm.
Definition: Compression.h:100
TFile::kAOSNotAsync
@ kAOSNotAsync
Definition: TFile.h:65
TFile::MakeFree
virtual void MakeFree(Long64_t first, Long64_t last)
Mark unused bytes on the file.
Definition: TFile.cxx:1397
TUrl
Definition: TUrl.h:33
TFile::fgCacheFileDir
static TString fgCacheFileDir
Directory where to locally stage files.
Definition: TFile.h:123
TFile::AsyncOpen
static TFileOpenHandle * AsyncOpen(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Submit an asynchronous open request.
Definition: TFile.cxx:4184
TFile
Definition: TFile.h:54
unsigned int
TFileCacheRead
Definition: TFileCacheRead.h:22
TFile::Print
void Print(Option_t *option="") const override
Print all objects in the file.
Definition: TFile.cxx:1570
TFile::MakeProjectParProofInf
Int_t MakeProjectParProofInf(const char *packname, const char *proofinfdir)
Create BUILD.sh and SETUP.C under 'proofinf' for PAR package 'pack'.
Definition: TFile.cxx:3350
TArrayC
Definition: TArrayC.h:27
TFile::fgCacheFileDisconnected
static Bool_t fgCacheFileDisconnected
Indicates, we trust in the files in the cache dir without stat on the cached file.
Definition: TFile.h:124
TFilePrefetch
Definition: TFilePrefetch.h:33
TKey
Definition: TKey.h:28
TFile::ReadBuffers
virtual Bool_t ReadBuffers(char *buf, Long64_t *pos, Int_t *len, Int_t nbuf)
Read the nbuf blocks described in arrays pos and len.
Definition: TFile.cxx:1685
TFile::fEND
Long64_t fEND
Last used byte in file.
Definition: TFile.h:80
TFileOpenHandle::fCompress
Int_t fCompress
Compression level and algorithm.
Definition: TFile.h:362
TFile::GetNProcessIDs
virtual Int_t GetNProcessIDs() const
Definition: TFile.h:231
TFileOpenHandle::fNetOpt
Int_t fNetOpt
Network options.
Definition: TFile.h:363
TFile::ReadBufferViaCache
Int_t ReadBufferViaCache(char *buf, Int_t len)
Read buffer via cache.
Definition: TFile.cxx:1753
TFile::fOption
TString fOption
File options.
Definition: TFile.h:92
TFile::SetOption
virtual void SetOption(Option_t *option=">")
Definition: TFile.h:281
TFile::fgOnlyStaged
static Bool_t fgOnlyStaged
Before the file is opened, it is checked, that the file is staged, if not, the open fails.
Definition: TFile.h:127
TBasket
Definition: TBasket.h:34
TFile::ReadStreamerInfo
virtual void ReadStreamerInfo()
Read the list of StreamerInfo from this file.
Definition: TFile.cxx:3469
TFileOpenHandle::GetOpt
const char * GetOpt() const
Definition: TFile.h:381
TFile::MustFlush
virtual Bool_t MustFlush() const
Definition: TFile.h:261
TFile::GetFd
Int_t GetFd() const
Definition: TFile.h:226
TFile::kAOSFailure
@ kAOSFailure
Definition: TFile.h:65
TFile::Copy
void Copy(TObject &) const override
Copy this to obj.
Definition: TFile.h:201
Double_t
double Double_t
Definition: RtypesCore.h:59
TFile::fAsyncOpenStatus
EAsyncOpenStatus fAsyncOpenStatus
!Status of an asynchronous open request
Definition: TFile.h:110
TFile::GetStreamerInfoCache
const TList * GetStreamerInfoCache()
Returns the cached list of StreamerInfos used in this file.
Definition: TFile.cxx:1281
TFile::kInstantTimeout
@ kInstantTimeout
Definition: TFile.h:68
TFile::SetOnlyStaged
static Bool_t SetOnlyStaged(Bool_t onlystaged)
Sets only staged flag.
Definition: TFile.cxx:4583
TFile::FlushWriteCache
Bool_t FlushWriteCache()
Flush the write cache if active.
Definition: TFile.cxx:1075
TFile::fgFileCounter
static std::atomic< Long64_t > fgFileCounter
Counter for all opened files.
Definition: TFile.h:131
TFile::kFile
@ kFile
Definition: TFile.h:194
TFile::fgBytesWrite
static std::atomic< Long64_t > fgBytesWrite
Number of bytes written by all TFile objects.
Definition: TFile.h:129
TFile::DirReadKeys
virtual Int_t DirReadKeys(TDirectory *)
Definition: TFile.h:167
TCollection::GetSize
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
TFile::fgReadCalls
static std::atomic< Int_t > fgReadCalls
Number of bytes read from all TFile objects.
Definition: TFile.h:132
TClass
Definition: TClass.h:80
TFile::fNoAnchorInName
Bool_t fNoAnchorInName
!True if we don't want to force the anchor to be appended to the file name
Definition: TFile.h:104
TStopwatch
Definition: TStopwatch.h:28
TObject
Definition: TObject.h:37
TFile::WriteProcessID
virtual UShort_t WriteProcessID(TProcessID *pid)
Check if the ProcessID pidd is already in the file, if not, add it and return the index number in the...
Definition: TFile.cxx:3625
TFile::GetFileCounter
static Long64_t GetFileCounter()
Definition: TFile.cxx:4456
TFile::Close
void Close(Option_t *option="") override
Close a file.
Definition: TFile.cxx:876
TFile::SetCacheWrite
virtual void SetCacheWrite(TFileCacheWrite *cache)
Set a pointer to the write cache.
Definition: TFile.cxx:2252
TFile::GetCompressionLevel
Int_t GetCompressionLevel() const
Definition: TFile.h:393
TFile::kMerge
@ kMerge
Definition: TFile.h:194
TFile::fMustFlush
Bool_t fMustFlush
!True if the file buffers must be flushed
Definition: TFile.h:107
TFile::GetCacheFileDir
static const char * GetCacheFileDir()
Get the directory where to locally stage/cache remote files.
Definition: TFile.cxx:4493
name
char name[80]
Definition: TGX11.cxx:110
TFile::kAOSSuccess
@ kAOSSuccess
Definition: TFile.h:66
TFileCacheWrite
Definition: TFileCacheWrite.h:19
TFile::GetCompressionSettings
Int_t GetCompressionSettings() const
Definition: TFile.h:399
TFile::kBinaryFile
@ kBinaryFile
Definition: TFile.h:187
TFile::MakeProjectParMake
Int_t MakeProjectParMake(const char *packname, const char *filename)
Create makefile at 'filemake' for PAR package 'pack'.
Definition: TFile.cxx:3228
TDirectory
Definition: TDirectory.h:40
TFile::fArchiveOffset
Long64_t fArchiveOffset
!Offset at which file starts in archive
Definition: TFile.h:102
TFile::fIsRootFile
Bool_t fIsRootFile
!True is this is a ROOT file, raw file otherwise
Definition: TFile.h:105
TFree
Definition: TFree.h:27
TFile::fFree
TList * fFree
Free segments linked list table.
Definition: TFile.h:94
TFile::GetNbytesInfo
virtual Int_t GetNbytesInfo() const
Definition: TFile.h:240
TFile::GetEND
virtual Long64_t GetEND() const
Definition: TFile.h:223
TFile::fgReadaheadSize
static Int_t fgReadaheadSize
Readahead buffer size.
Definition: TFile.h:133
TFile::DirWriteKeys
virtual void DirWriteKeys(TDirectory *)
Definition: TFile.h:168
TFile::WriteHeader
virtual void WriteHeader()
Write File Header.
Definition: TFile.cxx:2479
R__EXTERN
#define R__EXTERN
Definition: DllImport.h:27
TFile::fNbytesFree
Int_t fNbytesFree
Number of bytes for free segments structure.
Definition: TFile.h:86
TFile::fgCacheFileForce
static Bool_t fgCacheFileForce
Indicates, to force all READ to CACHEREAD.
Definition: TFile.h:125
TFile::~TFile
virtual ~TFile()
File destructor.
Definition: TFile.cxx:502
TFileOpenHandle::TFileOpenHandle
TFileOpenHandle(const char *n, const char *o, const char *t, Int_t cmp, Int_t no)
Definition: TFile.h:368
TFile::kStartBigFile
@ kStartBigFile
Definition: TFile.h:192
TFile::Recover
virtual Int_t Recover()
Attempt to recover file if not correctly closed.
Definition: TFile.cxx:1912
TFile::GetCacheWrite
TFileCacheWrite * GetCacheWrite() const
Return a pointer to the current write cache.
Definition: TFile.cxx:1196
TFile::kEternalTimeout
@ kEternalTimeout
Definition: TFile.h:68
TFile::GetListOfFree
TList * GetListOfFree() const
Definition: TFile.h:229
TFile::fOpenPhases
TList * fOpenPhases
!Time info about open phases
Definition: TFile.h:114
TDirectoryFile
Definition: TDirectoryFile.h:32
TFile::SetOpenTimeout
static UInt_t SetOpenTimeout(UInt_t timeout)
Sets open timeout time (in ms). Returns previous timeout value.
Definition: TFile.cxx:4563
TFile::GetBytesReadExtra
virtual Long64_t GetBytesReadExtra() const
Definition: TFile.h:234
Char_t
char Char_t
Definition: RtypesCore.h:33
TFile::EAsyncOpenStatus
EAsyncOpenStatus
Asynchronous open request status.
Definition: TFile.h:65
TFileOpenHandle::fFile
TFile * fFile
TFile instance of the file being opened.
Definition: TFile.h:364
TFile::fCacheWrite
TFileCacheWrite * fCacheWrite
!Pointer to the write cache (if any)
Definition: TFile.h:101
TFile::Sizeof
Int_t Sizeof() const override
Return the size in bytes of the file header.
Definition: TFile.cxx:2261
TFile::Matches
virtual Bool_t Matches(const char *name)
Return kTRUE if 'url' matches the coordinates of this file.
Definition: TFile.cxx:4605
ROOT
VSD Structures.
Definition: StringConv.hxx:21
TUrl.h
TFile::GetAsyncOpenStatus
virtual EAsyncOpenStatus GetAsyncOpenStatus()
Definition: TFile.h:136
ROOT::Internal::RConcurrentHashColl::HashValue
Definition: RConcurrentHashColl.hxx:38
TFile::fWritten
Int_t fWritten
Number of objects written so far.
Definition: TFile.h:88
TObject::EStatusBits
EStatusBits
Definition: TObject.h:57
TFile::fOffset
Long64_t fOffset
!Seek offset cache
Definition: TFile.h:97
TFile::fInitDone
Bool_t fInitDone
!True if the file has been initialized
Definition: TFile.h:106
TFile::GetEndpointUrl
virtual const TUrl * GetEndpointUrl() const
Definition: TFile.h:227
TFile::fAsyncHandle
TFileOpenHandle * fAsyncHandle
!For proper automatic cleanup
Definition: TFile.h:109
TFile::GetCacheRead
TFileCacheRead * GetCacheRead(const TObject *tree=nullptr) const
Return a pointer to the current read cache.
Definition: TFile.cxx:1179
TList
Definition: TList.h:44
TFile::Flush
virtual void Flush()
Synchronize a file's in-memory and on-disk states.
Definition: TFile.cxx:1058
TFile::SetFileBytesRead
static void SetFileBytesRead(Long64_t bytes=0)
Definition: TFile.cxx:4447
TFile::kHasReferences
@ kHasReferences
Definition: TFile.h:184
TFile::SetCacheRead
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
Definition: TFile.cxx:2229
TFile::SetOffset
virtual void SetOffset(Long64_t offset, ERelativeTo pos=kBeg)
Set position from where to start reading.
Definition: TFile.cxx:2117
TFile::DrawMap
virtual void DrawMap(const char *keys="*", Option_t *option="")
Draw map of objects in this file.
Definition: TFile.cxx:1045
int
TFile::fCacheRead
TFileCacheRead * fCacheRead
!Pointer to the read cache (if any)
Definition: TFile.h:99
TMap
Definition: TMap.h:40
TFile::SetCompressionSettings
virtual void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Used to specify the compression level and algorithm.
Definition: TFile.cxx:2202