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"));
612 const char *nmcy = (namecycle) ? namecycle :
"";
616 Int_t deletetree = 0;
617 if(strcmp(name,
"*") == 0) deleteall = 1;
618 if(strcmp(name,
"*T") == 0){ deleteall = 1; deletetree = 1;}
619 if(strcmp(name,
"T*") == 0){ deleteall = 1; deletetree = 1;}
620 if(namecycle==0 || !namecycle[0]){ deleteall = 1; deletetree = 1;}
627 if (cycle >= 9999 ) {
630 while ((idcur = (
TNamed *) next())) {
637 if (!deletetree && deleteall) deleteOK = 0;
646 idcur->
Delete(deletetree ?
"T*;*" :
"*");
659 if (cycle != 9999 ) {
663 while ((key = (
TKey *) nextkey())) {
667 if (cycle == key->
GetCycle()) deleteOK = 1;
668 if (cycle > 9999) deleteOK = 1;
672 if (!deletetree && deleteall) deleteOK = 0;
673 if (cycle == key->
GetCycle()) deleteOK = 2;
709 Version_t version = TDirectoryFile::Class_Version();
720 tobuf(buffer, version);
725 if (version > 1000) {
748 return GetKey(name,cycle);
768 while ((key = (
TKey *) next())) {
769 if (!strcmp(name, key->
GetName()))
770 if ((cycle == 9999) || (cycle >= key->
GetCycle())) {
777 while ((key = (
TKey *) next())) {
786 if (dirsav) dirsav->
cd();
813 while ((key = (
TKey *) next())) {
814 if (!strcmp(name, key->
GetName())) {
815 if (cycle == 9999)
return key->
ReadObj();
821 while ((key = (
TKey *) next())) {
827 if (k) {
if (dirsav) dirsav->
cd();
return k->
ReadObj();}
830 if (dirsav) dirsav->
cd();
892 Int_t nch = strlen(name);
893 for (
Int_t i = nch-1; i > 0; i--) {
894 if (name[i] ==
'/') {
897 const char *subnamecycle = namecycle + i + 1;
899 return dirToSearch?dirToSearch->
Get(subnamecycle):0;
902 const char *namobj =
name;
908 if (idcur==
this && strlen(namobj)!=0) {
913 }
else if (cycle == 9999) {
927 while ((key = (
TKey *) nextkey())) {
928 if (strcmp(namobj,key->
GetName()) == 0) {
929 if ((cycle == 9999) || (cycle == key->
GetCycle())) {
997 Int_t nch = strlen(name);
998 for (
Int_t i = nch-1; i > 0; i--) {
999 if (name[i] ==
'/') {
1002 const char *subnamecycle = namecycle + i + 1;
1011 const char *namobj =
name;
1015 if (expectedClass==0 || expectedClass->
IsTObject()) {
1018 if (objcur==
this && strlen(namobj)!=0) {
1023 }
else if (cycle == 9999) {
1025 if (expectedClass && objcur->IsA()->GetBaseClassOffset(expectedClass) == -1)
return 0;
1041 while ((key = (
TKey *) nextkey())) {
1042 if (strcmp(namobj,key->
GetName()) == 0) {
1043 if ((cycle == 9999) || (cycle == key->
GetCycle())) {
1078 while (( key = (
TKey *)next() )) {
1080 if ((cycle == 9999) || (cycle >= key->
GetCycle()))
1115 reg = opt(2,opt.
Length());
1119 reg = opt(2,opt.
Length());
1120 }
else if (!opt.
IsNull())
1128 while ((obj = (
TObject *) nextobj())) {
1138 while ((key = (
TKey *) next())) {
1168 if (!
name || !title || !
name[0])
return 0;
1169 if (!title[0]) title =
name;
1171 Error(
"mkdir",
"An object with name %s exists already",
name);
1175 if (
const char *
slash = strchr(
name,
'/')) {
1177 char *workname =
new char[size+1];
1178 strncpy(workname,
name, size);
1184 if (!tmpdir)
return 0;
1186 if (!newdir) newdir = tmpdir;
1214 while ((key = (
TKey*)prev())) {
1216 if (!keyprev)
break;
1248 Bool_t readdirs = ((opt!=0) && ((strcmp(opt,
"dirs")==0) || (strcmp(opt,
"dirs*")==0)));
1251 while ((key = (
TKey *) next())) {
1254 if (strstr(key->
GetClassName(),
"TDirectory")==0)
continue;
1258 if ((dir!=0) && (strcmp(opt,
"dirs*")==0)) dir->
ReadAll(
"dirs*");
1261 while ((key = (
TKey *) next())) {
1263 if (thing) {
delete thing; }
1296 if (
fFile==0)
return 0;
1309 char *header =
new char[nbytes];
1324 if (versiondir > 1000) {
1329 Int_t sdir,sparent,skeys;
1347 for (
Int_t i = 0; i < nkeys; i++) {
1348 key =
new TKey(
this);
1351 Error(
"ReadKeys",
"reading illegal key, exiting after %d keys",i);
1357 Error(
"ReadKeys",
"reading illegal key, exiting after %d keys",i);
1382 if (!
fFile) {
Error(
"Read",
"No file open");
return 0; }
1385 while ((key = (
TKey *) nextkey())) {
1386 if (strcmp(keyname,key->
GetName()) == 0) {
1387 return key->
Read(obj);
1390 Error(
"Read",
"Key not found");
1433 while ((idcur = next())) {
1450 if ((name==0) || (*name==0))
return;
1470 while ((idcur = next())) {
1497 if (!filename || !filename[0]) {
1501 if (fname.
Index(
".json") > 0) {
1505 if (!local)
return 0;
1506 nbytes = obj->
Write();
1508 if (dirsav) dirsav->
cd();
1541 if (dirsav !=
this)
cd();
1544 if (dirsav && dirsav !=
this) dirsav->
cd();
1571 Int_t offset = (
char*)ref - (
char*)parent;
1572 TClass *cl = parent->IsA();
1578 if (element->GetOffset() != offset)
continue;
1580 if (execid > 0) ref->
SetBit(execid << 8);
1598 while ((idcur = next())) {
1627 void TDirectoryFile::Streamer(
TBuffer &b)
1667 if (version > 1000) {
1673 Int_t sdir,sparent,skeys;
1711 version = TDirectoryFile::Class_Version();
1718 if (version > 1000) {
1728 if (version <=1000)
for (
Int_t i=0;i<3;i++) b <<
Int_t(0);
1750 while ((obj=next())) {
1751 nbytes += obj->
Write(0,opt,bufsize);
1763 Error(
"Write const",
"A const TDirectory object should not be saved. We try to proceed anyway.");
1816 const char *objname =
"no name specified";
1818 else if (obj) objname = obj->
GetName();
1819 Error(
"WriteTObject",
"The current directory (%s) is not associated with a file. The object (%s) has not been written.",
GetName(),objname);
1836 TKey *key=0, *oldkey=0;
1838 if (bufsize > 0) bsize = bufsize;
1847 Int_t nch = strlen(oname);
1849 if (nch && oname[nch-1] ==
' ') {
1850 newName =
new char[nch+1];
1851 strlcpy(newName,oname,nch+1);
1852 for (
Int_t i=0;i<nch;i++) {
1853 if (newName[nch-i-1] !=
' ')
break;
1854 newName[nch-i-1] = 0;
1872 if (newName)
delete [] newName;
1931 Error(
"WriteObjectAny",
"Unknown class: %s",classname);
1955 if (
fFile==0)
return 0;
1958 Error(
"WriteObject",
"Unknown type for %s, it can not be written.",
name);
1972 const char *className = cl->
GetName();
1980 Error(
"WriteObjectAny",
1981 "The class requested (%s) for the key name \"%s\"" 1982 " is an instance of an stl collection and does not have a compiled CollectionProxy." 1983 " Please generate the dictionary for this collection (%s). No data will be written.",
1984 className, oname, className);
1988 TKey *key, *oldkey=0;
1990 if (bufsize > 0) bsize = bufsize;
1996 Int_t nch = strlen(oname);
1998 if (nch && oname[nch-1] ==
' ') {
1999 newName =
new char[nch+1];
2000 strlcpy(newName,oname,nch+1);
2001 for (
Int_t i=0;i<nch;i++) {
2002 if (newName[nch-i-1] !=
' ')
break;
2003 newName[nch-i-1] = 0;
2021 if (newName)
delete [] newName;
2055 char * header =
new char[nbytes];
2056 char * buffer = header;
2090 Int_t nbytes =
sizeof nkeys;
2092 while ((key = (
TKey*)next())) {
2102 tobuf(buffer, nkeys);
2103 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 "a" or a hierarchy of sub-directories "a/b/c/...".
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.
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...