Source-linked AI summary

ROOT - A C++ Framework for Petabyte Data Storage, Statistical Analysis and Visualization

Ilka Antcheva, Maarten Ballintijn, Bertrand Bellenot, Marek Biskup, Rene Brun, Nenad Buncic, Philippe Canal, Diego Casadei, Olivier Couet, Valery Fine, Leandro Franco, Gerardo Ganis, Andrei Gheata, David Gonzalez Maline, Masaharu Goto, Jan Iwaszkiewicz, Anna Kreshuk, Diego Marcos Segura, Richard Maunder, Lorenzo Moneta, Axel Naumann, Eddy Offermann, Valeriy Onuchin, Suzanne Panacek, Fons Rademakers, Paul Russo, Matevz Tadel

arXiv:1508.07749v1physics.data-ancs.DC

TL;DR

ROOT addresses efficient storage and analysis of very large scientific datasets. It combines object storage, vertically partitioned TTrees, statistical and visualization tools, interactive-to-compiled development, and PROOF for parallel analysis. The framework supports selective data access and distributed processing across large file collections and computing resources.

  • Problem

    ROOT addresses the problem of storing and analyzing petabyte-scale scientific data efficiently, including selective sparse scanning of HEP data.

  • Method

    ROOT combines a C++ object store, vertically partitioned TTree containers, broad analysis and visualization tools, interactive compilation, and PROOF parallel processing.

  • Results

    A 280 MB remotely hosted file required reading 6.6 MB during an example analysis using ROOT’s data-access approach.

  • Takeaways & Limitations

    ROOT provides a unified framework for storing, analyzing, visualizing, compiling, and parallelizing scientific data workflows.

Abstract

from arXiv · show

ROOT is an object-oriented C++ framework conceived in the high-energy physics (HEP) community, designed for storing and analyzing petabytes of data in an efficient way. Any instance of a C++ class can be stored into a ROOT file in a machine-independent compressed binary format. In ROOT the TTree object container is optimized for statistical data analysis over very large data sets by using vertical data storage techniques. These containers can span a large number of files on local disks, the web, or a number of different shared file systems. In order to analyze this data, the user can chose out of a wide set of mathematical and statistical functions, including linear algebra classes, numerical algorithms such as integration and minimization, and various methods for performing regression analysis (fitting). In particular, ROOT offers packages for complex data modeling and fitting, as well as multivariate classification based on machine learning techniques. A central piece in these analysis tools are the histogram classes which provide binning of one- and multi-dimensional data. Results can be saved in high-quality graphical formats like Postscript and PDF or in bitmap formats like JPG or GIF. The result can also be stored into ROOT macros that allow a full recreation and rework of the graphics. Users typically create their analysis macros step by step, making use of the interactive C++ interpreter CINT, while running over small data samples. Once the development is finished, they can run these macros at full compiled speed over large data sets, using on-the-fly compilation, or by creating a stand-alone batch program. Finally, if processing farms are available, the user can reduce the execution time of intrinsically parallel tasks - e.g. data mining in HEP - by using PROOF, which will take care of optimally distributing the work over the available resources in a transparent way.

PROGRAM SUMMARY

ROOT is a C++ framework for storing, analyzing, and visualizing scientific data, with object storage, analysis algorithms, visualization methods, and documented platform support.

  • ROOT is implemented in C++ and supports multiple processors, operating systems, and computer architectures.
  • ROOT addresses storage, analysis, and visualization of scientific data.
  • Its solution combines an object store with a broad range of analysis algorithms and visualization methods.
  • The framework’s running time depends on data size and the complexity of the analysis algorithms.

1 Introduction

ROOT is a CERN-developed C++ framework used for scientific data processing, analysis, simulation, and visualization. Its central workflow combines flexible storage and access with interactive development and parallel processing.

  • 1 Introduction: ROOT is a cross-platform C++ framework created at CERN and used by thousands of physicists for data analysis and visualization.
  • 1 Introduction: ROOT was started in 1995 and became the officially supported LHC analysis toolkit, with contributions from laboratories and users.
  • 1.2 Typical Uses of ROOT: Histograms support data binning, density estimation, statistical manipulation, and fitting while automatically redrawing after changes.
  • 1.2 Typical Uses of ROOT: CINT accelerates iterative development by removing compile and link steps during early analysis programming.
  • 1.1 Discovering ROOT: ROOT uses TTree vertical partitioning because HEP commonly requires selective, sparse data scanning.
  • 1.1 Discovering ROOT: TTree branches can be accessed independently, stored in separate buffers, and distributed across multiple ROOT files.
  • 1.1 Discovering ROOT: TChain makes multiple TFiles accessible as one logical entity while retaining TTree’s optimized data access.
  • 1.2 Typical Uses of ROOT: ROOT supports detector simulation through a Virtual Monte-Carlo interface that allows switching among Geant4, Geant3, and Fluka engines.

2 Description of the ROOT Framework

ROOT provides object storage and large-scale I/O through compressed ROOT files, reflective class descriptions, and TTrees optimized for selective access across distributed files.

  • Storage: ROOT is reported to store up to 50 petabytes and can use file systems, databases, storage protocols, or HTTP as storage backends.The I/O layer stores C++ objects across these systems.
  • Storage: Class descriptions stored with the data support reading objects without their original C++ definitions and enable schema evolution.ROOT can translate between stored and changed class formats in many cases.
  • Storage: ROOT stores C++ objects in compressed binary files with indexed, named chunks and hierarchical directories.TFile supports write-once, read-many usage, deletion, and data reuse.
  • TTree and I/O: TTrees optimize I/O and memory by recursively splitting objects into branches and buffers according to anticipated access patterns.Splitting can be automated from class dictionary information and is especially useful when analyses access only a few members.
  • TTree and I/O: Column-wise storage reads only needed member buffers, reducing I/O operations and transferred data while enabling block-wise reads and improved compression.The same data member often has similar values, benefiting Huffman encoding.
  • TTree and I/O: TChains present TTrees distributed across multiple files as one logical entity, supporting large or parallel analyses without exposing physical file boundaries.TChain inherits from TTree and preserves optimized access benefits.
  • TTree and I/O: Auto-adaptive prefetching reads the next entry while the current one is processed, making reasonable analyses viable over high-latency networks.An example reads 6.6 MB from a 280 MB CERN-hosted file over a 100 Mbit/sec connection.

2.2 Mathematical and Statistical Tools

ROOT integrates mathematical and statistical computing into its C++ framework through core numerical libraries, specialized extensions, minimization and fitting tools, simulation, and analysis packages.

  • Overview: ROOT provides advanced mathematical and statistical functions alongside C and C++ standard functions for broad data manipulation.The framework aims to support many operations through a small number of commands.
  • Core libraries: MathCore supplies probability distributions, random-number generators, integration, derivation, minimization, fitting interfaces, and multidimensional function evaluation.Its distribution functions include probability density, cumulative, and inverse functions.
  • Core libraries: MathMore extends MathCore with GSL-based special functions, additional numerical algorithms, and extra random-number generators.Examples include Bessel functions, elliptic integrals, and orthogonal polynomials.
  • Minimization and fitting: Numerical minimization and fitting use a common ROOT::Math::Minimizer interface with implementations including Minuit and Minuit2.These implementations provide methods such as Migrad and Simplex through C++ interfaces.
  • Linear algebra: ROOT offers matrix and vector packages for general linear algebra and optimized small fixed-size computations.The SMatrix package uses expression templates to optimize matrix and vector operations and reduce memory allocation.
  • Specialized tools: Additional packages support relativistic and geometric vectors, pseudo-random generation, Monte Carlo integration, FFT, and advanced statistical analysis.RooStats provides tools for confidence intervals, hypothesis tests, and combinations of analysis channels.

2.3 Histograms

ROOT uses histograms and graph classes to represent, manipulate, visualize, and fit binned or unbinned data, while preserving statistical information for analysis.

  • Data representation: ROOT supports binned analysis with histograms and unbinned analysis with TTree instances.Histograms are described as the most frequently used approach for statistical data analysis.
  • Histogram classes: TH1-derived classes represent one-, two-, and three-dimensional histograms, profile histograms, and different bin-count types.Profile histograms display a variable’s mean and standard deviation across bins of another variable.
  • Histogram classes: Each histogram bin stores a value and uncertainty, while histograms also retain underflow, overflow, entry counts, integrals, and summary statistics.Binning supports constant or variable step sizes, with higher-dimensional projection and slicing capabilities.
  • Histogram operations: Histograms support arithmetic operations, rebinning, and statistical comparisons such as chi-square tests.Operations can combine histograms with other histograms, functions, or scalars.
  • Graphs: TGraph and TGraph2D display and analyze coordinate data, with derived classes supporting symmetric or asymmetric errors.These classes also provide fitting, interpolation, and smoothing.
  • Fitting: ROOT fits binned and unbinned data with parametric functions represented by TF1, TF2, or TF3 and created from code or mathematical expressions.The interactive fit panel allows users to select functions, initialize parameters, and control fit options.

2.4 Graphics and User Interface

ROOT integrates interactive graphics, fitting controls, canvases, image output, three-dimensional visualization, event displays, and a programmable GUI within its C++ framework.

  • Graphics: TCanvas stores drawn objects, supports multiple pads, and exports publication-quality PostScript or PDF, raster images, or reproducible C++ macros.Pads subdivide a canvas into independent graphical areas.
  • Fitting: The fit panel selects functions, fit methods, initial parameters, limits, minimization options, and parameter scan or contour plots.It is available interactively from the canvas or suitable ROOT objects.
  • Graphics: ROOT supports editable two-dimensional graphics through pads, coordinate systems, automatic repainting, interactive object editors, and platform-specific graphics engines.X11, Win32, Qt, and libAfterImage provide platform or bitmap support.
  • 3D visualization: OpenGL-based three-dimensional visualization represents detector geometries and data through ROOT’s scene-graph management and rendering engine.Geometries can use lego and surface plots, while event visualization is provided by EVE.
  • User interface: ROOT’s GUI combines standard widgets with C++ storage, CINT interpretation, signal/slot communication, and a GUI builder for creating and saving interfaces as macros.The GUI builder supports selecting, positioning, grouping, and configuring interface elements.

2.5 Simulation

ROOT provides geometry construction, visualization, storage, and simulation interfaces for detector modeling and particle transport across multiple Monte Carlo engines.

  • Monte Carlo interface: TVirtualMC provides a virtual interface that lets users select Geant3, Geant4, or Fluka at runtime while retaining a simulation-independent application.Applications implement a derived Monte Carlo class and lifecycle functions.
  • Geometry: The ROOT geometry package builds, browses, and visualizes detector geometries independently of Monte Carlo engines while optimizing particle transport interfaces.It is designed to work with Geant3, Geant4, and Fluka.
  • Adoption: Most HEP detectors have been modeled with ROOT geometry, and GDML supports exchanging geometries with other formats such as Geant3 and Geant4.The ROOT test suite tracks particles to 35 large detectors.
  • Geometry: ROOT describes complex geometries hierarchically using volumes, materials, spatial transformations, primitive shapes, containment, and geometric operations.Volumes can be positioned repeatedly or divided according to user-defined patterns.
  • Geometry tools: Geometry can be saved or loaded as ROOT files or C++ macros, and individual volumes can be edited through TGeoManager’s graphical interface.The Export(), Import(), and Edit() methods support these operations.
  • Simulation: ROOT supports particle tracking and track visualization, while its geometry package supplies detector descriptions for simulations that model particle interactions and readout.Tracks can be stored and visualized with TGeoTrack.

2.6 Interpreters

ROOT uses CINT to support interactive C++ analysis and transitions code into compiled libraries through ACLiC, addressing the otherwise cumbersome build process.

  • CINT: CINT is an almost full ANSI-compliant C/C++ interpreter used interactively or in headless batch mode as ROOT’s non-graphical interface.It supports gradual analysis development through repeated code changes and runs.
  • Interoperability: CINT allows interpreted and compiled code to call each other, enabling interpreted commands to invoke ROOT libraries and compiled code to execute interpreted functions.The transition uses stubs and function pointers.
  • Language interfaces: ROOT also provides PyROOT and Ruby interfaces, while C++ interpretation preserves a homogeneous language between interpreted and compiled code.The interfaces support dynamic call translation, late binding, and runtime flexibility.
  • Runtime uses: The interpreter supports dynamic signal/slot communication, executable documentation examples, runtime plugin selection, and helper calls within ROOT’s I/O framework.These uses resolve functions or implementations dynamically rather than relying only on link-time symbols.
  • Compilation challenge: Interpreted code runs slower than compiled code, and conventional migration requires generating, compiling, linking, and loading dictionaries and binaries.Dependency tracking and external build steps make migration from interpreter to binary non-smooth.
  • ACLiC: ACLiC hides build complexity, compiles source on demand into shared libraries, and supports combining multiple source files through a wrapper.It provides an integrated build system across supported platforms.
  • Future direction: The smooth interpreted-to-compiled transition provided by ACLiC led ROOT to consider true just-in-time compilation using technologies such as LLVM.This represents a possible alternative to invoking external tools through ACLiC.

2.7 Parallel Processing Using PROOF

PROOF extends ROOT with transparent parallel analysis for independent subtasks, dynamically balancing work across clusters or multicore machines and supporting interactive monitoring and result aggregation.

  • Goals and scope: PROOF parallelizes independent subtasks across clusters or many-core machines for interactive analysis of large ROOT-file collections.Its design goals include transparency, scalability, and adaptability to changing remote conditions.
  • Architecture: PROOF supports multi-tier deployments that federate geographically separated clusters, while PROOF-Lite merges the master into the client for multicore desktops.The architecture distributes work and result merging across master layers.
  • Multicore execution: PROOF has been shown efficient on many-core processors, and PROOF-Lite provides an out-of-the-box way to use additional desktop or laptop cores.The paper specifically describes this as a dedicated version for multicore machines.
  • Execution modes: Interactive-batch mode lets users disconnect from long queries and later monitor progress or retrieve intermediate results from any location.This differs from batch systems that return results only after all sub-jobs finish and merge.
  • Load balancing: PROOF uses fine-grained pull-based scheduling: workers request packets, and the packetizer sizes them from observed processing rates to balance completion times.The packetizer assigns each work packet and adapts to worker and file-transfer variability.
  • Programming model: The TSelector framework structures event-level processing into Begin, Process, and Terminate stages, with Process being the parallelizable stage.Begin defines the job, Process handles events, and Terminate manipulates results.
  • Result aggregation: Workers return named results that masters aggregate by type; adding intermediate histograms reproduces the histogram from one worker processing all events.Non-combinable results are returned in collections, and user-defined classes can use the aggregation API.
  • Monitoring: Users can monitor processed events, files, completion percentage, and estimated time, while registered histograms update dynamically during execution.Dynamic displays support detailed monitoring of large datasets and educational demonstrations.

3 Installation Instructions

ROOT installation covers obtaining source code, configuring and compiling it with standard open-source tools, and consulting the project website for complete build instructions.

  • 3 Installation Instructions: ROOT can be built from source on all supported platforms using Subversion, configure, and make.
  • 3.1 Getting the Source: The source tarball can be obtained via FTP.
  • 3.1 Getting the Source: The documented FTP procedure downloads root_<version>.source.tar.gz and extracts it with gzip and tar.
  • 3.1 Getting the Source: The source is also available directly from the public Subversion repository.
  • 3.1 Getting the Source: A specific ROOT tag can be obtained with an svn co command targeting the versioned repository path.
  • 3.2 Compiling: Compiling ROOT is presented as a configure-and-make procedure.
  • 3.2 Compiling: The ./configure script identifies the platform and checks for third-party libraries required by optional plugins.
  • 3.2 Compiling: The ROOT website provides a complete description of the build procedure.

4 Test Run Description

ROOT provides tutorial macros for interpreter-based or compiled execution and standalone test programs built with make. Benchmark and stress tests report ROOTMARKS performance values.

  • 4 Test Run Description: Tutorial test programs are macros that can run through CINT or compile via ACLiC.
  • 4 Test Run Description: The benchmark macro runs from the tutorials directory through the ROOT interpreter using .x benchmarks.C.
  • 4 Test Run Description: 1120.18 ROOTMARKS is reported when the benchmark macro completes without errors on a properly installed ROOT system.
  • 4 Test Run Description: Programs in the test directory are standalone executables built by running make.
  • 4 Test Run Description: The test suite includes demo programs and stress programs such as stress, stressGeometry, and stressGraphics.
  • 4 Test Run Description: 859.2 ROOTMARKS is returned by the stress program run with the -b 30 option.
Loading 1508.07749v1…