Chep 2006, Mumbai, IndiaPhilippe Canal (FNAL)1 Recent Developments in the ROOT I/O and TTrees CANAL, Philippe (FERMILAB) BRUN, Rene (CERN) FRANK, Markus.

Slides:



Advertisements
Similar presentations
Status and Future of CINT Reflex as Reflection Database Object-Oriented CINT Multi-Threading Masaharu Goto, Agilent Philippe Canal, Fermilab Stefan Roiser,
Advertisements

. STL: C++ Standard Library. Main Ideas u General purpose: generic data structures & algorithms, templates u Flexibility: Allows for many combinations.
CHEP ' 2003David Chamont (CMS - LLR)1 Twelve Ways to Build CMS Crossings from Root Files Benefits and deficiencies of Root trees and clones when : - NOT.
OOP Languages: Java vs C++
Bertrand Bellenot root.cern.ch ROOT I/O in JavaScript Reading ROOT files from any web browser ROOT Users Workshop
Reading ROOT files in any browser ROOT I/O IN JAVASCRIPT Bertrand Bellenot CERN, PH-SFT.
C++ / G4MICE Course Session 3 Introduction to Classes Pointers and References Makefiles Standard Template Library.
PROOF: the Parallel ROOT Facility Scheduling and Load-balancing ACAT 2007 Jan Iwaszkiewicz ¹ ² Gerardo Ganis ¹ Fons Rademakers ¹ ¹ CERN PH/SFT ² University.
Sept 11, 2003ROOT Day1, Suzanne Panacek39 ROOT An object oriented HEP analysis framework. Day 1.
XML I/O in ROOT S. Linev, R. Brun, H.G. Essel CHEP 2004.
Status of SQL and XML I/O Sergey Linev, GSI, Darmstadt, Germany.
CINT Retrospect ROOT Workshop Mar 2013 Agilent Technologies Masaharu Goto.
Data Structures Using C++ 2E
09-Jun-2005J. Adamczewski1 C++ course 2005 The ROOT framework 2.
THttpServer class Sergey Linev (GSI). Some history Development was inspired by JSRootIO why not achieve similar functionality with online ROOT application?
ROOT I/O recent improvements Bottlenecks and Solutions Rene Brun December
Int. Workshop on Advanced Computing and Analysis Techniques in Physics Research (ACAT2005), Zeuthen, Germany, May 2005 Bitmap Indices for Fast End-User.
Java Root IO Part of the FreeHEP Java Library Tony Johnson Mark Dönszelmann
Programming Languages and Paradigms Object-Oriented Programming (Part II)
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett A Lightweight Histogram Interface Layer CHEP 2000 Session F (F320) Thursday.
1 Marek BiskupACAT2005PROO F Parallel Interactive and Batch HEP-Data Analysis with PROOF Maarten Ballintijn*, Marek Biskup**, Rene Brun**, Philippe Canal***,
The european ITM Task Force data structure F. Imbeaux.
CHEP 2003 March 22-28, 2003 POOL Data Storage, Cache and Conversion Mechanism Motivation Data access Generic model Experience & Conclusions D.Düllmann,
Copyright © Curt Hill Generic Classes Template Classes or Container Classes.
ROOT I/O for SQL databases Sergey Linev, GSI, Germany.
ROOT and Federated Data Stores What Features We Would Like Fons Rademakers CERN CC-IN2P3, Nov, 2011, Lyon, France.
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
ROOT Future1 Some views on the ROOT future ROOT Workshop 2001 June 13 FNAL Ren é Brun CERN.
Standard Template Library The Standard Template Library was recently added to standard C++. –The STL contains generic template classes. –The STL permits.
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.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
H.G.Essel: Go4 - J. Adamczewski, M. Al-Turany, D. Bertini, H.G.Essel, S.Linev CHEP 2003 GSI Online Offline Object Oriented Go4.
Templates & STL Stefan Roiser, Lorenzo Moneta CERN PH/SFT.
ROOT Tutorials - Session 51 ROOT Tutorials – Session 5 Dictionary Generation, rootcint, Simple I/O, Hands-on Fons Rademakers.
STAR Schema Evolution Implementation in ROOT I/O V. Perevoztchikov Brookhaven National Laboratory,USA.
ROOT Data bases access1 LCG Data base deployment workshop 11 October Ren é Brun CERN.
9/28/2005Philippe Canal, ROOT Workshop TTree / SQL Philippe Canal (FNAL) 2005 Root Workshop.
ROOT I/O TTree Queries CHEP 2004 René Brun / CERN Philippe Canal / Fermilab Fons Rademakers / CERN
Copyright © 2009 – Curt Hill Standard Template Library An Introduction.
March, PROOF - Parallel ROOT Facility Maarten Ballintijn Bring the KB to the PB not the PB to the KB.
ROOT I/O: The Fast and Furious CHEP 2010: Taipei, October 19. Philippe Canal/FNAL, Brian Bockelman/Nebraska, René Brun/CERN,
Work in progress Philippe & Rene. Memory Pools when reading Currently we new/delete – zipped buffer (when no cache) – unzipped buffer – branches target.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
Overview, Major Developments, Directions1 ROOT Project Status Major developments Directions NSS05 Conference 25 October Ren é Brun CERN Based on my presentation.
ROOT Workshop M.Frank LHCb/CERN Improvements in the I/O Area (*)  General I/O related improvements  Tree related issues  Plans (*) I present.
S.Linev: Go4 - J.Adamczewski, H.G.Essel, S.Linev ROOT 2005 New development in Go4.
Trees: New Developments1 Trees: New Developments Folders and Tasks ROOT Workshop 2001 June 13 FNAL Ren é Brun CERN
ROOT-CORE Team 1 Philippe Canal Markus Frank I/O Basic I/O, RDBMS interfaces, Trees.
Analysis experience at GSIAF Marian Ivanov. HEP data analysis ● Typical HEP data analysis (physic analysis, calibration, alignment) and any statistical.
CINT/Reflex workshop 1 Rene Brun 4 May 2005 Summary of the CINT/Reflex workshop 2-6 May 2005
Python’s Standard Library Part II Dennis Tran. Output Formatting The repr module provides a version of repr() customized for abbreviated displays of large.
Unit VI.  C++ templates are a powerful mechanism for code reuse, as they enable the programmer to write code (classes as well as functions) that behaves.
What’s In Store For ROOT I/O Philippe Canal March 22nd, 2012.
2001 ROOT Workshop The Summary. Content Most Requested Request already satisfied Build and Distribution Web Page Information and Documentation.
POOL Based CMS Framework Bill Tanenbaum US-CMS/Fermilab 04/June/2003.
ROOT : Outlook and Developments WLCG Jamboree Amsterdam June 2010 René Brun/CERN.
HYDRA Framework. Setup of software environment Setup of software environment Using the documentation Using the documentation How to compile a program.
Persistent Object References in ROOT1 Persistent Object References in ROOT I/O Status & Proposal LCG meeting CERN- 5 June Ren é Brun ftp://root.cern.ch/root/longrefs.ppt.
ROOT IO workshop What relates to ATLAS. General Both CMS and Art pushing for parallelization at all levels. Not clear why as they are anyhow CPU bound.
Go4 v2.2 Status & Overview CHEP 2003
Programming with ANSI C ++
Distributed object monitoring for ROOT analyses with Go4 v.3
Geant4 Geometry Objects Persistency using ROOT
Persistent Object References in ROOT I/O Status & Proposal
Zooming on ROOT files and Containers
Standard Template Library
Standard Template Library
ROOT Support and Developments at FNAL
New I/O navigation scheme
Presentation transcript:

Chep 2006, Mumbai, IndiaPhilippe Canal (FNAL)1 Recent Developments in the ROOT I/O and TTrees CANAL, Philippe (FERMILAB) BRUN, Rene (CERN) FRANK, Markus (CERN) RADEMAKERS, Fons (CERN) RUSSO, Paul (FERMILAB)

Philippe Canal (FNAL)2 Chep 2006, Mumbai, India ROOT I/O History Version 2.25 and older  Only hand coded and generated streamer function, Schema evolution done by hand  I/O requires : ClassDef, ClassImp and CINT Dictionary Version 2.26  Automatic schema evolution  Use TStreamerInfo (with info from dictionary) to drive a general I/O routine. Version 3.03/05  Lift need for ClassDef and ClassImp for classes not inheriting from TObject  Any non TObject class can be saved inside a TTree or as part of a TObject-class Version 4.00/00  Automatic versioning of ‘Foreign’ classes Version 4.00/08  Non TObject classes can be saved directly in TDirectory Version 4.01/02  Large TTrees, TRef autoload Version 4.04/02  TTree interface improvements, Double32 enhancements Version 5.08/00  Fast TTree merging, Indexing of TChains, Complete STL support.

Philippe Canal (FNAL)3 Chep 2006, Mumbai, India Outline General I/O  STL Collections  Data compression using reduced precision  Alternatives to default constructors  Other I/O improvements Trees  New Features  Fast Merging  Indexing of TChains  TTree Interface enhancements  TRef and pool::Reference  Browsing

Philippe Canal (FNAL)4 Chep 2006, Mumbai, India I/O Improvements – Outline STL collections Data compression using reduced precision Alternatives to default constructors Other I/O improvements

Philippe Canal (FNAL)5 Chep 2006, Mumbai, India ROOT I/O: STL Collections Support for all STL containers  vector, list, set, multiset, deque, map, multimap, queue and stack  Also the non portable: hash_map, hash_multimap, hash_set, hash_multiset Support for schema evolution between container STL collections can be saved in split mode  Objects (not pointers) are splitable  Quick pre-selections on trees  Interactivity: Trees can be browsed  Save space (see $ROOTSYS/test/bench): std::vector : compression 5.38 std::vector : compression 3.37 Can be extended to any iterable collections via an implementation of the interface TVirtualCollection TClonesArray  vector TClonesArray  list list  vector map  list >

Philippe Canal (FNAL)6 Chep 2006, Mumbai, India ROOT I/O: STL Collections (2)

Philippe Canal (FNAL)7 Chep 2006, Mumbai, India ROOT I/O: STL Collections (3) Streaming: Object-&member wise Member wise streaming allows better compression (zip works more efficient) Bool_t TStreamerInfo::SetStreamMemberWise(Bool_t enable) Struct A { Int _a, _b, _c; }; Std::vector _a _b _c _a _b _c _a _b _c _a … _a _a... _a _b _b … _b _c … _c File/TBuffer Offset

Philippe Canal (FNAL)8 Chep 2006, Mumbai, India Float, double and space… Math operations very often require double precision, but on saving single precision is sufficient… Data type: Double32_t In memory: double On disk: float or integer Usage (see tutorials/double32.C):  No nbits,min,max saved as float  min, max saved as int 32 bits precision explicit values or expressions of values known to Cint (e.g. “pi”)  nbits present saved as int with nbit precision higher precision than float for same persistent space Double32_t m_data; //[min,max ]

Philippe Canal (FNAL)9 Chep 2006, Mumbai, India Float, double and space… (2) Save space Increase precision

Philippe Canal (FNAL)10 Chep 2006, Mumbai, India Default Constructors ROOT requires a “default” constructor for reading Not all classes can provide a constructor with no parameters. Alternative: I/O constructor customization  Constructor search order: #pragma link C++ class MyClass; #pragma link C++ ioctortype UserClass1; #pragma link C++ ioctortype UserClass2; MyClass(UserClass1*); MyClass(UserClass2*); MyClass(TRootIOCtor*); MyClass(); // Or constructor with all args defaulted.

Philippe Canal (FNAL)11 Chep 2006, Mumbai, India Other I/O improvements Thread Safety  Reduce reliance on gFile/gDirectory in internal code  Improve thread safety of internal code Variable size array of ‘Foreign’ Object: New Class TFileMerger  Copying and/or Merging two or more files using the many TFile plugins. Obj *fArr; //[n] TFileMerger m; m->Cp("srcUrl", "destUrl"); m->AddFile("url1"); m->AddFile("url2"); m->Merge();

Philippe Canal (FNAL)12 Chep 2006, Mumbai, India TTree extensions - Outline New Features Fast Merging Indexing of TChains TTree Interface enhancements TRef and pool::Reference Browsing

Philippe Canal (FNAL)13 Chep 2006, Mumbai, India New Features Circular TTree  Memory TTree buffers wrap after specified number of entries Importing ASCII data  Long64_t TTree::ReadFile(filename,description)  ‘description’ gives column layout following ‘leaflist’ format gROOT->cd(); //make sure that the Tree is memory resident TTree *T = new TTree("T","test circular buffers");... T->SetCircular(20000); for (i = 0; i < 65000; i++) {... } TTree *T = new TTree("ntuple","data from ascii file"); Long64_t nlines = T->ReadFile("basic.dat","x:y:z");

Philippe Canal (FNAL)14 Chep 2006, Mumbai, India Fast Merge of TTrees. New option, "fast“ for CloneTree and Merge.  No unzipping, no un-streaming.  Direct copy of the raw bytes from one file to the other.  Much higher performance.  Only available if the complete TTree is being copied.  Can also sort the baskets by branch. myChain->CloneTree(-1,”fast”); myChain->Merge(filename,”fast”);

Philippe Canal (FNAL)15 Chep 2006, Mumbai, India TTree Indices Use to connect friend TTrees. Extended for TChains  Re-use its TTrees’ indexes  Requires the TTrees to be sorted // Create index using Run and Event numbers tree.BuildIndex("Run","Event"); // Read entry for Run=1234 and Event=56789 tree.GetEntryWithIndex(1234,56789); Main TreeUser Tree run event run event Indexed Main TreeUser Tree run event run event

Philippe Canal (FNAL)16 Chep 2006, Mumbai, India TTree Interface TTree::SetBranchAddress(object)  Speed improvements by ~ factor 20 Purists no longer need to reuse objects Objects can quickly bound for each Fill() call New overloaded call to TTree::Branch  Better type safety  Saves additional argument with the class name No more typos of class names for templated classes template TBranch *Branch(name, T **obj_address,…); example: MyObj* pObj = …; myTree->Branch(“Branch”,&ptr);

Philippe Canal (FNAL)17 Chep 2006, Mumbai, India Browsing extension Can now Browse:  Split objects  Unsplit objects  Collections And can now see  Simple member functions  Transient members  Persistent members

Philippe Canal (FNAL)18 Chep 2006, Mumbai, India Ongoing: Object Reference Support TBranch* TTree::BranchRef()  Creation of optional branch containing all information to find the branches of referenced objects.  Enabling this branch at write time saves the additional info ROOT and POOL support references to objects  ROOT: TRef  POOL: pool::Reference Need for automatic, implementation independent reference follow mechanism  TTree::Draw will automatically follow TRefs

Philippe Canal (FNAL)19 Chep 2006, Mumbai, India Other Improvements Consolidations, consolidations Improved thread safety Improve ACLiC dependency checking Extended TBits interface Enhanced TFormula’s run-time performance (by Marian Ivanov)

Philippe Canal (FNAL)20 Chep 2006, Mumbai, India Upcoming Features References  Will implement a TVirtualRefProxy providing a generic interface for reference objects (including GetObject, GetObjectType). This will be used by TTree::Draw to be able to dereference TRefs and pool::ref MakeProxy  Add support for STL containers  Add support for CINT-interpretation TTree  Indexing using bitmap algorithm (TBitMapIndex) from LBL (See John Wu’s talk)  TVirtualCut  TTree::Draw performance

Philippe Canal (FNAL)21 Chep 2006, Mumbai, India Posters 92 - ROOT 2D graphics visualisation techniques  Poster - Monday 13 February :00  Presenter: BRUN, Rene (CERN) 91 - ROOT 3D graphics overview and examples  Poster - Monday 13 February :00  Presenter: BRUN, Rene (CERN) Recent User Interface Developments in ROOT  Poster - Monday 13 February :00  Presenter: Mr. RADEMAKERS, Fons (CERN) ROOT/CINT/Reflex integration  Poster - Monday 13 February :00  Presenter: Dr. ROISER, Stefan (CERN) The structure of the new ROOT Mathematical Software Libraries  Poster - Wednesday 15 February :00  Presenter: Dr. MONETA, Lorenzo (CERN) XrdSec - A high-level C++ interface for security services in client-server applications  Poster - Wednesday 15 February :00  Presenter: GANIS, Gerardo (CERN) xrootd Server Clustering  Poster - Wednesday 15 February :00  Presenter: HANUSHEVSKY, Andrew (Stanford Linear Accelerator Center)

Philippe Canal (FNAL)22 Chep 2006, Mumbai, India Presentations ROOT in the era of multi-core CPUs  Plenary - Wednesday 15 February :00  Presenter: BRUN, Rene (CERN) 98 - PROOF - The Parallel ROOT Facility  Distributed Data Analysis - Monday 13 February :00  Presenter: GANIS, Gerardo (CERN) ROOT GUI, General Status  Software Tools and Information Systems - Monday 13 February :40  Presenter: RADEMAKERS, Fons (CERN) From Task Analysis to the Application Design  Software Tools and Information Systems - Monday 13 February :00  Presenter: Mr. RADEMAKERS, Fons (CERN) ROOT I/O for SQL databases  Software Components and Libraries - Monday 13 February :40  Presenter: Dr. LINEV, Sergey (GSI DARMSTADT) Reflex, reflection for C++  Software Components and Libraries - Tuesday 14 February :00  Presenter: Dr. ROISER, Stefan (CERN) New Developments of ROOT Mathematical Software Libraries  Software Components and Libraries - Tuesday 14 February :00  Presenter: Dr. MONETA, Lorenzo (CERN) New features in ROOT geometry modeller for representing non-ideal geometries  Software Components and Libraries - Wednesday 15 February :00  Presenter: BRUN, Rene (CERN) 93 – ROOT 3D graphics  Software Components and Libraries - Wednesday 15 February :00  Presenter: BRUN, Rene (CERN) Performance and Scalbility of xrootd  Distributed Data Analysis - Wednesday 15 February :00  Presenter: HANUSHEVSKY, Andrew (Stanford Linear Accelerator Center)

Philippe Canal (FNAL)23 Chep 2006, Mumbai, India Conclusions Even after 10 years of ROOT: The I/O area is still improving There were quite a number of developments  Full STL support  Data compression  Tree I/O from ASCII, tree indices There will be certainly some developments in the I/O area The “classical” stuff however is intended to be kept stable Main focus: Consolidation (Thread Safety) Generic Object Reference support  User defined reference objects supported by  User defined reference handlers (proxies)