12#ifndef ROOT_TDirectoryFile
13#define ROOT_TDirectoryFile
74 void Delete(
const char *namecycle=
"")
override;
82 template <
class T>
inline T*
Get(
const char* namecycle)
107 Int_t netopt = 0)
override;
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
short Short_t
Signed Short integer 2 bytes (short).
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
#define ClassDefOverride(name, id)
Using a TBrowser one can browse all ROOT objects.
TClass instances represent classes, structs and namespaces in the ROOT type system.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
void SetModified() override
void SetBufferSize(Int_t bufsize) override
void SetTRefAction(TObject *ref, TObject *parent) override
void Close(Option_t *option="") override
Delete all objects from memory and directory structure itself.
Long64_t GetSeekDir() const override
Bool_t cd() override
Change current directory to "this" directory.
TFile * fFile
Pointer to current file in memory.
void Browse(TBrowser *b) override
Browse the content of the directory.
void Append(TObject *obj, Bool_t replace=kFALSE) override
Append object to this directory.
void SaveSelf(Bool_t force=kFALSE) override
Bool_t IsWritable() const override
Int_t GetNbytesKeys() const override
void Delete(const char *namecycle="") override
Delete Objects or/and keys in a directory.
Long64_t GetSeekKeys() const override
virtual void ResetAfterMerge(TFileMergeInfo *)
T * Get(const char *namecycle)
See documentation of TDirectoryFile::Get(const char *namecycle).
Int_t AppendKey(TKey *key) override
TDirectoryFile(const TDirectoryFile &directory)=delete
Int_t ReadKeys(Bool_t forceRead=kTRUE) override
TDatime fDatimeM
Date and time of last modification.
void * GetObjectUnchecked(const char *namecycle) override
Return pointer to object identified by namecycle.
TKey * FindKey(const char *keyname) const override
TKey * GetKey(const char *name, Short_t cycle=9999) const override
void * GetObjectChecked(const char *namecycle, const char *classname) override
See documentation of TDirectory::GetObjectCheck(const char *namecycle, const TClass *cl).
void Add(TObject *obj, Bool_t replace=kFALSE) override
Append object to this directory.
void InitDirectoryFile(TClass *cl=nullptr)
void Purge(Short_t nkeep=1) override
~TDirectoryFile() override
TDirectoryFile(const char *name, const char *title, Option_t *option="", TDirectory *motherDir=nullptr)
const TDatime & GetCreationDate() const
TObject * FindObjectAnyFile(const char *name) const override
Int_t fNbytesKeys
Number of bytes for the keys.
Int_t GetNkeys() const override
Bool_t IsModified() const override
Long64_t GetSeekParent() const override
void Copy(TObject &) const override
Copy this to obj.
Bool_t fModified
True if directory has been modified.
TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE) override
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
TList * GetListOfKeys() const override
TObject * FindObjectAny(const char *name) const override
Find object by name in the list of memory objects of the current directory or its sub-directories.
Long64_t fSeekKeys
Location of Keys record on file.
const TDatime & GetModificationDate() const
void WriteKeys() override
TFile * GetFile() const override
Int_t fBufferSize
Default buffer size to create new TKeys.
Int_t Sizeof() const override
Return size of the TNamed part of the TObject.
TObject * CloneObject(const TObject *obj, Bool_t autoadd=kTRUE) override
Clone an object.
TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory") override
Find a directory using apath.
Long64_t fSeekParent
Location of parent directory on file.
Int_t WriteObjectAny(const void *obj, const char *classname, const char *name, Option_t *option="", Int_t bufsize=0) override
void BuildDirectoryFile(TFile *motherFile, TDirectory *motherDir)
void rmdir(const char *name) override
Removes subdirectory from the directory When directory is deleted, all keys in all subdirectories wil...
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override
Write this object to the current directory.
Long64_t fSeekDir
Location of directory on file.
void * GetObjectChecked(const char *namecycle, const TClass *cl) override
Return pointer to object identified by namecycle if and only if the actual object is a type suitable ...
Int_t fNbytesName
Number of bytes in TNamed at creation time.
Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) const override
Write this object to the current directory.
TDatime fDatimeC
Date and time when directory is created.
Bool_t fWritable
True if directory is writable.
Int_t WriteTObject(const TObject *obj, const char *name=nullptr, Option_t *option="", Int_t bufsize=0) override
Bool_t cd(const char *path) override
Change current directory to "this" directory or to the directory described by the path if given one.
void SetSeekDir(Long64_t v) override
Int_t ReadTObject(TObject *obj, const char *keyname) override
TFile * OpenFile(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0) override
Int_t GetBufferSize() const override
Int_t SaveObjectAs(const TObject *obj, const char *filename="", Option_t *option="") const override
Save object in filename, if filename is nullptr or "", a file with "<objectname>.root" is created.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
void operator=(const TDirectoryFile &)=delete
TKey * FindKeyAny(const char *keyname) const override
void FillBuffer(char *&buffer) override
Encode TNamed into output buffer.
void WriteDirHeader() override
void SetWritable(Bool_t writable=kTRUE) override
void Build(TFile *motherFile=nullptr, TDirectory *motherDir=nullptr) override
void ReadAll(Option_t *option="") override
TList * fKeys
Pointer to keys list in memory.
void ls(Option_t *option="") const override
List Directory contents.
Int_t WriteObjectAny(const void *obj, const TClass *cl, const char *name, Option_t *option="", Int_t bufsize=0) override
TDirectory(const TDirectory &directory)=delete
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
A class to pass information from the TFileMerger to the objects being merged.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Book space in a file, create I/O buffers, to fill them, (un)compress them.
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...
TObject()
TObject constructor.
@ kUseCompiledDefault
Use the compile-time default setting.