XML Interface

So I was reading the document on Input/Output and read the discussion on XML Interface:

[color=#4000FF]A new module xml as implemented by Sergey Linev (GSI). It is an optional package that can be used to save a canvas into file.xml file format instead of file.root. XML files do not have any advantages compared to the normal ROOT files, except that the information in these files can be edited via a normal editor. The main motivation for this new format is to facilitate the communication with other non ROOT applications. Currently writing and reading XML files is limited to ROOT applications. It is our intention to develop a simple reader independent of the ROOT libraries that could be used as an example for real applications. The XML format should be used only for small data volumes, typically histogram files, pictures, geometries, calibrations. The XML file is built in memory before being dumped to disk. Like for normal ROOT files, XML files use the same I/O mechanism exploiting the ROOT/CINT dictionary. Any class having a dictionary can be saved in XML format. This first implementation does not support subdirectories or trees.
[/color]

So my question is, will there be future implementations for support for trees? I guess the problem I’m having is, the application that’s collecting data can’t be linked to root libs (needs to run in a “closed” environment). Currently it’s collecting data and putting them to xml files (via Xerces). I’d like to use root to be able to do some data analysis on the output data, but would like to analyze them via tree objects.

If you have any other suggestions of other output formats that I can use without linking the application to Root, but that Root can load up the data, it would be greatly appreciated. I would preferably want to dump it into tree objects when loading it up on Root to analyze. We could write it to ascii files but writing to ascii slows down the application’s timing performance which we can’t afford when running live.

[quote]So my question is, will there be future implementations for support for trees? [/quote]No, there is currently no plan (the overhead of xml vs ROOT file is much too large to make sense to store the amount of data typical stored in a TTree.

[quote]I guess the problem I’m having is, the application that’s collecting data can’t be linked to root libs (needs to run in a “closed” environment[/quote]Why not? You only need a limited number of library and help files to store object in a TTree.

[quote]If you have any other suggestions of other output formats that I can use without linking the application to Root, but that Root can load up the data, it would be greatly appreciated.[/quote]If you really can not store the data directly in a ROOT file and can afford to write them to xml instead, you will simply need to write a reader for XML file that will transform them from XML to ROOT format.

Cheers,
Philippe.

[quote] We could write it to ascii files but writing to ascii slows down the application’s timing performance which we can’t afford when running live.[/quote]I don’t quite understand the statement … what is the difference between storing them in xml and ascii performance wise? If performance is really important, I strongly recommend trying to use ROOT directly in the data producer …