# Newbie

**URL:** https://root-forum.cern.ch/c/newbie/26.md?page=86

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

**Page:** 87

---

## [THStack doesn't keep histograms](https://root-forum.cern.ch/t/thstack-doesnt-keep-histograms/41735)

<div class="topic-metadata">

**Author:** [@MartinSerfling](https://root-forum.cern.ch/u/MartinSerfling)\
**Replies:** 3\
**Last updated:** [October 7, 2020, 11:23am UTC](https://root-forum.cern.ch/t/thstack-doesnt-keep-histograms/41735 "2020-10-07T11:23:49Z")

</div>

Hi there, I am going crazy with THStack and need some help to find the mistake I’m apparently making. I loop over a couple of files, each filling multiple histograms and adding them to several THStacks hst\[i\]. However, …

---

## [ROOT crash after system reinstallation](https://root-forum.cern.ch/t/root-crash-after-system-reinstallation/41740)

<div class="topic-metadata">

**Author:** [@Kasjopea](https://root-forum.cern.ch/u/Kasjopea)\
**Replies:** 1\
**Last updated:** [October 6, 2020, 6:36pm UTC](https://root-forum.cern.ch/t/root-crash-after-system-reinstallation/41740 "2020-10-06T18:36:07Z")

</div>

Hello, I’ve been using ROOT for the past three months but I had to reinstall the whole system (Linux Mint 20.04) and now ROOT crashes. I installed the same way as I did the previous time, using precompiled binary, but …

---

## [TTrees not hadding properly](https://root-forum.cern.ch/t/ttrees-not-hadding-properly/41511)

<div class="topic-metadata">

**Author:** [@d372](https://root-forum.cern.ch/u/d372)\
**Replies:** 6\
**Last updated:** [October 6, 2020, 12:44pm UTC](https://root-forum.cern.ch/t/ttrees-not-hadding-properly/41511 "2020-10-06T12:44:11Z")

</div>

I have an analysis script that takes as input a root file and creates a new root file containing a tree with one branch that my script fills. However, I noticed that if I hadd two of my input root files and run the scrip…

---

## [Skipping empty entries in a TBranch](https://root-forum.cern.ch/t/skipping-empty-entries-in-a-tbranch/41600)

<div class="topic-metadata">

**Author:** [@ChilufyaM](https://root-forum.cern.ch/u/ChilufyaM)\
**Replies:** 2\
**Last updated:** [October 6, 2020, 12:19pm UTC](https://root-forum.cern.ch/t/skipping-empty-entries-in-a-tbranch/41600 "2020-10-06T12:19:08Z")

</div>

Hello all, I’m trying to read some information on a branch from one TTree (t) and write it to another TTree (t1). However, my code crashes when it finds an empty entry (I think), and the seg fault doesn’t say anything h…

---

## [Read TMap from a file](https://root-forum.cern.ch/t/read-tmap-from-a-file/41286)

<div class="topic-metadata">

**Author:** [@ibordule](https://root-forum.cern.ch/u/ibordule)\
**Replies:** 2\
**Last updated:** [October 6, 2020, 10:43am UTC](https://root-forum.cern.ch/t/read-tmap-from-a-file/41286 "2020-10-06T10:43:57Z")

</div>

Hello! I have a problem with reading the TMap object from a root file. Here is the simple code, how I create this TMap and save it to the file: void TMap\_structure() { TFile f("filespeed.root","recreate"); TMa…

---

## [IncrementalExecutor::executeFunction: symbol '\_Z4sqrtf' unresolved](https://root-forum.cern.ch/t/incrementalexecutor-symbol-z4sqrtf-unresolved/41374)

<div class="topic-metadata">

**Author:** [@odylalalaaa](https://root-forum.cern.ch/u/odylalalaaa)\
**Replies:** 1\
**Last updated:** [October 6, 2020, 10:27am UTC](https://root-forum.cern.ch/t/incrementalexecutor-symbol-z4sqrtf-unresolved/41374 "2020-10-06T10:27:08Z")

</div>

hi, im using root 6.13 gcc Apple clang version 11.0.3 (clang-1103.0.32.62) Python 2.7.16 recently i updated my os to the latest catalina 10.15 i then came across this error : IncrementalExecutor::executeFunction: s…

---

## [Using histograms from different macros](https://root-forum.cern.ch/t/using-histograms-from-different-macros/41603)

<div class="topic-metadata">

**Author:** [@peanuts](https://root-forum.cern.ch/u/peanuts)\
**Replies:** 2\
**Last updated:** [October 6, 2020, 9:39am UTC](https://root-forum.cern.ch/t/using-histograms-from-different-macros/41603 "2020-10-06T09:39:55Z")

</div>

Hello, I’m new to Root and C++ programming. I have some histograms (h1, h2, h3) in a macro, say macro.C, and I would like to create a new different macro, say newmacro.C, in which I want to use the macro.C’s histograms…

---

## [Ascii file to ttree](https://root-forum.cern.ch/t/ascii-file-to-ttree/41645)

<div class="topic-metadata">

**Author:** [@Lee](https://root-forum.cern.ch/u/Lee)\
**Replies:** 3\
**Last updated:** [October 6, 2020, 9:34am UTC](https://root-forum.cern.ch/t/ascii-file-to-ttree/41645 "2020-10-06T09:34:33Z")

</div>

Hi, I want to save ascii file data in to my ttree. However, the problem is that for every ascii file, I have some explanation on the top part of the file. This text makes me hard to bring only the data numbers. My code …

---

## [Installation error: make error](https://root-forum.cern.ch/t/installation-error-make-error/41693)

<div class="topic-metadata">

**Author:** [@NewRootUser](https://root-forum.cern.ch/u/NewRootUser)\
**Replies:** 1\
**Last updated:** [October 6, 2020, 9:22am UTC](https://root-forum.cern.ch/t/installation-error-make-error/41693 "2020-10-06T09:22:10Z")

</div>

I have installed Ubuntu 20.04 and now I’m trying to install the root. But I’m getting the error repeatedly. I tried vs. 6.14 and 6.16. Please help me to get out of this. The error: \[ 4%\] Built target move\_header\_core…

---

## [Error Building ROOT on MaCOS Catalina](https://root-forum.cern.ch/t/error-building-root-on-macos-catalina/41687)

<div class="topic-metadata">

**Author:** [@ahmat](https://root-forum.cern.ch/u/ahmat)\
**Replies:** 2\
**Last updated:** [October 5, 2020, 11:08pm UTC](https://root-forum.cern.ch/t/error-building-root-on-macos-catalina/41687 "2020-10-05T23:08:05Z")

</div>

Hi, I’m getting the following error when building the latest version of ROOT. git clone https://github.com/root-project/root mkdir rootbuild rootinstall cd rootbuild cmake -DCMAKE\_INSTALL\_PREFIX=../rootinstall -DPython…

---

## [Reading and writing ttrees](https://root-forum.cern.ch/t/reading-and-writing-ttrees/40806)

<div class="topic-metadata">

**Author:** [@fisherp](https://root-forum.cern.ch/u/fisherp)\
**Replies:** 2\
**Last updated:** [October 5, 2020, 6:38pm UTC](https://root-forum.cern.ch/t/reading-and-writing-ttrees/40806 "2020-10-05T18:38:45Z")

</div>

I have a program that reads a tree from a file and writes the tree to another file based on a selection. The initialization takes place in one routine, selection and fill in another, and writing in a third. The problem …

---

## [Problem instaling ROOT 6.23.01 on Mac Catalina 10.15.6](https://root-forum.cern.ch/t/problem-instaling-root-6-23-01-on-mac-catalina-10-15-6/41689)

<div class="topic-metadata">

**Author:** [@Alan\_H](https://root-forum.cern.ch/u/Alan_H)\
**Replies:** 2\
**Last updated:** [October 5, 2020, 10:50am UTC](https://root-forum.cern.ch/t/problem-instaling-root-6-23-01-on-mac-catalina-10-15-6/41689 "2020-10-05T10:50:18Z")

</div>

Hi, I am trying to install ROOT on my Mac Catalina 10.15.6. I already had xQuartz. I am using my Z shell (zsh). I downloaded Cmake (version 3.18.3) using brew install cmake. And then I did: cd /usr/local/ sudo git clone…

---

## [Divide() canvas not working](https://root-forum.cern.ch/t/divide-canvas-not-working/41701)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 2\
**Last updated:** [October 5, 2020, 7:01am UTC](https://root-forum.cern.ch/t/divide-canvas-not-working/41701 "2020-10-05T07:01:29Z")

</div>

I am trying to follow this worksheet from Hance and recreate the invariant mass plot below from his root file. I have attached my code and the root file can be downloaded from the website. Anyway, when I try to run my c…

---

## [Malloc failed error](https://root-forum.cern.ch/t/malloc-failed-error/41628)

<div class="topic-metadata">

**Author:** [@Fateme](https://root-forum.cern.ch/u/Fateme)\
**Replies:** 18\
**Last updated:** [September 30, 2020, 8:11am UTC](https://root-forum.cern.ch/t/malloc-failed-error/41628 "2020-09-30T08:11:17Z")

</div>

Hello everyone, I am trying to read a ROOT File, write the data in an array and then some calculation will done.I have around 221 million data number in this ROOT File. When I run my macro I have this error : Internal…

---

## [Pylint error "no-name-in-module"](https://root-forum.cern.ch/t/pylint-error-no-name-in-module/41651)

<div class="topic-metadata">

**Author:** [@no\_pro](https://root-forum.cern.ch/u/no_pro)\
**Replies:** 5\
**Last updated:** [October 2, 2020, 2:23pm UTC](https://root-forum.cern.ch/t/pylint-error-no-name-in-module/41651 "2020-10-02T14:23:29Z")

</div>

Hello everyone, I am working with PyROOT in my master thesis and I got some messy code to work with which is not formatted correctly according to pep8. I thought in the process of going through the code I could try to “…

---

## [Creating histograms through a function](https://root-forum.cern.ch/t/creating-histograms-through-a-function/41658)

<div class="topic-metadata">

**Author:** [@LoekMeijers](https://root-forum.cern.ch/u/LoekMeijers)\
**Replies:** 2\
**Last updated:** [October 1, 2020, 3:10pm UTC](https://root-forum.cern.ch/t/creating-histograms-through-a-function/41658 "2020-10-01T15:10:14Z")

</div>

Hi root community, In my code I want to create different histograms like such: TH1D\* D0\_x = new TH1D("D0\_x\_vertex", "D\_{0} production vertex x", 10000, -1, 1); TH1D\* D0\_y = new TH1D("D0\_y\_vertex", "D\_{0} production ver…

---

## [Simple file browser](https://root-forum.cern.ch/t/simple-file-browser/41285)

<div class="topic-metadata">

**Author:** [@StephenAdler](https://root-forum.cern.ch/u/StephenAdler)\
**Replies:** 5\
**Last updated:** [September 30, 2020, 9:09am UTC](https://root-forum.cern.ch/t/simple-file-browser/41285 "2020-09-30T09:09:40Z")

</div>

I want to write some code into my .C macro which when called, pops up a file browser which I can use to navigate my file system and choose a file. When I choose the file, a string is returned with the full path and filen…

---

## [Correlation coefficient from GetCorrelationFactor()](https://root-forum.cern.ch/t/correlation-coefficient-from-getcorrelationfactor/41643)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [September 29, 2020, 9:23am UTC](https://root-forum.cern.ch/t/correlation-coefficient-from-getcorrelationfactor/41643 "2020-09-29T09:23:25Z")

</div>

Dear, I was wondering if GetCorrelationFactor() checks for non-linear correlations, or only linear correlations (Pearson correlation coefficient)? Also, is there way to estimate the correlation function using Root? tha…

---

## [Write RDataFrame.Report to root file](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623)

<div class="topic-metadata">

**Author:** [@tancredi](https://root-forum.cern.ch/u/tancredi)\
**Replies:** 3\
**Last updated:** [September 29, 2020, 6:41am UTC](https://root-forum.cern.ch/t/write-rdataframe-report-to-root-file/41623 "2020-09-29T06:41:31Z")

</div>

Hello, I am using the report feature of RDataFrame Is it possible to write the cut-flow to a Rootfile or even better merge via hadd ? Regards, Tancredi

---

## [SetTitle slows down RDataFrame performance](https://root-forum.cern.ch/t/settitle-slows-down-rdataframe-performance/41627)

<div class="topic-metadata">

**Author:** [@tancredi](https://root-forum.cern.ch/u/tancredi)\
**Replies:** 1\
**Last updated:** [September 28, 2020, 12:13pm UTC](https://root-forum.cern.ch/t/settitle-slows-down-rdataframe-performance/41627 "2020-09-28T12:13:32Z")

</div>

Hello, this is probably a feature, but I run into something rather natural for data analysis that slows downs the RDataFrame performance. I attach a test program based on an existing tutorial. The timing performance is…

---

## [Subscript errors when attempting to index branch objects](https://root-forum.cern.ch/t/subscript-errors-when-attempting-to-index-branch-objects/41611)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 5\
**Last updated:** [September 28, 2020, 1:07pm UTC](https://root-forum.cern.ch/t/subscript-errors-when-attempting-to-index-branch-objects/41611 "2020-09-28T13:07:23Z")

</div>

HEP\_practice.C (6.7 KB) I am trying to follow this worksheet from Hance and recreate the invariant mass plot below from his root file. I have attached my code and the root file can be downloaded from the website. Anywa…

---

## [Missing packages](https://root-forum.cern.ch/t/missing-packages/41605)

<div class="topic-metadata">

**Author:** [@EVTO](https://root-forum.cern.ch/u/EVTO)\
**Replies:** 3\
**Last updated:** [September 28, 2020, 12:23pm UTC](https://root-forum.cern.ch/t/missing-packages/41605 "2020-09-28T12:23:35Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided Hi. I’m trying to install ROOT on ubuntu 16 (I can’t install newer ver…

---

## [Facing an unexpected warning while fitting efficiency plot](https://root-forum.cern.ch/t/facing-an-unexpected-warning-while-fitting-efficiency-plot/41582)

<div class="topic-metadata">

**Author:** [@robertfroast](https://root-forum.cern.ch/u/robertfroast)\
**Replies:** 7\
**Last updated:** [September 25, 2020, 4:53pm UTC](https://root-forum.cern.ch/t/facing-an-unexpected-warning-while-fitting-efficiency-plot/41582 "2020-09-25T16:53:06Z")

</div>

Hi All, I am plotting a graph and getting a unknown error. Kindly look at the error. ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided

---

## [VecOps Construct with ROOT::Math::LorentzVector example](https://root-forum.cern.ch/t/vecops-construct-with-root-lorentzvector-example/41595)

<div class="topic-metadata">

**Author:** [@zhubacek](https://root-forum.cern.ch/u/zhubacek)\
**Replies:** 4\
**Last updated:** [September 28, 2020, 7:46am UTC](https://root-forum.cern.ch/t/vecops-construct-with-root-lorentzvector-example/41595 "2020-09-28T07:46:03Z")

</div>

Hello, Following the question in https://root-forum.cern.ch/t/creating-a-column-of-std-vector-root-ptetaphievector-with-rdataframe/34151 I switched to ROOT 6.22.02, but the Construct example doesn’t work for me: (http…

---

## [Read variables inside branch](https://root-forum.cern.ch/t/read-variables-inside-branch/41619)

<div class="topic-metadata">

**Author:** [@Stepennov](https://root-forum.cern.ch/u/Stepennov)\
**Replies:** 1\
**Last updated:** [September 27, 2020, 7:36pm UTC](https://root-forum.cern.ch/t/read-variables-inside-branch/41619 "2020-09-27T19:36:54Z")

</div>

Dear experts, I’m trying to read output .root file from TMVA, but there is branch format, that I don’t know how to read. Inside the tree there is branch BDTG, which contains several variables - outputs for different cl…

---

## [How to set legends](https://root-forum.cern.ch/t/how-to-set-legends/41477)

<div class="topic-metadata">

**Author:** [@Afzaal786](https://root-forum.cern.ch/u/Afzaal786)\
**Replies:** 2\
**Last updated:** [September 26, 2020, 4:30pm UTC](https://root-forum.cern.ch/t/how-to-set-legends/41477 "2020-09-26T16:30:21Z")

</div>

Hi, how to set legends in histograms(root file)?

---

## [Two different mc data sets](https://root-forum.cern.ch/t/two-different-mc-data-sets/41586)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 6\
**Last updated:** [September 25, 2020, 3:32pm UTC](https://root-forum.cern.ch/t/two-different-mc-data-sets/41586 "2020-09-25T15:32:44Z")

</div>

Hello, I am trying to produce a plot where I have a toy mc data set as the background given by a five parameter function, and a gaussian toy mc data set fitted to a gaussian curve, something like below: p5\_and\_gaus.pd…

---

## [RDataFrame TLorentzVector Basic VecOps?](https://root-forum.cern.ch/t/rdataframe-tlorentzvector-basic-vecops/36769)

<div class="topic-metadata">

**Author:** [@vcroft](https://root-forum.cern.ch/u/vcroft)\
**Replies:** 4\
**Last updated:** [September 25, 2020, 1:24pm UTC](https://root-forum.cern.ch/t/rdataframe-tlorentzvector-basic-vecops/36769 "2020-09-25T13:24:22Z")

</div>

Howdy folks, I’ve been struggling with these for a while and figured it might be easier and useful here. Imagine I have a file with events that contain two containers leptons and jets. there can be x leptons and y each …

---

## [RDataFrame Min function does not compile](https://root-forum.cern.ch/t/rdataframe-min-function-does-not-compile/41573)

<div class="topic-metadata">

**Author:** [@tancredi](https://root-forum.cern.ch/u/tancredi)\
**Replies:** 5\
**Last updated:** [September 25, 2020, 8:57am UTC](https://root-forum.cern.ch/t/rdataframe-min-function-does-not-compile/41573 "2020-09-25T08:57:32Z")

</div>

Hello, I can not compile the Min() function in the RDataFrame class (Max() works by the way…) I attach test.py (574 Bytes) a simple macro where you can see the problem. Here is the result on lxplus: python -i test.py …

---

## [Ways to work around the redefinition of compiled functions in one single Notebook session?](https://root-forum.cern.ch/t/ways-to-work-around-the-redefinition-of-compiled-functions-in-one-single-notebook-session/41442)

<div class="topic-metadata">

**Author:** [@Fanurs](https://root-forum.cern.ch/u/Fanurs)\
**Replies:** 4\
**Last updated:** [September 25, 2020, 7:34am UTC](https://root-forum.cern.ch/t/ways-to-work-around-the-redefinition-of-compiled-functions-in-one-single-notebook-session/41442 "2020-09-25T07:34:05Z")

</div>

I’m working with PyROOT on a Notebook environment. Let’s say I’ve created a function and compiled it with ROOT.Numba, e.g. entering something below in a code cell: import ROOT @ROOT.Numba.Declare(\['float', 'int'\], 'floa…

[Previous page](https://root-forum.cern.ch/c/newbie/26.md?page=85)

[Next page](https://root-forum.cern.ch/c/newbie/26.md?page=87)
