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)
96 if (initMotherDir==0) initMotherDir =
gDirectory;
98 if (strchr(
name,
'/')) {
99 ::Error(
"TDirectoryFile",
"directory name (%s) cannot contain a slash",
name);
104 ::Error(
"TDirectoryFile",
"directory name cannot be \"\"");
109 Build(initMotherDir ? initMotherDir->
GetFile() : 0, initMotherDir);
112 TFile* f = GetFile();
114 if ((motherdir==0) || (f==0))
return;
116 if (motherdir->GetKey(
name)) {
117 Error(
"TDirectoryFile",
"An object with name %s exists already",
name);
124 Error(
"TDirectoryFile",
"Invalid class name: %s",classname);
140 gROOT->GetUUIDs()->AddUUID(fUUID,
this);
213 Info(
"~TDirectoryFile",
"dtor called for %s",
GetName());
225 if (obj == 0 ||
fList == 0)
return;
242 Error(
"AppendKey",
"TDirectoryFile not initialized yet.");
281 TKey *key = 0, *keyo = 0;
287 while ((obj = nextin())) {
293 while ((key = (
TKey *) next())) {
295 if (!keyo || (keyo && strcmp(keyo->GetName(), key->
GetName()))) {
325 if (motherDir && strlen(
GetName()) != 0) motherDir->
Append(
this);
390 char *pobj = (
char*)obj->IsA()->New();
394 if (baseOffset==-1) {
398 Fatal(
"CloneObject",
"Incorrect detection of the inheritance from TObject for class %s.\n",
410 const Int_t bufsize = 10000;
417 ((
TObject*)obj)->Streamer(buffer);
427 newobj->Streamer(buffer);
450 while ((f = (
TFile*)next())) {
478 if (apath) nch = strlen(apath);
483 if (funcname==0 || strlen(funcname)==0) funcname =
"GetDirectory";
487 char *path =
new char[nch+1]; path[0] = 0;
488 if (nch) strlcpy(path,apath,nch+1);
489 char *
s = (
char*)strchr(path,
':');
494 if (!f && !strcmp(
gROOT->GetName(), path)) f =
gROOT;
499 delete [] path;
return result;
501 if (printError)
Error(funcname,
"No such file %s", path);
502 delete [] path;
return 0;
507 if (path[0] ==
'/') {
511 delete [] path;
return result;
515 char *
slash = (
char*)strchr(path,
'/');
517 if (!strcmp(path,
"..")) {
519 delete [] path;
return result;
523 if (printError)
Error(funcname,
"Unknown directory %s", path);
524 delete [] path;
return 0;
527 delete [] path;
return obj;
531 slash = (
char*)strchr(subdir.
Data(),
'/');
534 if (!strcmp(subdir,
"..")) {
538 delete [] path;
return result;
542 if (printError)
Error(funcname,
"Unknown directory %s", subdir.
Data());
543 delete [] path;
return 0;
547 delete [] path;
return result;
627 Info(
"Delete",
"Call for this = %s namecycle = %s",
628 GetName(), (namecycle ? namecycle :
"null"));
633 const char *nmcy = (namecycle) ? namecycle :
"";
637 Int_t deletetree = 0;
638 if(strcmp(name,
"*") == 0) deleteall = 1;
639 if(strcmp(name,
"*T") == 0){ deleteall = 1; deletetree = 1;}
640 if(strcmp(name,
"T*") == 0){ deleteall = 1; deletetree = 1;}
641 if(namecycle==0 || !namecycle[0]){ deleteall = 1; deletetree = 1;}
648 if (cycle >= 9999 ) {
651 while ((idcur = (
TNamed *) next())) {
658 if (!deletetree && deleteall) deleteOK = 0;
667 idcur->
Delete(deletetree ?
"T*;*" :
"*");
680 if (cycle != 9999 ) {
684 while ((key = (
TKey *) nextkey())) {
688 if (cycle == key->
GetCycle()) deleteOK = 1;
689 if (cycle > 9999) deleteOK = 1;
693 if (!deletetree && deleteall) deleteOK = 0;
694 if (cycle == key->
GetCycle()) deleteOK = 2;
730 Version_t version = TDirectoryFile::Class_Version();
741 tobuf(buffer, version);
746 if (version > 1000) {
769 return GetKey(name,cycle);
789 while ((key = (
TKey *) next())) {
790 if (!strcmp(name, key->
GetName()))
791 if ((cycle == 9999) || (cycle >= key->
GetCycle())) {
798 while ((key = (
TKey *) next())) {
807 if (dirsav) dirsav->
cd();
834 while ((key = (
TKey *) next())) {
835 if (!strcmp(name, key->
GetName())) {
836 if (cycle == 9999)
return key->
ReadObj();
842 while ((key = (
TKey *) next())) {
848 if (k) {
if (dirsav) dirsav->
cd();
return k->
ReadObj();}
851 if (dirsav) dirsav->
cd();
913 Int_t nch = strlen(name);
914 for (
Int_t i = nch-1; i > 0; i--) {
915 if (name[i] ==
'/') {
918 const char *subnamecycle = namecycle + i + 1;
920 return dirToSearch?dirToSearch->
Get(subnamecycle):0;
923 const char *namobj =
name;
929 if (idcur==
this && strlen(namobj)!=0) {
934 }
else if (cycle == 9999) {
948 while ((key = (
TKey *) nextkey())) {
949 if (strcmp(namobj,key->
GetName()) == 0) {
950 if ((cycle == 9999) || (cycle == key->
GetCycle())) {
1018 Int_t nch = strlen(name);
1019 for (
Int_t i = nch-1; i > 0; i--) {
1020 if (name[i] ==
'/') {
1023 const char *subnamecycle = namecycle + i + 1;
1032 const char *namobj =
name;
1036 if (expectedClass==0 || expectedClass->
IsTObject()) {
1039 if (objcur==
this && strlen(namobj)!=0) {
1044 }
else if (cycle == 9999) {
1046 if (expectedClass && objcur->IsA()->GetBaseClassOffset(expectedClass) == -1)
return 0;
1062 while ((key = (
TKey *) nextkey())) {
1063 if (strcmp(namobj,key->
GetName()) == 0) {
1064 if ((cycle == 9999) || (cycle == key->
GetCycle())) {
1095 if (!
fKeys)
return nullptr;
1101 while (( key = (
TKey *)next() )) {
1103 if ((cycle == 9999) || (cycle >= key->
GetCycle()))
1138 reg = opt(2,opt.
Length());
1142 reg = opt(2,opt.
Length());
1143 }
else if (!opt.
IsNull())
1151 while ((obj = (
TObject *) nextobj())) {
1161 while ((key = (
TKey *) next())) {
1191 if (!
name || !title || !
name[0])
return 0;
1192 if (!title[0]) title =
name;
1194 Error(
"mkdir",
"An object with name %s exists already",
name);
1198 if (
const char *
slash = strchr(
name,
'/')) {
1200 char *workname =
new char[size+1];
1201 strncpy(workname,
name, size);
1207 if (!tmpdir)
return 0;
1209 if (!newdir) newdir = tmpdir;
1237 while ((key = (
TKey*)prev())) {
1239 if (!keyprev)
break;
1271 Bool_t readdirs = ((opt!=0) && ((strcmp(opt,
"dirs")==0) || (strcmp(opt,
"dirs*")==0)));
1274 while ((key = (
TKey *) next())) {
1277 if (strstr(key->
GetClassName(),
"TDirectory")==0)
continue;
1281 if ((dir!=0) && (strcmp(opt,
"dirs*")==0)) dir->
ReadAll(
"dirs*");
1284 while ((key = (
TKey *) next())) {
1286 if (thing) {
delete thing; }
1332 char *header =
new char[nbytes];
1347 if (versiondir > 1000) {
1352 Int_t sdir,sparent,skeys;
1370 for (
Int_t i = 0; i < nkeys; i++) {
1371 key =
new TKey(
this);
1374 Error(
"ReadKeys",
"reading illegal key, exiting after %d keys",i);
1380 Error(
"ReadKeys",
"reading illegal key, exiting after %d keys",i);
1405 if (!
fFile) {
Error(
"Read",
"No file open");
return 0; }
1408 while ((key = (
TKey *) nextkey())) {
1409 if (strcmp(keyname,key->
GetName()) == 0) {
1410 return key->
Read(obj);
1413 Error(
"Read",
"Key not found");
1456 while ((idcur = next())) {
1473 if ((name==0) || (*name==0))
return;
1493 TObject *idcur = lnk->GetObject();
1498 lnk = lnk->NextSP();
1521 if (!filename || !filename[0]) {
1525 if (fname.
Index(
".json") > 0) {
1529 if (!local)
return 0;
1530 nbytes = obj->
Write();
1532 if (dirsav) dirsav->
cd();
1565 if (dirsav !=
this)
cd();
1568 if (dirsav && dirsav !=
this) dirsav->
cd();
1595 Int_t offset = (
char*)ref - (
char*)parent;
1596 TClass *cl = parent->IsA();
1602 if (element->GetOffset() != offset)
continue;
1604 if (execid > 0) ref->
SetBit(execid << 8);
1622 while ((idcur = next())) {
1651 void TDirectoryFile::Streamer(
TBuffer &b)
1691 if (version > 1000) {
1697 Int_t sdir,sparent,skeys;
1736 version = TDirectoryFile::Class_Version();
1743 if (version > 1000) {
1753 if (version <=1000)
for (
Int_t i=0;i<3;i++) b <<
Int_t(0);
1775 while ((obj=next())) {
1776 nbytes += obj->
Write(0,opt,bufsize);
1788 Error(
"Write const",
"A const TDirectory object should not be saved. We try to proceed anyway.");
1841 const char *objname =
"no name specified";
1843 else if (obj) objname = obj->
GetName();
1844 Error(
"WriteTObject",
"The current directory (%s) is not associated with a file. The object (%s) has not been written.",
GetName(),objname);
1861 TKey *key=0, *oldkey=0;
1863 if (bufsize > 0) bsize = bufsize;
1872 Int_t nch = strlen(oname);
1874 if (nch && oname[nch-1] ==
' ') {
1875 newName =
new char[nch+1];
1876 strlcpy(newName,oname,nch+1);
1877 for (
Int_t i=0;i<nch;i++) {
1878 if (newName[nch-i-1] !=
' ')
break;
1879 newName[nch-i-1] = 0;
1897 if (newName)
delete [] newName;
1956 Error(
"WriteObjectAny",
"Unknown class: %s",classname);
1980 if (
fFile==0)
return 0;
1983 Error(
"WriteObject",
"Unknown type for %s, it can not be written.",
name);
1997 const char *className = cl->
GetName();
2005 Error(
"WriteObjectAny",
2006 "The class requested (%s) for the key name \"%s\"" 2007 " is an instance of an stl collection and does not have a compiled CollectionProxy." 2008 " Please generate the dictionary for this collection (%s). No data will be written.",
2009 className, oname, className);
2013 TKey *key, *oldkey=0;
2015 if (bufsize > 0) bsize = bufsize;
2021 Int_t nch = strlen(oname);
2023 if (nch && oname[nch-1] ==
' ') {
2024 newName =
new char[nch+1];
2025 strlcpy(newName,oname,nch+1);
2026 for (
Int_t i=0;i<nch;i++) {
2027 if (newName[nch-i-1] !=
' ')
break;
2028 newName[nch-i-1] = 0;
2046 if (newName)
delete [] newName;
2080 char * header =
new char[nbytes];
2081 char * buffer = header;
2115 Int_t nbytes =
sizeof nkeys;
2117 while ((key = (
TKey*)next())) {
2127 tobuf(buffer, nkeys);
2128 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...
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
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) 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
Delete a TObjLink object.
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 bool UseRWLock()
Set this collection to use a RW lock upon access, making it thread safe.
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
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.
virtual TFile * GetFile() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
#define R__LOCKGUARD(mutex)
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...