32 :
TKey(mother), fKeyNode(nullptr), fKeyId(keyid), fSubdir(
kFALSE)
61 :
TKey(mother), fKeyNode(nullptr), fKeyId(keyid), fSubdir(
kFALSE)
86 :
TKey(mother), fKeyNode(keynode), fKeyId(keyid), fSubdir(
kFALSE)
153 if (
f->GetIOVersion() > 1) {
173 if (obj && check_tobj) {
176 actual = TObject::Class();
177 }
else if (actual != TObject::Class())
186 if (
f->GetIOVersion() == 1)
264 if (
gROOT->GetForceStyle())
266 if (tobj->IsA() == TDirectoryFile::Class()) {
291 if (
gROOT->GetForceStyle())
293 if (tobj->IsA() == TDirectoryFile::Class()) {
314 void *res =
XmlReadAny(
nullptr, expectedClass);
316 if (res && (expectedClass == TDirectoryFile::Class())) {
346 if (
f->GetIOVersion() == 1)
362 void *res = buffer.
XmlReadAny(objnode, obj, &cl);
378 Warning(
"XmlReadAny",
"Trying to read an emulated class (%s) to store in a compiled pointer (%s)",
383 return ((
char *)res) + delta;
392 return f ?
f->XML() :
nullptr;
void InitMap() override
Create the fMap container and initialize them with the null object.
Class for serializing/deserializing object to/from xml.
XMLNodePointer_t XmlWriteAny(const void *obj, const TClass *cl)
Convert object of any class to xml structures Return pointer on top xml element.
void XmlReadBlock(XMLNodePointer_t node)
Read binary block of data from xml.
void * XmlReadAny(XMLNodePointer_t node, void *obj, TClass **cl)
Recreate object from xml structure.
void XmlWriteBlock(XMLNodePointer_t node)
Write binary data block from buffer to xml.
@ kCannotHandleMemberWiseStreaming
TClass instances represent classes, structs and namespaces in the ROOT type system.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
Int_t GetBaseClassOffset(const TClass *toBase, void *address=0, bool isDerivedObject=true)
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
void Set()
Set Date/Time to current time as reported by the system.
A ROOT file is structured in Directories (like a file system).
Int_t ReadKeys(Bool_t forceRead=kTRUE) override
Read the linked list of keys.
void SetSeekDir(Long64_t v) override
Describe directory structure in memory.
virtual Int_t AppendKey(TKey *)
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
void SetName(const char *newname) override
Set the name for directory If the directory name is changed after the directory was written once,...
virtual void SetMother(TObject *mother)
virtual TList * GetListOfKeys() const
void UpdateObject(TObject *obj)
updates object, stored in the node Used for TDirectory data update
void Delete(Option_t *option="") final
Delete key from current directory Note: TKeyXML object is not deleted.
Long64_t GetKeyId() const
XMLNodePointer_t fKeyNode
Int_t Read(TObject *tobj) final
To read an object from the file.
TXMLEngine * XMLEngine()
return pointer on TXMLEngine object, used for xml conversion
TObject * ReadObjWithBuffer(char *bufferRead) final
read object derived from TObject class, from key if it is not TObject or in case of error,...
void * XmlReadAny(void *obj, const TClass *expectedClass)
read object from key and cast to expected class
void * ReadObjectAny(const TClass *expectedClass) final
read object of any type
virtual ~TKeyXML()
TKeyXML destructor.
void StoreObject(const void *obj, const TClass *cl, Bool_t check_tobj=kFALSE)
convert object to xml structure and keep this structure in key
void UpdateAttributes()
update key attributes in key node
void StoreKeyAttributes()
Stores keys attributes in key node.
TObject * ReadObj() final
read object derived from TObject class, from key if it is not TObject or in case of error,...
Bool_t fSubdir
unique identifier of key for search methods
Book space in a file, create I/O buffers, to fill them, (un)compress them.
TFile * GetFile() const
Returns file to which key belong.
TDatime fDatime
Date/Time of insertion in file.
virtual const char * GetTitle() const
Returns title (title can contain 32x32 xpm thumbnail/icon).
Short_t fCycle
Cycle number.
TDirectory * GetMotherDir() const
TDirectory * fMotherDir
!pointer to mother directory
TString fClassName
Object Class name.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void UseCurrentStyle()
Set current style settings in this object This function is called when either TCanvas::UseCurrentStyl...
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
XMLNodePointer_t NewChild(XMLNodePointer_t parent, XMLNsPointer_t ns, const char *name, const char *content=nullptr)
create new child element for parent node
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
returns first child of xmlnode
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
void UnlinkNode(XMLNodePointer_t node)
unlink (detach) xmlnode from parent
XMLAttrPointer_t NewIntAttr(XMLNodePointer_t xmlnode, const char *name, Int_t value)
create node attribute with integer value
Bool_t HasAttr(XMLNodePointer_t xmlnode, const char *name)
checks if node has attribute of specified name
const char * GetNodeName(XMLNodePointer_t xmlnode)
returns name of xmlnode
const char * GetAttr(XMLNodePointer_t xmlnode, const char *name)
returns value of attribute for xmlnode
Int_t GetIntAttr(XMLNodePointer_t node, const char *name)
returns value of attribute as integer
void FreeAllAttr(XMLNodePointer_t xmlnode)
Free all attributes of the node.
void FreeNode(XMLNodePointer_t xmlnode)
release all memory, allocated from this node and destroys node itself
void SkipEmpty(XMLNodePointer_t &xmlnode)
Skip all current empty nodes and locate on first "true" node.
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 AddChildFirst(XMLNodePointer_t parent, XMLNodePointer_t child)
add node as first child