90 likes | 186 Views
XML use in persistency. David Rodríguez & Jesús Marco IFCA (UC/CSIC), Spain CMS collaboration. Jesus Marco: ¿Demasiadas cosas en esta?. XML: e X tended M arkup L anguage. Information centered subset of SGML. Separates content from presentation.
E N D
XML use in persistency David Rodríguez & Jesús Marco IFCA (UC/CSIC), Spain CMS collaboration Geant4 Workshop 2000 David Rodríguez & Jesús Marco
Jesus Marco: ¿Demasiadas cosas en esta? XML: eXtended Markup Language • Information centered subset of SGML. • Separates content from presentation. • XML documents consists of the data plus the markup • XSL stylesheets describe how to format, filter and transform the XML document. • It is becomming the internet standard (W3C) for data exchange. • Two type of interfaces • DOM: memory tree structure. • SAX: event based. Geant4 Workshop 2000 David Rodríguez & Jesús Marco
What do we need XML for? • We think XML is a good solution for decoupling databases from applications • DTD allows a clear specification of document’s contents • XML allows to store structured information in a text format Geant4 Workshop 2000 David Rodríguez & Jesús Marco
Object Persistency • Saving of the state of application objects. • This can be done storing it to a data store: • File system • Object Database • (Object) Relational Database Geant4 Workshop 2000 David Rodríguez & Jesús Marco
Storing info with XML • Files + catalog • Interface to OODBMS and object schema. • Interface to ORDBMS: • interface to (Object) Relational schema • directly store XML • The main DB vendors have a strong XML strategy: IBM, Informix, Microsoft, Oracle. Geant4 Workshop 2000 David Rodríguez & Jesús Marco
XML output for OSCAR Hits • OSCAR, Object oriented Simulation for CMS Analisys and Reconstruction, is a Geant4 application being developed at the CMS collaboration. • Lately we have developed a prototype implementation providing XML output for OSCAR hits Geant4 Workshop 2000 David Rodríguez & Jesús Marco
Changes in OSCAR • Mainly, the introduction of a new external tool, the XML parser. • We use Xerces 1.2.0 from Apache. • About to move to 1.3.0. • Code changes: • A new method for the hits classes that returns a DOM element • A new EndOfEvent action that generates the XML (DOM) document. • Some code to manage XML output. Geant4 Workshop 2000 David Rodríguez & Jesús Marco
Geant4 Examples • Following the same strategy as in OSCAR we have implemented XML output for a Geant4 example’s hits. • XML includes and library added to binmake.gmk • Quick development. Geant4 Workshop 2000 David Rodríguez & Jesús Marco
¿More XML for Geant4? • Built-in support (¿optional in compilation?) desirable for us. • Extending XML persistency: • complete event info (digits, tracks ...) • geometry • configuration info • Other posibilities Geant4 Workshop 2000 David Rodríguez & Jesús Marco