81 if (name && *name)
SetName(name);
164 if ((f==0) || (xml==0) || (
fKeyNode==0))
return;
184 if ((f==0) || (xml==0) || (
fKeyNode==0))
return;
208 if ((xml==0) || (
fKeyNode==0))
return;
223 if ((f==0) || (xml==0) || (obj==0) || (
fKeyNode==0))
return;
228 if (objnode==0)
return;
246 if (tobj==0)
return 0;
250 return res==0 ? 0 : 1;
322 if ((f==0) || (xml==0))
return obj;
330 while (blocknode!=0) {
340 void* res = buffer.
XmlReadAny(objnode, obj, &cl);
342 if ((cl==0) || (res==0))
return obj;
346 if (expectedClass!=0) {
355 "Trying to read an emulated class (%s) to store in a compiled pointer (%s)",
360 return ((
char*)res) + delta;
369 return f==0 ? 0 : f->
XML();
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 Int_t Read(TObject *tobj)
To read an object from the file.
TDirectory * GetMotherDir() const
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.
virtual TList * GetListOfKeys() const
virtual ~TKeyXML()
TKeyXML destructor.
void StoreKeyAttributes()
Stores keys attributes in key node.
virtual void SetName(const char *name)
Change (i.e.
Int_t GetIOVersion() const
virtual TObject * ReadObjWithBuffer(char *bufferRead)
read object derived from TObject class, from key if it is not TObject or in case of error...
TFile * GetFile() const
Returns file to which key belong.
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...
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)
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.
virtual const char * GetTitle() const
Returns title (title can contain 32x32 xpm thumbnail/icon).
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
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
A ROOT file is structured in Directories (like a file system).
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
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.
virtual void Delete(Option_t *option="")
Delete key from current directory Note: TKeyXML object is not deleted.
virtual const char * GetName() const
Returns name of object.
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 const char * GetName() const
Returns name of object.
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
void StoreObject(const void *obj, const TClass *cl)
convert object to xml structure and keep this structure in key
Describe directory structure in memory.
void FreeNode(XMLNodePointer_t xmlnode)
release all memory, allocated fro this node and destroyes node itself
Mother of all ROOT objects.
Long64_t GetKeyId() const
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 void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed.
virtual void SetMother(TObject *mother)
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
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.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.