12 #ifndef ROOT_TDirectoryFile 13 #define ROOT_TDirectoryFile 24 #ifndef ROOT_TDirectory 71 virtual Bool_t cd(
const char *path = 0);
72 virtual void Delete(
const char *namecycle=
"");
80 template <
class T>
inline void GetObject(
const char* namecycle,
T*& ptr)
84 virtual void *
GetObjectChecked(
const char *namecycle,
const char* classname);
103 const char *ftitle =
"",
Int_t compress = 1,
110 virtual void rmdir(
const char *name);
TDatime fDatimeM
Date and time of last modification.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual Int_t Sizeof() const
Return the size in bytes of the directory header.
virtual void ReadAll(Option_t *option="")
Read objects from a ROOT file directory into memory.
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory and return a pointer to the created directory.
virtual TObject * CloneObject(const TObject *obj, Bool_t autoadd=kTRUE)
Make a clone of an object using the Streamer facility.
virtual void SetBufferSize(Int_t bufsize)
Set the default buffer size when creating new TKeys.
virtual TKey * FindKey(const char *keyname) const
Find key with name keyname in the current directory.
void SetSeekDir(Long64_t v)
Long64_t fSeekParent
Location of parent directory on file.
virtual void CleanTargets()
Clean the pointers to this object (gDirectory, TContext, etc.)
Long64_t fSeekKeys
Location of Keys record on file.
virtual Int_t ReadTObject(TObject *obj, const char *keyname)
Read object with keyname from the current directory.
virtual Int_t WriteObjectAny(const void *obj, const char *classname, const char *name, Option_t *option="", Int_t bufsize=0)
Write object from pointer of class classname in this directory.
virtual void Save()
Save recursively all directory keys and headers.
virtual void SetTRefAction(TObject *ref, TObject *parent)
Find the action to be executed in the dictionary of the parent class and store the corresponding exec...
Int_t fBufferSize
Default buffer size to create new TKeys.
virtual TKey * GetKey(const char *name, Short_t cycle=9999) const
Return pointer to key with name,cycle.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual Long64_t GetSeekKeys() const
virtual TKey * FindKeyAny(const char *keyname) const
Find key with name keyname in the current directory or its subdirectories.
virtual void * GetObjectUnchecked(const char *namecycle)
Return pointer to object identified by namecycle.
virtual Int_t Write(const char *name=0, Int_t opt=0, Int_t bufsize=0)
Write all objects in memory to disk.
virtual Int_t GetNkeys() const
virtual void FillBuffer(char *&buffer)
Encode directory header into output buffer.
const TDatime & GetCreationDate() const
virtual Int_t WriteTObject(const TObject *obj, const char *name=0, Option_t *option="", Int_t bufsize=0)
Write object obj to this directory.
TDatime fDatimeC
Date and time when directory is created.
void Init(TClass *cl=0)
Initialize the key associated with this directory (and the related data members.
#define ClassDef(name, id)
virtual void WriteKeys()
Write Keys linked list on the file.
static TClass * GetClass(const std::type_info &typeinfo)
Forward to TROOT::GetClass().
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
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...
virtual ~TDirectoryFile()
Destructor.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Long64_t fSeekDir
Location of directory on file.
void GetObject(const char *namecycle, T *&ptr)
const TDatime & GetModificationDate() const
virtual Int_t GetNbytesKeys() const
virtual void ls(Option_t *option="") const
List Directory contents.
void Add(TObject *obj, Bool_t replace=kFALSE)
Using a TBrowser one can browse all ROOT objects.
virtual void SaveSelf(Bool_t force=kFALSE)
Save Directory keys and header.
virtual void Copy(TObject &) const
Copy this to obj.
TList * fKeys
Pointer to keys list in memory.
virtual Int_t SaveObjectAs(const TObject *obj, const char *filename="", Option_t *option="") const
Save object in filename.
A ROOT file is structured in Directories (like a file system).
Int_t fNbytesName
Number of bytes in TNamed at creation time.
The ROOT global object gROOT contains a list of all defined classes.
virtual void Browse(TBrowser *b)
Browse the content of the directory.
virtual void Delete(const char *namecycle="")
Delete Objects or/and keys in a directory.
void Build(TFile *motherFile=0, TDirectory *motherDir=0)
Initialise directory to defaults.
virtual TDirectory * GetDirectory(const char *apath, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory named "apath".
Bool_t fWritable
True if directory is writable.
Int_t AppendKey(TKey *key)
Insert key in the linked list of keys of this directory.
virtual void WriteDirHeader()
Overwrite the Directory header record.
TFile * fFile
Pointer to current file in memory.
virtual TObject * FindObjectAnyFile(const char *name) const
Scan the memory lists of all files for an object with name.
virtual TObject * FindObjectAny(const char *name) const
Find object by name in the list of memory objects of the current directory or its sub-directories...
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE)
Read the linked list of keys.
virtual Int_t GetBufferSize() const
Return the buffer size to create new TKeys.
TDirectoryFile()
Default Constructor.
Describe directory structure in memory.
virtual Long64_t GetSeekParent() const
void SetWritable(Bool_t writable=kTRUE)
Set the new value of fWritable recursively.
virtual TFile * GetFile() const
virtual void * GetObjectChecked(const char *namecycle, const char *classname)
See documentation of TDirectoryFile::GetObjectCheck(const char *namecycle, const TClass *cl) ...
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
Mother of all ROOT objects.
virtual void rmdir(const char *name)
Removes subdirectory from the directory.
Bool_t fModified
True if directory has been modified.
virtual TList * GetListOfKeys() const
void operator=(const TDirectoryFile &)
virtual TFile * OpenFile(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Interface to TFile::Open.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset the TDirectory after its content has been merged into another Directory.
virtual Long64_t GetSeekDir() const
Bool_t IsWritable() const
virtual Int_t GetSize() const
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
Int_t fNbytesKeys
Number of bytes for the keys.
virtual void Purge(Short_t nkeep=1)
Purge lowest key cycles in a directory.
Bool_t IsModified() const