Questions tagged [root-framework]

ROOT is an object-oriented framework developed by CERN written in C++. It is especially designed to efficiently handle large amounts of data.

ROOT is an object-oriented framework for particle physics data analysis. It is developed by CERN and written in C++ with bindings to other languages, most notably Python. It has classes for histogramming, graphs, fitting, basic matrix algebra, Lorentz vector algebra, 3D visualization and more. Almost all ROOT objects can be persisted when writing them to a file.

ROOT is the base framework for the RooFit and RooStat projects, devoted to statistical analysis, and for TMVA for multivariate analysis (machine learning).

ROOT has interface to python (PyROOT ) and to Ruby.

ROOT provides C++ interpreters, CINT (ROOT5 and earlier) and Cling (ROOT6 or later).

ROOT can be used in Jupyter notebooks with python and c++ (root notebooks).

Official support is at https://root-forum.cern.ch/.

Related tags:

328 questions
19
votes
6 answers

How to modify C++ code from user-input

I am currently writing a program that sits on top of a C++ interpreter. The user inputs C++ commands at runtime, which are then passed into the interpreter. For certain patterns, I want to replace the command given with a modified form, so that I…
Eldritch Cheese
  • 1,177
  • 11
  • 21
18
votes
3 answers

Python garbage collection can be that slow?

I have a problem with my python application, and I think it's related to the python garbage collection, even if I'm not sure... The problem is that my application takes a lot of time to exit and to switch to one function to the next one. In my…
rmbianchi
  • 6,241
  • 6
  • 26
  • 27
16
votes
5 answers

Clion or cmake does not see environment variable

I'm using CLion IDE, Cmake and trying to write Hello world using CERN ROOT library. CMakeLists.txt: message(STATUS $ENV{ROOTSYS}) ~/.bashrc: export ROOTSYS="$HOME/tools/root-build/" During build in CLion $ENV{ROOTSYS} is empty by some reason. But…
A.Sizov
  • 171
  • 1
  • 1
  • 7
7
votes
3 answers

Implementing a dired interface in emacs for something other than the filesystem?

The ROOT data analysis framework commonly used in high energy physics uses a binary file format that has internal structure like a real filesystem (i.e. folder & files). The ls() method output from the program look something like this: KEY: TH1D …
polyglot
  • 9,945
  • 10
  • 49
  • 63
6
votes
1 answer

Python/Numpy/Scipy - Converting string to mathematical function

I am in the somewhat unfortunate position to try to convert a program from the depths of CERN ROOT to python. In ROOT code (CINT in itself is an abomination imo), one can store mathematical functions as a "string" and pass these along to ROOT for…
madtowneast
  • 2,350
  • 3
  • 22
  • 31
6
votes
0 answers

Python C API: omitted variable assignment causes unexpected behaviour

While using python with pyroot (a python interface to a CERN data analysis package named ROOT), I encountered the following strange behaviour: print ROOT.TFile(fname).GetListOfKeys() outputs None while the seemingly semantically equivalent…
user2247306
  • 183
  • 4
6
votes
1 answer

"Undefined reference" error when using custom destructor

I'm trying to write a class that needs to deallocate some memory, so I've defined a custom destructor. This is compiled as a shared library. However, when I try to compile a basic program to use that library, I'm getting the usual "undefined…
Wheels2050
  • 879
  • 2
  • 9
  • 17
5
votes
3 answers

Unable to locate package openssl-dev

I'm trying to install the ROOT CERN packages on linux, using Ubuntu 18.04, and whenever I get into the prerequisites download, with this command: sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev…
5
votes
1 answer

how can I use CERN Root with C++17?

Apparently, CERN's "Root" software is compatible (as of version 6.12) with C++17. However, I have been completely unable to get this to work with the newest version (6.20) and all previous questions I found on this topic are from a few years…
user366202
  • 249
  • 2
  • 7
5
votes
0 answers

Pycharm SSH remote interpreter: editor doesn't recognize module

I'm currently trying to get PyCharm running with a remote interpreter via SSH. The connection itself is working well, however one of my imported modules "ROOT" is not recognized by the editor ("No module named ROOT" at the "import ROOT"…
0vbb
  • 839
  • 11
  • 27
5
votes
4 answers

Setting up CERN ROOT with an IDE

I'm interested in setting up an IDE (preferably Eclipse or Netbeans) for a project that uses C++ and ROOT and have it be able to compile for me. Is this possible? Source code is available for ROOT, so there should be some way of hooking these things…
Ryuho Kudo
  • 183
  • 3
  • 6
4
votes
3 answers

Graphing with Cern ROOT

I am trying to create a graph and save it as an image. I am required to use ROOT. I created the graph with TGraph graph = TGraph(xvect, yvect); but now I'm stuck on how to get that saved as a png (or other image format). I'm using a linux…
mrswmmr
  • 2,081
  • 5
  • 21
  • 23
4
votes
1 answer

Using subprocess for compiling a c++ program from python script

I know there are some similar questions, here Invoking C compiler using Python subprocess command and subprocess, invoke C-program from within Python but I believe my question is in some sense different. I need to compile a c++ program which uses…
4
votes
1 answer

Reading a TTree in root using PyRoot

I just started using pyroot to read root files and I can't read the data from a file using jupyter notebook. Here is how the TBrowser looks like: I started like this: import ROOT as root import numpy as np f = root.TFile("RealData.root") myTree =…
Silviu
  • 749
  • 3
  • 7
  • 17
4
votes
1 answer

How does PyROOT change the python interpreter?

If I try to run .ls in python, not surprisingly I get a SyntaxError >>> .ls File "", line 1 .ls ^ SyntaxError: invalid syntax But if I import PyROOT, it somehow makes this syntax legal (and behaves as it does in ROOT, listing the…
Heshy
  • 382
  • 1
  • 10
1
2 3
21 22