81 if (name && *name)
SetName(name);
164 if ((f==0) || (xml==0) || (
fKeyNode==0))
return;
184 if ((f==0) || (xml==0) || (
fKeyNode==0))
return;
186 if (obj && check_tobj) {
216 if ((xml==0) || (
fKeyNode==0))
return;
231 if ((f==0) || (xml==0) || (obj==0) || (
fKeyNode==0))
return;
236 if (objnode==0)
return;
254 if (tobj==0)
return 0;
258 return res==0 ? 0 : 1;
330 if ((f==0) || (xml==0))
return obj;
338 while (blocknode!=0) {
348 void* res = buffer.
XmlReadAny(objnode, obj, &cl);
350 if ((cl==0) || (res==0))
return obj;
354 if (expectedClass!=0) {
363 "Trying to read an emulated class (%s) to store in a compiled pointer (%s)",
368 return ((
char*)res) + delta;
377 return f==0 ? 0 : f->
XML();
virtual const char * GetName() const
Returns name of object.
void XmlReadBlock(XMLNodePointer_t node)
Read binary block of data from xml.
void * XmlReadAny(void *obj, const TClass *expectedClass)
read object from key and cast to expected class
virtual TList * GetListOfKeys() const
virtual Int_t Read(TObject *tobj)
To read an object from the file.
void XmlWriteBlock(XMLNodePointer_t node)
Write binary data block from buffer to xml.
void SetSeekDir(Long64_t v)
void Set()
Set Date/Time to current time as reported by the system.
Long64_t GetKeyId() const
virtual ~TKeyXML()
TKeyXML destructor.
void StoreKeyAttributes()
Stores keys attributes in key node.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual TObject * ReadObjWithBuffer(char *bufferRead)
read object derived from TObject class, from key if it is not TObject or in case of error...
Long64_t fKeyId
node with stored object
TXMLEngine * XMLEngine()
return pointer on TXMLEngine object, used for xml conversion
XMLNodePointer_t XmlWriteAny(const void *obj, const TClass *cl)
Convert object of any class to xml structures Return pointer on top xml element.
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
Int_t GetIOVersion() const
TDirectory * GetMotherDir() const
TDirectory * fMotherDir
!pointer to mother directory
TKeyXML()
default constructor
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
XMLAttrPointer_t NewIntAttr(XMLNodePointer_t xmlnode, const char *name, Int_t value)
create node attribute with integer value
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void FreeAllAttr(XMLNodePointer_t xmlnode)
Free all attributes of the node.
XMLNodePointer_t fKeyNode
virtual void * ReadObjectAny(const TClass *expectedClass)
read object of any type
TString fClassName
Object Class name.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TDatime fDatime
Date/Time of insertion in file.
const char * GetNodeName(XMLNodePointer_t xmlnode)
returns name of xmlnode
Bool_t fSubdir
unique identifier of key for search methods
virtual TObject * ReadObj()
read object derived from TObject class, from key if it is not TObject or in case of error...
void ShiftToNext(XMLNodePointer_t &xmlnode, Bool_t realnode=kTRUE)
shifts specified node to next if realnode==kTRUE, any special nodes in between will be skipped ...
void UpdateAttributes()
update key attributes in key node
A ROOT file is structured in Directories (like a file system).
TFile * GetFile() const
Returns file to which key belong.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
void UpdateObject(TObject *obj)
updates object, stored in the node Used for TDirectory data update
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
void StoreObject(const void *obj, const TClass *cl, Bool_t check_tobj=kFALSE)
convert object to xml structure and keep this structure in key
virtual void Delete(Option_t *option="")
Delete key from current directory Note: TKeyXML object is not deleted.
The ROOT global object gROOT contains a list of all defined classes.
void SkipEmpty(XMLNodePointer_t &xmlnode)
Skip all current empty nodes and locate on first "true" node.
Bool_t HasAttr(XMLNodePointer_t xmlnode, const char *name)
checks if node has attribute of specified name
virtual Int_t AppendKey(TKey *)
void AddChildFirst(XMLNodePointer_t parent, XMLNodePointer_t child)
add node as first child
XMLAttrPointer_t NewAttr(XMLNodePointer_t xmlnode, XMLNsPointer_t, const char *name, const char *value)
creates new attribute for xmlnode, namespaces are not supported for attributes
virtual void SetName(const char *newname)
Set the name for directory If the directory name is changed after the directory was written once...
Short_t fCycle
Cycle number.
virtual Int_t ReadKeys(Bool_t forceRead=kTRUE)
Read the linked list of keys.
const char * GetAttr(XMLNodePointer_t xmlnode, const char *name)
returns value of attribute for xmlnode
Describe directory structure in memory.
virtual const char * GetTitle() const
Returns title (title can contain 32x32 xpm thumbnail/icon).
void FreeNode(XMLNodePointer_t xmlnode)
release all memory, allocated fro this node and destroyes node itself
Mother of all ROOT objects.
Class for serializing/deserializing object to/from xml.
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
returns first child of xml node
XMLNodePointer_t NewChild(XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=0)
create new child element for parent node
void UnlinkNode(XMLNodePointer_t node)
unlink (dettach) xml node from parent
Int_t GetIntAttr(XMLNodePointer_t node, const char *name)
returns value of attribute as integer
virtual const char * GetName() const
Returns name of object.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetMother(TObject *mother)
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
void * XmlReadAny(XMLNodePointer_t node, void *obj, TClass **cl)
Recreate object from xml structure.