# Newbie

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

[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:** 70

---

## [Reading Tree data from different events in the same loop (coincidences)](https://root-forum.cern.ch/t/reading-tree-data-from-different-events-in-the-same-loop-coincidences/45861)

<div class="topic-metadata">

**Author:** [@Daniel\_Lopez](https://root-forum.cern.ch/u/Daniel_Lopez)\
**Replies:** 2\
**Last updated:** [July 16, 2021, 12:19pm UTC](https://root-forum.cern.ch/t/reading-tree-data-from-different-events-in-the-same-loop-coincidences/45861 "2021-07-16T12:19:06Z")

</div>

Hello all, I have a Tree that looks like: I now how to extract, for each event, all the data with a for loop: E = np.array( \[\] ) #store the Energy for event in tree: #for each event, store the d…

---

## [Error: illegal pointer to class object \<histogram\> 0x0 1401](https://root-forum.cern.ch/t/error-illegal-pointer-to-class-object-histogram-0x0-1401/45873)

<div class="topic-metadata">

**Author:** [@tachyon](https://root-forum.cern.ch/u/tachyon)\
**Replies:** 2\
**Last updated:** [July 16, 2021, 8:06am UTC](https://root-forum.cern.ch/t/error-illegal-pointer-to-class-object-histogram-0x0-1401/45873 "2021-07-16T08:06:16Z")

</div>

I’ve got this error message and I wrote the part of my code below, TH2D\* fg2d\_temp\[8\]\[4\] = {0}; fg2d\_temp\[0\]\[0\] = (TH2D\*)fin-\>Get(“fg2d\_0\_0”); fg2d\[0\]\[0\] = (TH2D\*)fg2d\_temp\[0\]\[0\]-\>Clone(); I’ve checked that fg2d\_temp…

---

## [Questions about using sumw2 while making ratioplot](https://root-forum.cern.ch/t/questions-about-using-sumw2-while-making-ratioplot/45838)

<div class="topic-metadata">

**Author:** [@Ang-Li-95](https://root-forum.cern.ch/u/Ang-Li-95)\
**Replies:** 5\
**Last updated:** [July 16, 2021, 1:17am UTC](https://root-forum.cern.ch/t/questions-about-using-sumw2-while-making-ratioplot/45838 "2021-07-16T01:17:00Z")

</div>

Dear experts, I am trying to make a ratio plot using two histograms and I saw an example here: ROOT: tutorials/hist/ratioplot1.C File Reference There is a line calling h1-\>Sumw2(); I am confused about why do we want t…

---

## [How to debug ROOT on Linux?](https://root-forum.cern.ch/t/how-to-debug-root-on-linux/45778)

<div class="topic-metadata">

**Author:** [@PBosca](https://root-forum.cern.ch/u/PBosca)\
**Replies:** 6\
**Last updated:** [July 15, 2021, 10:12pm UTC](https://root-forum.cern.ch/t/how-to-debug-root-on-linux/45778 "2021-07-15T22:12:48Z")

</div>

Hello, I have a macro to output a file with a tree and branches but I keep running into faults (corrupted size vs. prev\_size) which I’ve read online are related to memory allocation. I am using vectors, .push\_back, and …

---

## [Including root in Qt6](https://root-forum.cern.ch/t/including-root-in-qt6/45863)

<div class="topic-metadata">

**Author:** [@Andr](https://root-forum.cern.ch/u/Andr)\
**Replies:** 12\
**Last updated:** [July 15, 2021, 8:55pm UTC](https://root-forum.cern.ch/t/including-root-in-qt6/45863 "2021-07-15T20:55:10Z")

</div>

Did anyone try to include ROOT in a Qt6 application? For me upgrading from Qt5 to Qt6 breaks compilation. Just including TString.h in main.cpp and adding TString a = “a” produces 4000k+ errors. In Qt5 everything works,…

---

## [IntegralAndError Calculation](https://root-forum.cern.ch/t/integralanderror-calculation/45866)

<div class="topic-metadata">

**Author:** [@Dil](https://root-forum.cern.ch/u/Dil)\
**Replies:** 4\
**Last updated:** [July 15, 2021, 6:45pm UTC](https://root-forum.cern.ch/t/integralanderror-calculation/45866 "2021-07-15T18:45:55Z")

</div>

Hello Rooters, I used IntegralAndError option to look at the integration error of the histogram.(range of integration) But when I subtract two histogram integration, can root handle the error propagation? Here is the…

---

## [Adding TH2D's with alphanumeric labels](https://root-forum.cern.ch/t/adding-th2ds-with-alphanumeric-labels/45851)

<div class="topic-metadata">

**Author:** [@renyhp](https://root-forum.cern.ch/u/renyhp)\
**Replies:** 4\
**Last updated:** [July 15, 2021, 8:01am UTC](https://root-forum.cern.ch/t/adding-th2ds-with-alphanumeric-labels/45851 "2021-07-15T08:01:28Z")

</div>

Hi, I have this simple code: TH2F \*h1 = new TH2F("h1", "", 10, 0, 10, 1, 0, 1); h1-\>Fill(3, "1", 1); TH2F \*h2 = new TH2F("h2", "", 10, 0, 10, 1, 0, 1); h2-\>Fill(4, "2", 1); h1-\>LabelsDeflate("Y"); h2-\>LabelsDeflate("Y")…

---

## [TGraphErrors: Errors not showing](https://root-forum.cern.ch/t/tgrapherrors-errors-not-showing/45853)

<div class="topic-metadata">

**Author:** [@beg1nner](https://root-forum.cern.ch/u/beg1nner)\
**Replies:** 4\
**Last updated:** [July 15, 2021, 12:37am UTC](https://root-forum.cern.ch/t/tgrapherrors-errors-not-showing/45853 "2021-07-15T00:37:24Z")

</div>

Hi, I am facing following problem, when I create one TGraphErrors and create an error band with 3AC\* option, it is drawn normally only if I do not create another TGraphErrors. To make my issue clear, let’s say I have f…

---

## [Crash when accessing column in RDataFrame](https://root-forum.cern.ch/t/crash-when-accessing-column-in-rdataframe/45835)

<div class="topic-metadata">

**Author:** [@bthornbe](https://root-forum.cern.ch/u/bthornbe)\
**Replies:** 4\
**Last updated:** [July 14, 2021, 8:57pm UTC](https://root-forum.cern.ch/t/crash-when-accessing-column-in-rdataframe/45835 "2021-07-14T20:57:46Z")

</div>

Hello, I am getting a segmentation violation when I try to interact with columns I have defined in RDataFrames in PyRoot. In the minimal reproducer below the error happens on hist.Write, but it also happens when I try to…

---

## [Namespace errors](https://root-forum.cern.ch/t/namespace-errors/45665)

<div class="topic-metadata">

**Author:** [@Ronan](https://root-forum.cern.ch/u/Ronan)\
**Replies:** 8\
**Last updated:** [July 14, 2021, 5:59pm UTC](https://root-forum.cern.ch/t/namespace-errors/45665 "2021-07-14T17:59:00Z")

</div>

ROOT Version: 6.24/02 Platform: Ubuntu 20.04.2 (focal) Compiler: Not Provided (uncertain) Hello, I am trying to make a program which depends on ROOT. I recently downloaded and built ROOT with the recommended setup, …

---

## [How to start root in VSCode](https://root-forum.cern.ch/t/how-to-start-root-in-vscode/45833)

<div class="topic-metadata">

**Author:** [@Pipi](https://root-forum.cern.ch/u/Pipi)\
**Replies:** 12\
**Last updated:** [July 14, 2021, 12:14pm UTC](https://root-forum.cern.ch/t/how-to-start-root-in-vscode/45833 "2021-07-14T12:14:55Z")

</div>

I’m a freshman majoring in physics with some python skills and literally no C/C++ experiences. Have no idea how to use root without typing in my terminal. How can I do so?

---

## [Trying to update virtual machine to a new version of root](https://root-forum.cern.ch/t/trying-to-update-virtual-machine-to-a-new-version-of-root/45831)

<div class="topic-metadata">

**Author:** [@Apophyx](https://root-forum.cern.ch/u/Apophyx)\
**Replies:** 1\
**Last updated:** [July 13, 2021, 4:02pm UTC](https://root-forum.cern.ch/t/trying-to-update-virtual-machine-to-a-new-version-of-root/45831 "2021-07-13T16:02:36Z")

</div>

I’m using a Linux virtual machine to run a simulation program for Medical physics (Gate), and I’m trying to install another program to complement it and help Gate simulate noble gas scintillators (Nest). However, it see…

---

## [Fedora 34 and gcc 11.1.1](https://root-forum.cern.ch/t/fedora-34-and-gcc-11-1-1/45810)

<div class="topic-metadata">

**Author:** [@dhorns](https://root-forum.cern.ch/u/dhorns)\
**Replies:** 3\
**Last updated:** [July 13, 2021, 11:08am UTC](https://root-forum.cern.ch/t/fedora-34-and-gcc-11-1-1/45810 "2021-07-13T11:08:53Z")

</div>

ROOT v6-24-02 Fedora 34 gcc 11.1.1 I can’t compile ROOT. It seems to hang up on XROOTD, but I’m not sure. I’m pretty sure I have all of the proper dependencies (cmake doesn’t complain). Thanks.

---

## [Missing Minuit2 Libraries](https://root-forum.cern.ch/t/missing-minuit2-libraries/45786)

<div class="topic-metadata">

**Author:** [@christianwos83](https://root-forum.cern.ch/u/christianwos83)\
**Replies:** 7\
**Last updated:** [July 10, 2021, 2:55pm UTC](https://root-forum.cern.ch/t/missing-minuit2-libraries/45786 "2021-07-10T14:55:01Z")

</div>

Hello, I am trying to run Minuit2 on my other computer. I installed root 6.22.00. I have a program called niminimzation.cpp and I try to compile it by running g++ -I/home/christian/root/include -L/home/christian/root/l…

---

## [TH2 polar plot problem](https://root-forum.cern.ch/t/th2-polar-plot-problem/45754)

<div class="topic-metadata">

**Author:** [@Keyvan\_Tabaei](https://root-forum.cern.ch/u/Keyvan_Tabaei)\
**Replies:** 7\
**Last updated:** [July 9, 2021, 8:49am UTC](https://root-forum.cern.ch/t/th2-polar-plot-problem/45754 "2021-07-09T08:49:36Z")

</div>

hi dear expert, I have a problem with TH2 for polar drawing. I draw TH2D with pol surf2 C options and got this : I don’t know why there is a white circle at the center. if it is drawn with pol lego2 C options the…

---

## [Setting Y axis Range in Histogram](https://root-forum.cern.ch/t/setting-y-axis-range-in-histogram/45760)

<div class="topic-metadata">

**Author:** [@TheScientist](https://root-forum.cern.ch/u/TheScientist)\
**Replies:** 1\
**Last updated:** [July 9, 2021, 5:32am UTC](https://root-forum.cern.ch/t/setting-y-axis-range-in-histogram/45760 "2021-07-09T05:32:57Z")

</div>

I am trying to set Y-axis range limit as my histogram is not fully shown in the canvas. Here is my code. Please let me know how to set the y axis range correctly. Thank you. { TFile \*f = new TFile("data.root", "…

---

## [Read covid data (json)](https://root-forum.cern.ch/t/read-covid-data-json/45748)

<div class="topic-metadata">

**Author:** [@xtovo](https://root-forum.cern.ch/u/xtovo)\
**Replies:** 11\
**Last updated:** [July 8, 2021, 11:22pm UTC](https://root-forum.cern.ch/t/read-covid-data-json/45748 "2021-07-08T23:22:26Z")

</div>

Hi, I wonder if there is any tool to convert https://covid.ourworldindata.org/data/owid-covid-data.json to ROOT tree? Thanks Regards. Valeriy \_ROOT Version:git head \_Platform:windows \_Compiler:vs2019 head

---

## [Fitting at end of bin](https://root-forum.cern.ch/t/fitting-at-end-of-bin/45718)

<div class="topic-metadata">

**Author:** [@Mitchem](https://root-forum.cern.ch/u/Mitchem)\
**Replies:** 2\
**Last updated:** [July 8, 2021, 12:31pm UTC](https://root-forum.cern.ch/t/fitting-at-end-of-bin/45718 "2021-07-08T12:31:06Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided I was wondering if there was a way to fit a histogram by the end of th…

---

## [Show event by event from leaf](https://root-forum.cern.ch/t/show-event-by-event-from-leaf/45729)

<div class="topic-metadata">

**Author:** [@Karl007](https://root-forum.cern.ch/u/Karl007)\
**Replies:** 3\
**Last updated:** [July 7, 2021, 5:23pm UTC](https://root-forum.cern.ch/t/show-event-by-event-from-leaf/45729 "2021-07-07T17:23:54Z")

</div>

Hi, I am trying to draw two leafs (leaf1 vs leaf2) in a branch of tree. I managed to draw all entries together using: f = new TFile("myfile.root"); if ((!f) || f-\>IsZombie()) {delete f; return;} f-\>GetObject("myt…

---

## [Unknown issue cause seg fault](https://root-forum.cern.ch/t/unknown-issue-cause-seg-fault/45733)

<div class="topic-metadata">

**Author:** [@Lorenzo](https://root-forum.cern.ch/u/Lorenzo)\
**Replies:** 1\
**Last updated:** [July 7, 2021, 4:12pm UTC](https://root-forum.cern.ch/t/unknown-issue-cause-seg-fault/45733 "2021-07-07T16:12:37Z")

</div>

I am facing a problem which I never experienced and I don’t even understand the log. As an example, I am trying to run a simple macro which just get some values from a TTree and print them But when I execute the code w…

---

## [I/o streams problem (windows 7)](https://root-forum.cern.ch/t/i-o-streams-problem-windows-7/45657)

<div class="topic-metadata">

**Author:** [@bloop](https://root-forum.cern.ch/u/bloop)\
**Replies:** 9\
**Last updated:** [July 7, 2021, 12:35pm UTC](https://root-forum.cern.ch/t/i-o-streams-problem-windows-7/45657 "2021-07-07T12:35:44Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: v6.24.02 Platform: Windows 7 Compiler: MSVC 19.23.28107.0 Good day, everybody. My problem is similar to rajliv. I have installe…

---

## [Root build from source](https://root-forum.cern.ch/t/root-build-from-source/45585)

<div class="topic-metadata">

**Author:** [@ACalcaterra](https://root-forum.cern.ch/u/ACalcaterra)\
**Replies:** 6\
**Last updated:** [July 7, 2021, 12:18pm UTC](https://root-forum.cern.ch/t/root-build-from-source/45585 "2021-07-07T12:18:49Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.24 Platform: cygwin64 Compiler: 10.2.0 Hi all, I know that cygwin is not supported, but let me post this all the same… My cma…

---

## [Graphs and TBrowser not opening](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661)

<div class="topic-metadata">

**Author:** [@dpkkumr](https://root-forum.cern.ch/u/dpkkumr)\
**Replies:** 21\
**Last updated:** [July 7, 2021, 7:03am UTC](https://root-forum.cern.ch/t/graphs-and-tbrowser-not-opening/45661 "2021-07-07T07:03:21Z")

</div>

Hi, I have just start learning root. I used Draw in my code but when i run it i get the error below Error in TGClient::TGClient: can’t open display “:1”, switching to batch mode… In case you run from a remote ssh sess…

---

## [How to extract a histogram and draw out the histogram from a root file and then divide two histograms?](https://root-forum.cern.ch/t/how-to-extract-a-histogram-and-draw-out-the-histogram-from-a-root-file-and-then-divide-two-histograms/45719)

<div class="topic-metadata">

**Author:** [@Abaraj48](https://root-forum.cern.ch/u/Abaraj48)\
**Replies:** 1\
**Last updated:** [July 7, 2021, 6:09am UTC](https://root-forum.cern.ch/t/how-to-extract-a-histogram-and-draw-out-the-histogram-from-a-root-file-and-then-divide-two-histograms/45719 "2021-07-07T06:09:57Z")

</div>

So I have a root file with the path Users/andrewbarajas/output\_IdId\_Mc16a.root and with in this root file I have a TH1D histogram and I need to be able ti draw out a histogram from that root file. The histogram is TH1D …

---

## [DepreciationWarning: tmva102\_Testing.py HELP!](https://root-forum.cern.ch/t/depreciationwarning-tmva102-testing-py-help/45706)

<div class="topic-metadata">

**Author:** [@electronheart](https://root-forum.cern.ch/u/electronheart)\
**Replies:** 1\
**Last updated:** [July 6, 2021, 1:19pm UTC](https://root-forum.cern.ch/t/depreciationwarning-tmva102-testing-py-help/45706 "2021-07-06T13:19:19Z")

</div>

I’m currently trying to run tmva102\_testing.py and I’m having trouble. Specifically, I’m getting this error: DeprecationWarning: The ‘reorder’ parameter has been deprecated in version 0.20 and will be removed in 0.22. …

---

## [GetEntries function for TH2F](https://root-forum.cern.ch/t/getentries-function-for-th2f/45677)

<div class="topic-metadata">

**Author:** [@Aman\_Upadhyay](https://root-forum.cern.ch/u/Aman_Upadhyay)\
**Replies:** 2\
**Last updated:** [July 5, 2021, 5:33pm UTC](https://root-forum.cern.ch/t/getentries-function-for-th2f/45677 "2021-07-05T17:33:11Z")

</div>

I need to get multiple TH1F histograms from a TH2F. One TH1F for each Y bin. I searched for GetEntries() function for TH2F to run a loop over bins but that did not help. Then I decided to run the loop over the variable i…

---

## [Why can't I access this histogram from the branch?](https://root-forum.cern.ch/t/why-cant-i-access-this-histogram-from-the-branch/45684)

<div class="topic-metadata">

**Author:** [@KatR](https://root-forum.cern.ch/u/KatR)\
**Replies:** 6\
**Last updated:** [July 5, 2021, 2:40pm UTC](https://root-forum.cern.ch/t/why-cant-i-access-this-histogram-from-the-branch/45684 "2021-07-05T14:40:37Z")

</div>

I am absolutely sure I’m missing something obvious, but I have a root file with two trees and histograms in their branches. I open the file, get the tree and then start trying to do things with the histograms in those br…

---

## [Install ROOT 6.24.00 on MacBook Pro mid 2014](https://root-forum.cern.ch/t/install-root-6-24-00-on-macbook-pro-mid-2014/45672)

<div class="topic-metadata">

**Author:** [@lm17n000032](https://root-forum.cern.ch/u/lm17n000032)\
**Replies:** 6\
**Last updated:** [July 5, 2021, 9:13am UTC](https://root-forum.cern.ch/t/install-root-6-24-00-on-macbook-pro-mid-2014/45672 "2021-07-05T09:13:44Z")

</div>

Hello ROOTers, Im new in MacOS and i’m trying to building ROOT from source in an old MacBook Pro mid 2014. I’m following this procedure: Building Clone the repo $ git clone https://github.com/root-project/root.git $…

---

## [Getting TH1F for a bin from TH2F](https://root-forum.cern.ch/t/getting-th1f-for-a-bin-from-th2f/45674)

<div class="topic-metadata">

**Author:** [@Aman\_Upadhyay](https://root-forum.cern.ch/u/Aman_Upadhyay)\
**Replies:** 2\
**Last updated:** [July 4, 2021, 10:59am UTC](https://root-forum.cern.ch/t/getting-th1f-for-a-bin-from-th2f/45674 "2021-07-04T10:59:03Z")

</div>

Hi ROOT users, I have a TH2F histogram with an x and y-axis. I want to extract the distribution of x variable for a particular y bin (or value). This should be a TH1F. Is there a way to extract bin-specific TH1F from TH…

---

## [Basic code of c++](https://root-forum.cern.ch/t/basic-code-of-c/45664)

<div class="topic-metadata">

**Author:** [@Ravinder](https://root-forum.cern.ch/u/Ravinder)\
**Replies:** 4\
**Last updated:** [July 3, 2021, 10:09am UTC](https://root-forum.cern.ch/t/basic-code-of-c/45664 "2021-07-03T10:09:52Z")

</div>

I have the txt file in which the values of binding energies corresponding to different atomic and mass number is given.I have to find the value of maximum binding energy corresponding to particular value of mass number m…

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

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