61 , fModified(
kFALSE), fWritable(
kFALSE), fNbytesKeys(0), fNbytesName(0)
62 , fBufferSize(0), fSeekDir(0), fSeekParent(0), fSeekKeys(0)
81 , fModified(
kFALSE), fWritable(
kFALSE), fNbytesKeys(0), fNbytesName(0)
82 , fBufferSize(0), fSeekDir(0), fSeekParent(0), fSeekKeys(0)
88 if (initMotherDir==0) initMotherDir =
gDirectory;
90 if (strchr(
name,
'/')) {
91 ::Error(
"TDirectoryFile",
"directory name (%s) cannot contain a slash",
name);
96 ::Error(
"TDirectoryFile",
"directory name cannot be \"\"");
101 Build(initMotherDir ? initMotherDir->
GetFile() : 0, initMotherDir);
106 if ((motherdir==0) || (f==0))
return;
108 if (motherdir->GetKey(
name)) {
109 Error(
"TDirectoryFile",
"An object with name %s exists already",
name);
116 Error(
"TDirectoryFile",
"Invalid class name: %s",classname);
131 gROOT->GetUUIDs()->AddUUID(fUUID,
this);
201 Info(
"~TDirectoryFile",
"dtor called for %s",
GetName());
213 if (obj == 0 ||
fList == 0)
return;
264 TKey *key = 0, *keyo = 0;
270 while ((obj = nextin())) {
276 while ((key = (
TKey *) next())) {
278 if (!keyo || (keyo && strcmp(keyo->GetName(), key->
GetName()))) {
308 if (motherDir && strlen(
GetName()) != 0) motherDir->
Append(
this);
372 char *pobj = (
char*)obj->IsA()->New();
376 if (baseOffset==-1) {
380 Fatal(
"CloneObject",
"Incorrect detection of the inheritance from TObject for class %s.\n",
392 const Int_t bufsize = 10000;
399 ((
TObject*)obj)->Streamer(buffer);
409 newobj->Streamer(buffer);
432 while ((f = (
TFile*)next())) {
460 if (apath) nch = strlen(apath);
465 if (funcname==0 || strlen(funcname)==0) funcname =
"GetDirectory";
469 char *path =
new char[nch+1]; path[0] = 0;
470 if (nch) strlcpy(path,apath,nch+1);
471 char *s = (
char*)strchr(path,
':');
476 if (!f && !strcmp(
gROOT->GetName(), path)) f =
gROOT;
480 if (s && *(s+1)) result = f->
GetDirectory(s+1,printError,funcname);
481 delete [] path;
return result;
483 if (printError)
Error(funcname,
"No such file %s", path);
484 delete [] path;
return 0;
489 if (path[0] ==
'/') {
493 delete [] path;
return result;
497 char *
slash = (
char*)strchr(path,
'/');
499 if (!strcmp(path,
"..")) {
501 delete [] path;
return result;
505 if (printError)
Error(funcname,
"Unknown directory %s", path);
506 delete [] path;
return 0;
509 delete [] path;
return obj;
513 slash = (
char*)strchr(subdir.
Data(),
'/');
516 if (!strcmp(subdir,
"..")) {
520 delete [] path;
return result;
524 if (printError)
Error(funcname,
"Unknown directory %s", subdir.
Data());
525 delete [] path;
return 0;
529 delete [] path;
return result;
606 Info(
"Delete",
"Call for this = %s namecycle = %s",
607 GetName(), (namecycle ? namecycle :
"null"));
615 Int_t deletetree = 0;
616 if(strcmp(name,
"*") == 0) deleteall = 1;
617 if(strcmp(name,
"*T") == 0){ deleteall = 1; deletetree = 1;}
618 if(strcmp(name,
"T*") == 0){ deleteall = 1; deletetree = 1;}
619 if(namecycle==0 || !namecycle[0]){ deleteall = 1; deletetree = 1;}
626 if (cycle >= 9999 ) {
629 while ((idcur = (
TNamed *) next())) {
636 if (!deletetree && deleteall) deleteOK = 0;
645 idcur->
Delete(deletetree ?
"T*;*" :
"*");
658 if (cycle != 9999 ) {
662 while ((key = (
TKey *) nextkey())) {
666 if (cycle == key->
GetCycle()) deleteOK = 1;
667 if (cycle > 9999) deleteOK = 1;
671 if (!deletetree && deleteall) deleteOK = 0;
672 if (cycle == key->
GetCycle()) deleteOK = 2;
708 Version_t version = TDirectoryFile::Class_Version();
719 tobuf(buffer, version);
724 if (version > 1000) {
747 return GetKey(name,cycle);
767 while ((key = (
TKey *) next())) {
768 if (!strcmp(name, key->
GetName()))
769 if ((cycle == 9999) || (cycle >= key->
GetCycle())) {
776 while ((key = (
TKey *) next())) {
785 if (dirsav) dirsav->
cd();
812 while ((key = (
TKey *) next())) {
813 if (!strcmp(name, key->
GetName())) {
814 if (cycle == 9999)
return key->
ReadObj();
820 while ((key = (
TKey *) next())) {
826 if (k) {
if (dirsav) dirsav->
cd();
return k->
ReadObj();}
829 if (dirsav) dirsav->
cd();
891 Int_t nch = strlen(name);
892 for (
Int_t i = nch-1; i > 0; i--) {
893 if (name[i] ==
'/') {
896 const char *subnamecycle = namecycle + i + 1;
898 return dirToSearch?dirToSearch->
Get(subnamecycle):0;
901 const char *namobj =
name;
907 if (idcur==
this && strlen(namobj)!=0) {
912 }
else if (cycle == 9999) {
926 while ((key = (
TKey *) nextkey())) {
927 if (strcmp(namobj,key->
GetName()) == 0) {
928 if ((cycle == 9999) || (cycle == key->
GetCycle())) {
996 Int_t nch = strlen(name);
997 for (
Int_t i = nch-1; i > 0; i--) {
998 if (name[i] ==
'/') {
1001 const char *subnamecycle = namecycle + i + 1;
1010 const char *namobj =
name;
1014 if (expectedClass==0 || expectedClass->
IsTObject()) {
1017 if (objcur==
this && strlen(namobj)!=0) {
1022 }
else if (cycle == 9999) {
1024 if (expectedClass && objcur->IsA()->GetBaseClassOffset(expectedClass) == -1)
return 0;
1040 while ((key = (
TKey *) nextkey())) {
1041 if (strcmp(namobj,key->
GetName()) == 0) {
1042 if ((cycle == 9999) || (cycle == key->
GetCycle())) {
1077 while (( key = (
TKey *)next() )) {
1079 if ((cycle == 9999) || (cycle >= key->
GetCycle()))
1114 reg = opt(2,opt.
Length());
1118 reg = opt(2,opt.
Length());
1119 }
else if (!opt.
IsNull())
1127 while ((obj = (
TObject *) nextobj())) {
1137 while ((key = (
TKey *) next())) {
1166 if (!
name || !title || !
name[0])
return 0;
1167 if (!title[0]) title =
name;
1169 Error(
"mkdir",
"An object with name %s exists already",
name);
1173 if (
const char *
slash = strchr(
name,
'/')) {
1175 char *workname =
new char[size+1];
1176 strncpy(workname,
name, size);
1182 if (!tmpdir)
return 0;
1184 if (!newdir) newdir = tmpdir;
1212 while ((key = (
TKey*)prev())) {
1214 if (!keyprev)
break;
1246 Bool_t readdirs = ((opt!=0) && ((strcmp(opt,
"dirs")==0) || (strcmp(opt,
"dirs*")==0)));
1249 while ((key = (
TKey *) next())) {
1252 if (strstr(key->
GetClassName(),
"TDirectory")==0)
continue;
1256 if ((dir!=0) && (strcmp(opt,
"dirs*")==0)) dir->
ReadAll(
"dirs*");
1259 while ((key = (
TKey *) next())) {
1261 if (thing) {
delete thing; }
1294 if (
fFile==0)
return 0;
1307 char *header =
new char[nbytes];
1322 if (versiondir > 1000) {
1327 Int_t sdir,sparent,skeys;
1345 for (
Int_t i = 0; i < nkeys; i++) {
1346 key =
new TKey(
this);
1349 Error(
"ReadKeys",
"reading illegal key, exiting after %d keys",i);
1355 Error(
"ReadKeys",
"reading illegal key, exiting after %d keys",i);
1380 if (!
fFile) {
Error(
"Read",
"No file open");
return 0; }
1383 while ((key = (
TKey *) nextkey())) {
1384 if (strcmp(keyname,key->
GetName()) == 0) {
1385 return key->
Read(obj);
1388 Error(
"Read",
"Key not found");
1431 while ((idcur = next())) {
1448 if ((name==0) || (*name==0))
return;
1468 while ((idcur = next())) {
1495 if (!filename || !filename[0]) {
1499 if (fname.
Index(
".json") > 0) {
1503 if (!local)
return 0;
1504 nbytes = obj->
Write();
1506 if (dirsav) dirsav->
cd();
1539 if (dirsav !=
this)
cd();
1542 if (dirsav && dirsav !=
this) dirsav->
cd();
1569 Int_t offset = (
char*)ref - (
char*)parent;
1570 TClass *cl = parent->IsA();
1576 if (element->GetOffset() != offset)
continue;
1578 if (execid > 0) ref->
SetBit(execid << 8);
1596 while ((idcur = next())) {
1625 void TDirectoryFile::Streamer(
TBuffer &b)
1665 if (version > 1000) {
1671 Int_t sdir,sparent,skeys;
1709 version = TDirectoryFile::Class_Version();
1716 if (version > 1000) {
1726 if (version <=1000)
for (
Int_t i=0;i<3;i++) b <<
Int_t(0);
1748 while ((obj=next())) {
1749 nbytes += obj->
Write(0,opt,bufsize);
1761 Error(
"Write const",
"A const TDirectory object should not be saved. We try to proceed anyway.");
1814 const char *objname =
"no name specified";
1816 else if (obj) objname = obj->
GetName();
1817 Error(
"WriteTObject",
"The current directory (%s) is not associated with a file. The object (%s) has not been written.",
GetName(),objname);
1834 TKey *key=0, *oldkey=0;
1836 if (bufsize > 0) bsize = bufsize;
1845 Int_t nch = strlen(oname);
1847 if (nch && oname[nch-1] ==
' ') {
1848 newName =
new char[nch+1];
1849 strlcpy(newName,oname,nch+1);
1850 for (
Int_t i=0;i<nch;i++) {
1851 if (newName[nch-i-1] !=
' ')
break;
1852 newName[nch-i-1] = 0;
1870 if (newName)
delete [] newName;
1929 Error(
"WriteObjectAny",
"Unknown class: %s",classname);
1953 if (
fFile==0)
return 0;
1956 Error(
"WriteObject",
"Unknown type for %s, it can not be written.",
name);
1970 const char *className = cl->
GetName();
1978 Error(
"WriteObjectAny",
1979 "The class requested (%s) for the key name \"%s\"" 1980 " is an instance of an stl collection and does not have a compiled CollectionProxy." 1981 " Please generate the dictionary for this collection (%s). No data will be written.",
1982 className, oname, className);
1986 TKey *key, *oldkey=0;
1988 if (bufsize > 0) bsize = bufsize;
1994 Int_t nch = strlen(oname);
1996 if (nch && oname[nch-1] ==
' ') {
1997 newName =
new char[nch+1];
1998 strlcpy(newName,oname,nch+1);
1999 for (
Int_t i=0;i<nch;i++) {
2000 if (newName[nch-i-1] !=
' ')
break;
2001 newName[nch-i-1] = 0;
2019 if (newName)
delete [] newName;
2053 char * header =
new char[nbytes];
2054 char * buffer = header;
2088 Int_t nbytes =
sizeof nkeys;
2090 while ((key = (
TKey*)next())) {
2100 tobuf(buffer, nkeys);
2101 while ((key = (
TKey*)next())) {
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
TDatime fDatimeM
Date and time of last modification.
Describe Streamer information for one class version.
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 DirWriteKeys(TDirectory *)
virtual const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void ReadAll(Option_t *option="")
Read objects from a ROOT file directory into memory.
std::string GetName(const std::string &scope_name)
void SetBufferOffset(Int_t offset=0)
virtual TDirectory * mkdir(const char *name, const char *title="")
Create a sub-directory and return a pointer to the created directory.
void frombuf(char *&buf, Bool_t *x)
virtual void ReadAll(Option_t *="")
static Int_t DecreaseDirLevel()
Decrease the indentation level for ls().
virtual void ClassBegin(const TClass *, Version_t=-1)=0
virtual TObject * CloneObject(const TObject *obj, Bool_t autoadd=kTRUE)
Make a clone of an object using the Streamer facility.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void SetBufferSize(Int_t bufsize)
Set the default buffer size when creating new TKeys.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual TKey * FindKey(const char *keyname) const
Find key with name keyname in the current directory.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
This class implements a shared memory region mapped to a file.
void Set()
Set Date/Time to current time as reported by the system.
Long64_t fSeekParent
Location of parent directory on file.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
virtual void CleanTargets()
Clean the pointers to this object (gDirectory, TContext, etc.)
virtual TClass * GetClass() const =0
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 TDirectory * GetMotherDir() const
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.
TObject * GetParent() const
Return pointer to parent of this buffer.
virtual void Flush()
Synchronize a file's in-memory and on-disk states.
virtual char * GetBuffer() const
virtual TKey * CreateKey(TDirectory *mother, const TObject *obj, const char *name, Int_t bufsize)
Creates key for object and converts data to buffer.
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...
Bool_t TestBit(UInt_t f) const
virtual const char * GetClassName() const
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.
virtual void Seek(Long64_t offset, ERelativeTo pos=kBeg)
Seek to a specific position in the file. Pos it either kBeg, kCur or kEnd.
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
virtual void DirWriteHeader(TDirectory *)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual Bool_t ReadBuffer(char *buf, Int_t len)
Read a buffer from the file.
virtual void * ReadObjectAny(const TClass *expectedClass)
To read an object (non deriving from TObject) from the file.
Buffer base class used for serializing objects.
Regular expression class.
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
void ToLower()
Change string to lower-case.
R__EXTERN TVirtualMutex * gROOTMutex
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.
void MapObject(const TObject *obj, UInt_t offset=1)
Add object to the fMap container.
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
void ReadBuffer(char *&buffer)
Decode Date/Time from output buffer, used by I/O system.
Streamer around an arbitrary STL like container, which implements basic container functionality...
virtual void FillBuffer(char *&buffer)
Encode key header into output buffer.
virtual void FillBuffer(char *&buffer)
Encode directory header into output buffer.
virtual Int_t Sizeof() const
Return the size in bytes of the key header structure.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
void SumBuffer(Int_t bufsize)
Increment statistics for buffer sizes of objects in this file.
virtual void * GetObjectChecked(const char *namecycle, const char *classname)
See documentation of TDirectory::GetObjectCheck(const char *namecycle, const TClass *cl) ...
if object in a list can be deleted
virtual Int_t WriteTObject(const TObject *obj, const char *name=0, Option_t *option="", Int_t bufsize=0)
Write object obj to this directory.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual void ls(Option_t *option="") const
List Key contents.
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Int_t GetExecID() const
Returns the TExec id for the EXEC instruction in the comment field of a TRef data member...
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.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual void WriteFree()
Write FREE linked list on the file.
virtual void Copy(TObject &object) const
Copy this to obj.
The TNamed class is the base class for all named ROOT classes.
void Init(TClassEdit::TInterpreterLookupHelper *helper)
Short_t GetKeep() const
Returns the "KEEP" status.
void FillBuffer(char *&buffer)
Encode Date/Time into buffer, used by I/O system.
virtual void WriteKeys()
Write Keys linked list on the file.
virtual Int_t WriteFile(Int_t cycle=1, TFile *f=0)
Write the encoded object supported by this key.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual TList * GetList() const
void tobuf(char *&buf, Bool_t x)
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.
virtual void Delete(Option_t *option="")
Delete an object from the file.
void Error(const char *location, const char *msgfmt,...)
virtual TFile * GetFile() const
virtual void ls(Option_t *option="") const
The ls function lists the contents of a class on stdout.
void GetObject(const char *namecycle, T *&ptr)
virtual void Delete(const char *namecycle="")
Delete Objects or/and keys in a directory.
void Add(const TObject *obj, const char *name="")
Add an object to the list of objects to be stored in shared memory.
virtual Long64_t DirCreateEntry(TDirectory *)
void ResetMap()
Delete existing fMap and reset map counter.
virtual void ls(Option_t *option="") const
List Directory contents.
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
virtual void Delete(Option_t *option="")
Delete this object.
Using a TBrowser one can browse all ROOT objects.
virtual void SaveSelf(Bool_t force=kFALSE)
Save Directory keys and header.
static Int_t ExportToFile(const char *filename, const TObject *obj, const char *option=0)
Convert object into JSON and store in text file Returns size of the produce file Used in TObject::Sav...
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
R__EXTERN TSystem * gSystem
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).
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual Bool_t WriteBuffer(const char *buf, Int_t len)
Write a buffer to the file.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual Bool_t MustFlush() const
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual Bool_t ReadFile()
Read the key structure from the file.
virtual Long64_t GetSeekPdir() const
virtual void MakeFree(Long64_t first, Long64_t last)
Mark unused bytes on the file.
Int_t fNbytesName
Number of bytes in TNamed at creation time.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual Int_t DirReadKeys(TDirectory *)
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
void SetReadMode()
Set buffer in read mode.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
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".
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
static TFile *& CurrentFile()
Return the current ROOT file if any.
virtual TObjLink * FirstLink() const
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 TKey * FindKeyAny(const char *) const
#define R__LOCKGUARD2(mutex)
virtual void WriteDirHeader()
Overwrite the Directory header record.
virtual Int_t AppendKey(TKey *)
void SetMotherDir(TDirectory *dir)
void ReadKeyBuffer(char *&buffer)
Decode input buffer.
TFile * fFile
Pointer to current file in memory.
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 TObject * FindObjectAnyFile(const char *name) const
Scan the memory lists of all files for an object with name.
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE)
Read the linked list of keys.
virtual Long64_t GetSeekKey() const
virtual Int_t GetBufferSize() const
Return the buffer size to create new TKeys.
TDirectoryFile()
Default Constructor.
Describe directory structure in memory.
void StreamerV1(TBuffer &b)
Stream UUID from input buffer.
Wrapper around a TObject so it can be stored in a TList.
virtual Long64_t GetSize() const
Returns the current file size.
void SetWritable(Bool_t writable=kTRUE)
Set the new value of fWritable recursively.
double func(double *x, double *p)
virtual TFile * GetFile() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static void DecodeNameCycle(const char *namecycle, char *name, Short_t &cycle, const size_t namesize=0)
Decode a namecycle "aap;2" into name "aap" and cycle "2".
virtual void * GetObjectChecked(const char *namecycle, const char *classname)
See documentation of TDirectoryFile::GetObjectCheck(const char *namecycle, const TClass *cl) ...
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void Close(Option_t *option="")
Delete all objects from memory and directory structure itself.
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
Mother of all ROOT objects.
TObjArray * GetElements() const
virtual void rmdir(const char *name)
Removes subdirectory from the directory.
virtual Long64_t GetEND() const
Bool_t fModified
True if directory has been modified.
TObject * GetObject() const
static Int_t IncreaseDirLevel()
Increase the indentation level for ls().
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void Add(TObject *obj)
void(* DirAutoAdd_t)(void *, TDirectory *)
virtual void ClassEnd(const TClass *)=0
TList * GetListOfFree() const
virtual TList * GetListOfKeys() const
virtual TDirectory * GetDirectory(const char *namecycle, Bool_t printError=false, const char *funcname="GetDirectory")
Find a directory using apath.
TDirectory()
Directory default constructor.
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
if object is referenced by a TRef or TRefArray
void FillBuffer(char *&buffer)
Stream UUID into output buffer.
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset the TDirectory after its content has been merged into another Directory.
virtual Long64_t GetSeekDir() const
virtual Int_t Read(const char *name)
Read contents of object with specified name from the current directory.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void WriteHeader()
Write File Header.
Bool_t IsWritable() const
const Bool_t kIterBackward
Short_t GetCycle() const
Return cycle number associated to this key.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
Abstract Interface class describing Streamer information for one class.
static char * skip(char **buf, const char *delimiters)
virtual void CleanTargets()
Clean the pointers to this object (gDirectory, TContext, etc.).
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
Int_t GetBestBuffer() const
Return the best buffer size of objects on this file.
virtual const char * GetTitle() const
Returns title of object.
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.
const char * Data() const
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...