XML I/O in ROOT S. Linev, R. Brun, H.G. Essel CHEP 2004.

Slides:



Advertisements
Similar presentations
Artificial Neural Networks And XML
Advertisements

C++ Templates. What is a template? Templates are type-generic versions of functions and/or classes Template functions and template classes can be used.
Copyright  Hannu Laine C++-programming Part 5 Strings.
XML Parsing Using Java APIs AIP Independence project Fall 2010.
SaxStore: a n aspect oriented persistence library for Java based on SAX events Riccardo Solmi University of Bologna May 2001.
Advanced Object-Oriented Programming Features
Lecture 9 Concepts of Programming Languages
Introduce of XML Xiaoling Song CS157A. What is XML? XML stands for EXtensible Markup Language XML stands for EXtensible Markup Language XML is a markup.
Aurora: A Conceptual Model for Web-content Adaptation to Support the Universal Accessibility of Web-based Services Anita W. Huang, Neel Sundaresan Presented.
Status of SQL and XML I/O Sergey Linev, GSI, Darmstadt, Germany.
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
XML eXtensible Markup Language by Darrell Payne. Experience Logicon / Sterling Federal C, C++, JavaScript/Jscript, Shell Script, Perl XML Training XML.
1 XML at a neighborhood university near you Innovation 2005 September 16, 2005 Kwok-Bun Yue University of Houston-Clear Lake.
Data Structures Using C++ 2E
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
What is XML?  XML stands for EXtensible Markup Language  XML is a markup language much like HTML  XML was designed to carry data, not to display data.
1 The NERC DataGrid DataGrid The NERC DataGrid DataGrid AHM 2003 – 2 Sept, 2003 e-Science Centre Metadata of the NERC DataGrid Kevin O’Neill CCLRC e-Science.
Java Root IO Part of the FreeHEP Java Library Tony Johnson Mark Dönszelmann
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Engineering H192 - Computer Programming The Ohio State University Gateway Engineering Education Coalition Lect 24P. 1Winter Quarter C++ Lecture 24.
© GMV S.A., 2004 Property of GMV S.A. All rights reserved 2004/05/13 XML in CCSDS CCSDS Spring Meeting - Montreal Fran Martínez GMVSA 4081/04.
Ernest Micklei, PhilemonWorks.com UMLX: a pragmatic solution to documenting design Ernest Micklei
Chep 2006, Mumbai, IndiaPhilippe Canal (FNAL)1 Recent Developments in the ROOT I/O and TTrees CANAL, Philippe (FERMILAB) BRUN, Rene (CERN) FRANK, Markus.
Copyright  Hannu Laine C++-programming Part 1 Hannu Laine.
The european ITM Task Force data structure F. Imbeaux.
NOVA Networked Object-based EnVironment for Analysis P. Nevski, A. Vaniachine, T. Wenaus NOVA is a project to develop distributed object oriented physics.
CHEP 2003 March 22-28, 2003 POOL Data Storage, Cache and Conversion Mechanism Motivation Data access Generic model Experience & Conclusions D.Düllmann,
An OO schema language for XML SOX W3C Note 30 July 1999.
_______________________________________________________________CMAQ Libraries and Utilities ___________________________________________________Community.
Accessing Data Using XML CHAPTER NINE Matakuliah: T0063 – Pemrograman Visual Tahun: 2009.
ROOT I/O for SQL databases Sergey Linev, GSI, Germany.
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
XML and Its Applications Ben Y. Zhao, CS294-7 Spring 1999.
CHEP 2013, Amsterdam Reading ROOT files in a browser ROOT I/O IN JAVASCRIPT B. Bellenot, CERN, PH-SFT B. Linev, GSI, CS-EE.
STAR Event data storage and management in STAR V. Perevoztchikov Brookhaven National Laboratory,USA.
Persistent Object References in ROOT1 Persistent Object References in ROOT I/O Status & Proposal CMS-ROOT meeting CERN- November 27 Ren é Brun ftp://root.cern.ch/root/refs.ppt.
Using of XML for object store S. Linev, GSI Using of XML for object store. S.Linev2 Content XML and existing packages XML and existing packages.
ROOT Tutorials - Session 51 ROOT Tutorials – Session 5 Dictionary Generation, rootcint, Simple I/O, Hands-on Fons Rademakers.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
STAR Schema Evolution Implementation in ROOT I/O V. Perevoztchikov Brookhaven National Laboratory,USA.
1 Introduction JAXP. Objectives  XML Parser  Parsing and Parsers  JAXP interfaces  Workshops 2.
Comanche A GUI management tool for Apache Daniel López Ridruejo
CHEP /21/03 Detector Description Framework in LHCb Sébastien Ponce CERN.
Implementing Marine XML for NOAA Observing Data Nazila Merati and Eugene Burger NOAA/Pacific Marine Environmental Laboratory Seattle, WA.
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Managers and “mentors” identified on projects page. All member accounts created and projects populated.
Martin Kruliš by Martin Kruliš (v1.1)1.
Copyright © 2009 – Curt Hill Standard Template Library An Introduction.
CINT & Reflex – The Future CINT’s Future Layout Reflex API Work In Progress: Use Reflex to store dictionary data Smaller memory footprint First step to.
Connecting Architecture Reconstruction Frameworks Ivan Bowman, Michael Godfrey, Ric Holt Software Architecture Group University of Waterloo CoSET ‘99 May.
Chapter 17 – Templates. Function Templates u Express general form for a function u Example: template for adding two numbers Lesson 17.1 template Type.
- GDML - ROOT I/O for Geant4 - General Suggestions SFT Program of Work Meeting Witek Pokorski 03/03/2010.
Go4 Workshop J.Adamczewski-Musch, S.Linev Go4 advanced features.
AliRoot Classes for access to Calibration and Alignment objects Magali Gruwé CERN PH/AIP ALICE Offline Meeting February 17 th 2005 To be presented to detector.
XML Extensible Markup Language
Duke CPS Iterators: Patterns and STL l Access a container without knowing how it’s implemented ä libtapestry: first, isDone, next, current iterators.
Evaluation of the C++ binding to the Oracle Database System Dirk Geppert and Krzysztof Nienartowicz, IT/DB CERN IT Fellow Seminar November 20, 2002.
I Copyright © 2004, Oracle. All rights reserved. Introduction.
POOL Based CMS Framework Bill Tanenbaum US-CMS/Fermilab 04/June/2003.
XML Databases Presented By: Pardeep MT15042 Anurag Goel MT15006.
Possibility of XML I/O support in ROOT
XML in Web Technologies
Lecture 9 Concepts of Programming Languages
Automated support of STL containers
Data Model.
Persistent Object References in ROOT I/O Status & Proposal
Lecture 9 Concepts of Programming Languages
Presentation transcript:

XML I/O in ROOT S. Linev, R. Brun, H.G. Essel CHEP 2004

XML I/O in ROOT, S. Linev, GSI2 Motivation XML is well structured and formatted text format XML is well structured and formatted text format Widely used as metadata (configuration, parameters, geometry) storage format Widely used as metadata (configuration, parameters, geometry) storage format Good candidate to be used as exchange format between different applications Good candidate to be used as exchange format between different applications ROOT has powerful I/O system, but had no (at the beginning of 2004) support of xml ROOT has powerful I/O system, but had no (at the beginning of 2004) support of xml

XML I/O in ROOT, S. Linev, GSI3 eXtensible Markup Language (XML) item text subitem text Example values: item1 “item text“ item2 id="001" subitem “subitem text“ item3 ref="001" Tree like structure (not ROOT tree) of text tags Each tag opened should be closed Tag can include other tags, contain text, has attributes In addition: DTD, XSLT, XML schema, namespaces, …

XML I/O in ROOT, S. Linev, GSI4 XML packages C/C++ based XML packages: libxml (Gnome) libxml (Gnome) Xerces-C++ (Apache) Xerces-C++ (Apache) expat (Mozilla) expat (Mozilla) Benchmarks of XML packages:

XML I/O in ROOT, S. Linev, GSI5 Implementation details Implementation details Slight changes (generalization) of TFile & TDirectory classes interfaces Slight changes (generalization) of TFile & TDirectory classes interfaces Virtualization of TBuffer interface => 3-5% speed penalty Virtualization of TBuffer interface => 3-5% speed penalty New TXMLBuffer class to convert basic data types to/from xml tags New TXMLBuffer class to convert basic data types to/from xml tags New TXMLEngine class to provide narrow interface to libxml2 library => possibility to use other xml packages New TXMLEngine class to provide narrow interface to libxml2 library => possibility to use other xml packages New TXMLFile & TXMLKey classes for manipulation with xml files via common ROOT TFile interface New TXMLFile & TXMLKey classes for manipulation with xml files via common ROOT TFile interface Since May 2004 in ROOT distribution Since May 2004 in ROOT distribution

XML I/O in ROOT, S. Linev, GSI6 Example of xml file void example() { TNamed named("ObjectName","ObjectTitle"); TBox box(0.0, 0.0, 1.0, 1.0); TFile* fxml = TFile::Open("example.xml", "recreate"); named.Write("named"); box.Write("box"); delete fxml; } XmlKey with name and cycle number Standard ROOT xml file header with configuration data

XML I/O in ROOT, S. Linev, GSI7 Supported features “Transparent” usage of XML files via ROOT plug-in manager “Transparent” usage of XML files via ROOT plug-in manager Except TTree, most of ROOT classes, including TClonesArray, can be stored Except TTree, most of ROOT classes, including TClonesArray, can be stored Support of custom streamers in user classes Support of custom streamers in user classes Different layouts of xml files: class-specific and generic Different layouts of xml files: class-specific and generic Optional usage of xml namespaces Optional usage of xml namespaces

XML I/O in ROOT, S. Linev, GSI8 Generic and class-specific layouts

XML I/O in ROOT, S. Linev, GSI9 Data exchange scenarios 1.Communication between two ROOT applications 2.Import data from existing user C++ program with non-ROOT classes 3.Export data from existing ROOT application to other C++ application 4.Export data from existing non-ROOT xml files

XML I/O in ROOT, S. Linev, GSI10 Data exchange between ROOT applications xml file ROOT User classes Dictionary ROOT User classes Dictionary Allows viewing/editing exchanged data with standard xml tools Has no big advantage compared to standard ROOT file formatHas no big advantage compared to standard ROOT file format

XML I/O in ROOT, S. Linev, GSI11 Import data from C++ program ROOT Dictionary TXMLPlayerstreamers xml file C++ code User classes TXmlFile Supported in user classes: -basic data types, arrays, const char* -access to private and protected members -objects, object pointers, array of objects, array of objects pointers -classes inheritance tree -STL string, vector, list, deque, set, map, multimap

XML I/O in ROOT, S. Linev, GSI12 Import data from C++ program Create ROOT dictionary for user classes Create ROOT dictionary for user classes Using TXMLPlayer, create xml-streamers for user classes Using TXMLPlayer, create xml-streamers for user classes Add xml-streamers and TXmlFile class to user project Add xml-streamers and TXmlFile class to user project Both reading & writing of xml files becomes possible Both reading & writing of xml files becomes possible “ROOT-like” interface in user code to access xml files: “ROOT-like” interface in user code to access xml files: TXmlFile file("test.xml"); TXmlEx1* ex1 = (TXmlEx1*) file.Get("ex1", TXmlEx1_streamer); TXmlEx2* ex2 = (TXmlEx2*) file.Get("ex2", TXmlEx2_streamer); TXmlFile outfile("test2.xml", "recreate"); outfile.Write(ex1, "ex1", TXmlEx1_streamer); outfile.Write(ex2, "ex2", TXmlEx2_streamer);

XML I/O in ROOT, S. Linev, GSI13 Export data to C++ program xml file ROOT ROOT classes User classes Dictionary C++ code ? What is possible: -do not use any ROOT classes, but then it is previous scenario -generate class definitions and streamers for C++ code, converting ROOT containers to STL containers Implementation is not yet clear and highly depend from real user requirements. Any suggestions are welcome.

XML I/O in ROOT, S. Linev, GSI14 Conclusion Generic XML I/O introduced in ROOT Generic XML I/O introduced in ROOT Several xml-layout options are supported Several xml-layout options are supported Possibility for data exchange with other non- ROOT application Possibility for data exchange with other non- ROOT application Investigation required: Investigation required: support of TTree? support of TTree? support for SAX interface to read fairly big files? support for SAX interface to read fairly big files? use of alternative xml-engines? use of alternative xml-engines? DTD-generation DTD-generation improvements in data exchange improvements in data exchange