23 class TStreamerElement;
26 class TXMLFile final :
public TFile,
public TXMLSetup {
29 void InitXmlFile(Bool_t create);
31 Int_t SysOpen(
const char *, Int_t, UInt_t) final {
return 0; }
32 Int_t SysClose(Int_t) final {
return 0; }
33 Int_t SysRead(Int_t,
void *, Int_t) final {
return 0; }
34 Int_t SysWrite(Int_t,
const void *, Int_t) final {
return 0; }
35 Long64_t SysSeek(Int_t, Long64_t, Int_t) final {
return 0; }
36 Int_t SysStat(Int_t, Long_t *, Long64_t *, Long_t *, Long_t *) final {
return 0; }
37 Int_t SysSync(Int_t) final {
return 0; }
40 Long64_t DirCreateEntry(TDirectory *) final;
41 Int_t DirReadKeys(TDirectory *) final;
42 void DirWriteKeys(TDirectory *) final;
43 void DirWriteHeader(TDirectory *) final;
45 InfoListRet GetStreamerInfoListImpl(
bool lookupSICache) final;
48 TXMLFile(const TXMLFile &) = delete;
49 void operator=(const TXMLFile &) = delete;
53 TXMLFile(
const char *filename, Option_t *option =
"read",
const char *title =
"title", Int_t compression = ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault);
56 void Close(Option_t *option =
"") final;
57 TKey *CreateKey(TDirectory *mother, const TObject *obj, const
char *name, Int_t bufsize) final;
58 TKey *CreateKey(TDirectory *mother, const
void *obj, const TClass *cl, const
char *name, Int_t bufsize) final;
59 void DrawMap(const
char * = "*", Option_t * = "") final {}
60 void FillBuffer(
char *&) final {}
63 Long64_t GetEND() const final {
return 0; }
64 Int_t GetErrno() const final {
return 0; }
65 void ResetErrno() const final {}
67 Int_t GetNfree() const final {
return 0; }
68 Int_t GetNbytesInfo() const final {
return 0; }
69 Int_t GetNbytesFree() const final {
return 0; }
70 Long64_t GetSeekFree() const final {
return 0; }
71 Long64_t GetSeekInfo() const final {
return 0; }
72 Long64_t GetSize() const final {
return 0; }
74 Int_t GetIOVersion()
const {
return fIOVersion; }
76 Bool_t IsOpen() const final;
78 void MakeFree(Long64_t, Long64_t) final {}
79 void MakeProject(
const char *,
const char * =
"*", Option_t * =
"new") final {}
80 void Map(Option_t *) final {}
82 void Paint(Option_t * =
"") final {}
83 void Print(Option_t * =
"") const final {}
84 Bool_t ReadBuffer(
char *, Int_t) final {
return kFALSE; }
85 Bool_t ReadBuffer(
char *, Long64_t, Int_t) final {
return kFALSE; }
86 void ReadFree() final {}
87 Int_t Recover() final {
return 0; }
88 Int_t ReOpen(Option_t *mode)
final;
89 void Seek(Long64_t, ERelativeTo = kBeg) final {}
91 void SetEND(Long64_t) final {}
92 Int_t Sizeof() const final {
return 0; }
94 Bool_t WriteBuffer(
const char *, Int_t) final {
return kFALSE; }
95 Int_t Write(
const char * =
nullptr, Int_t = 0, Int_t = 0) final {
return 0; }
96 Int_t Write(
const char * =
nullptr, Int_t = 0, Int_t = 0) const final {
return 0; }
97 void WriteFree() final {}
98 void WriteHeader() final {}
99 void WriteStreamerInfo() final;
103 void SetXmlLayout(EXMLLayout layout) final;
104 void SetStoreStreamerInfos(Bool_t iConvert = kTRUE) final;
105 void SetUsedDtd(Bool_t use = kTRUE) final;
106 void SetUseNamespaces(Bool_t iUseNamespaces = kTRUE) final;
108 Bool_t AddXmlComment(const
char *comment);
109 Bool_t AddXmlStyleSheet(const
char *href, const
char *type = "text/css", const
char *title =
nullptr,
int alternate = -1,
110 const
char *media =
nullptr, const
char *charset =
nullptr);
111 Bool_t AddXmlLine(const
char *line);
113 TXMLEngine *XML() {
return fXML.get(); }
118 void StoreStreamerElement(XMLNodePointer_t node, TStreamerElement *elem);
119 void ReadStreamerElement(XMLNodePointer_t node, TStreamerInfo *info);
121 Bool_t ReadFromFile();
122 Int_t ReadKeysList(TDirectory *dir, XMLNodePointer_t topnode);
123 TKeyXML *FindDirKey(TDirectory *dir);
124 TDirectory *FindKeyDir(TDirectory *mother, Long64_t keyid);
125 void CombineNodesTree(TDirectory *dir, XMLNodePointer_t topnode, Bool_t dolink);
129 static void ProduceFileNames(
const char *filename, TString &fname, TString &dtdname);
131 XMLDocPointer_t fDoc{
nullptr};
133 XMLNodePointer_t fStreamerInfoNode{
nullptr};
135 std::unique_ptr<TXMLEngine> fXML;
139 Long64_t fKeyCounter{0};
141 ClassDefOverride(TXMLFile, 3)