# Newbie

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

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

---

## [Error in \<TFile::WriteTObject\>: Directory gates.root is not writable](https://root-forum.cern.ch/t/error-in-tfile-writetobject-directory-gates-root-is-not-writable/43853)

<div class="topic-metadata">

**Author:** [@Shruti\_Narang](https://root-forum.cern.ch/u/Shruti_Narang)\
**Replies:** 3\
**Last updated:** [March 7, 2021, 3:19am UTC](https://root-forum.cern.ch/t/error-in-tfile-writetobject-directory-gates-root-is-not-writable/43853 "2021-03-07T03:19:35Z")

</div>

I am defining graphical cuts in a .root file from the terminal using command root \[0\] TFile h(“gates.root”,“recreate”) root\[1\] fissioncut-\>Write() root\[2\] gateN1-\>Write() and so on… (This files has 81 gates in total…

---

## [Subtracting minimum of a RooCurve from another RooCurve point by point](https://root-forum.cern.ch/t/subtracting-minimum-of-a-roocurve-from-another-roocurve-point-by-point/43185)

<div class="topic-metadata">

**Author:** [@Natilus](https://root-forum.cern.ch/u/Natilus)\
**Replies:** 11\
**Last updated:** [March 5, 2021, 8:22pm UTC](https://root-forum.cern.ch/t/subtracting-minimum-of-a-roocurve-from-another-roocurve-point-by-point/43185 "2021-03-05T20:22:44Z")

</div>

Dear experts, I have two P.D.F.s , ZSig and ZBkg. ZSig is a gaussian and ZBkg is a polynomial. I add parametric extended likelihood to them (RooExtendPdf()) and add them (RooAddPdf). I then plot them in a frame (RooPlot…

---

## [File corruption when adding new branch](https://root-forum.cern.ch/t/file-corruption-when-adding-new-branch/43843)

<div class="topic-metadata">

**Author:** [@MatthieuD](https://root-forum.cern.ch/u/MatthieuD)\
**Replies:** 4\
**Last updated:** [March 5, 2021, 1:24pm UTC](https://root-forum.cern.ch/t/file-corruption-when-adding-new-branch/43843 "2021-03-05T13:24:01Z")

</div>

Hello everyone, I’m new to root and I get an error when I try to add a Branch to my existing TTree. Everything works fine, but the first Entries seem to be corrupted while writing. I can’t figure out why. Here is the…

---

## [Error when compiling a ROOT macro](https://root-forum.cern.ch/t/error-when-compiling-a-root-macro/43808)

<div class="topic-metadata">

**Author:** [@artem-phys](https://root-forum.cern.ch/u/artem-phys)\
**Replies:** 15\
**Last updated:** [March 5, 2021, 12:43pm UTC](https://root-forum.cern.ch/t/error-when-compiling-a-root-macro/43808 "2021-03-05T12:43:55Z")

</div>

When I type .x Detector\_sensitivity\_builder.cpp command into my ROOT prompt, it works, but since I try to compile my macro .x Detector\_sensitivity\_builder.cpp+ it gets the following: Info in TUnixSystem::ACLiC: crea…

---

## [Getting the x-coordinate of the global maximum on TGraph](https://root-forum.cern.ch/t/getting-the-x-coordinate-of-the-global-maximum-on-tgraph/43830)

<div class="topic-metadata">

**Author:** [@KAM](https://root-forum.cern.ch/u/KAM)\
**Replies:** 1\
**Last updated:** [March 5, 2021, 6:55am UTC](https://root-forum.cern.ch/t/getting-the-x-coordinate-of-the-global-maximum-on-tgraph/43830 "2021-03-05T06:55:00Z")

</div>

How can one most easily obtain the x-coordinate of the global maximum (largest y-value) on a TGraph? I’ve tried following the guidance here, however this doesn’t seem to accomplish what I’m after: TGraph GetMaximum() Ge…

---

## [How to continue sequence of randoms in TRandom3 generator?](https://root-forum.cern.ch/t/how-to-continue-sequence-of-randoms-in-trandom3-generator/43820)

<div class="topic-metadata">

**Author:** [@kurbatov](https://root-forum.cern.ch/u/kurbatov)\
**Replies:** 5\
**Last updated:** [March 5, 2021, 9:59am UTC](https://root-forum.cern.ch/t/how-to-continue-sequence-of-randoms-in-trandom3-generator/43820 "2021-03-05T09:59:45Z")

</div>

I have : ROOT Version: 6.22/01 Platform: 18.04.1-Ubuntu Compiler: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Problem : I am planning long simulation by geant4, using TRandom3 generator in a form of series of files and…

---

## [Make sort file for entries in one detector](https://root-forum.cern.ch/t/make-sort-file-for-entries-in-one-detector/43817)

<div class="topic-metadata">

**Author:** [@Zhassulan](https://root-forum.cern.ch/u/Zhassulan)\
**Replies:** 3\
**Last updated:** [March 4, 2021, 7:22pm UTC](https://root-forum.cern.ch/t/make-sort-file-for-entries-in-one-detector/43817 "2021-03-04T19:22:35Z")

</div>

Hi. I have the root file (443mev.root) with 18 detector where name of detectors e1, e2,…,e9 in the front and c1, c2, … c9 in the back position. And I’d like to make such a sorting file that would make it possible to sepa…

---

## [Convert cv::Mat to TImage](https://root-forum.cern.ch/t/convert-cv-mat-to-timage/39815)

<div class="topic-metadata">

**Author:** [@KHIEM2812](https://root-forum.cern.ch/u/KHIEM2812)\
**Replies:** 2\
**Last updated:** [March 4, 2021, 3:40pm UTC](https://root-forum.cern.ch/t/convert-cv-mat-to-timage/39815 "2021-03-04T15:40:08Z")

</div>

Hi everyone, I want to know how to convert an image in cv::Mat type to TASImage. I have read the root document but still very fuzzy. The main issue is that being not sure of converting rgb pixel to the Double\_t array. I…

---

## [Dividing two 1D histograms](https://root-forum.cern.ch/t/dividing-two-1d-histograms/43804)

<div class="topic-metadata">

**Author:** [@chigi](https://root-forum.cern.ch/u/chigi)\
**Replies:** 4\
**Last updated:** [March 4, 2021, 9:39am UTC](https://root-forum.cern.ch/t/dividing-two-1d-histograms/43804 "2021-03-04T09:39:12Z")

</div>

Hi all, I have been trying to divide, in a for loop, two 1D histograms in the following way: these are the 1D histograms filled in the for loop: TH1D \*H1\[const\_size\]; TH1D \*H2\[const\_size\]; TH1D \*ratio\[const\_s…

---

## [Error when using TProfile::GetBinEntries](https://root-forum.cern.ch/t/error-when-using-tprofile-getbinentries/43811)

<div class="topic-metadata">

**Author:** [@Arwen](https://root-forum.cern.ch/u/Arwen)\
**Replies:** 1\
**Last updated:** [March 4, 2021, 7:07am UTC](https://root-forum.cern.ch/t/error-when-using-tprofile-getbinentries/43811 "2021-03-04T07:07:01Z")

</div>

I am simply using GetBinEntries() method: Double\_t Entries = h1-\>GetBinEntries(2); I got an error message: error: no member named 'GetBinEntries' in 'TH1D' The histogram h1 was defined earlier: TH1D \* h1 = new TH1D …

---

## [Root installed in conda AND/OR in linux (snap and .tar)](https://root-forum.cern.ch/t/root-installed-in-conda-and-or-in-linux-snap-and-tar/43782)

<div class="topic-metadata">

**Author:** [@g.nalin](https://root-forum.cern.ch/u/g.nalin)\
**Replies:** 1\
**Last updated:** [March 3, 2021, 8:32am UTC](https://root-forum.cern.ch/t/root-installed-in-conda-and-or-in-linux-snap-and-tar/43782 "2021-03-03T08:32:23Z")

</div>

Dear all, I am a bit puzzled from the multiple options to install root on linux. I have followed the instructions from the official website and wget the distribution (no slac). Then I have installed root in conda. I…

---

## [Problems with Fit Options Statistics Panel](https://root-forum.cern.ch/t/problems-with-fit-options-statistics-panel/43772)

<div class="topic-metadata">

**Author:** [@rrramos](https://root-forum.cern.ch/u/rrramos)\
**Replies:** 8\
**Last updated:** [March 2, 2021, 6:57pm UTC](https://root-forum.cern.ch/t/problems-with-fit-options-statistics-panel/43772 "2021-03-02T18:57:48Z")

</div>

Hello everyone, I am having a problem with the statistics panel of my fit. I am trying to fit the same function in my spectrum with different ranges but even though I change the range, my fit parameters, chi-square / nd…

---

## [Assistance with PIC16f883 C code](https://root-forum.cern.ch/t/assistance-with-pic16f883-c-code/43768)

<div class="topic-metadata">

**Author:** [@Thabo\_Lepota1](https://root-forum.cern.ch/u/Thabo_Lepota1)\
**Replies:** 1\
**Last updated:** [March 2, 2021, 12:17pm UTC](https://root-forum.cern.ch/t/assistance-with-pic16f883-c-code/43768 "2021-03-02T12:17:29Z")

</div>

brickinterface.c (14.0 KB) I am struggling to build this code on MPLAB X I was wondering the someone can help me figure out if there any issues with the code? Thanks in advance

---

## [Integration in c++ language](https://root-forum.cern.ch/t/integration-in-c-language/43717)

<div class="topic-metadata">

**Author:** [@chaos](https://root-forum.cern.ch/u/chaos)\
**Replies:** 8\
**Last updated:** [March 2, 2021, 10:59am UTC](https://root-forum.cern.ch/t/integration-in-c-language/43717 "2021-03-02T10:59:59Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided I don’t know how to make program for definite integration using c++ la…

---

## [Trouble Installing ROOT w/ Python3](https://root-forum.cern.ch/t/trouble-installing-root-w-python3/43694)

<div class="topic-metadata">

**Author:** [@trevajrussell](https://root-forum.cern.ch/u/trevajrussell)\
**Replies:** 12\
**Last updated:** [March 1, 2021, 8:36am UTC](https://root-forum.cern.ch/t/trouble-installing-root-w-python3/43694 "2021-03-01T08:36:08Z")

</div>

I am trying to install ROOT to be able to use with python3 on a mac with the Big Sur operating system. I was trying the following: git clone https://github.com/root-project/root.git mkdir build cd build cmake ../root -D…

---

## [I draw a histogram from .txt file. The resultant histogram consist several peaks, how can i gaussian fit the histogram automatically detecting the peaks. I tried the tutorials\>spectrum\>peaks.C but did not succeed](https://root-forum.cern.ch/t/i-draw-a-histogram-from-txt-file-the-resultant-histogram-consist-several-peaks-how-can-i-gaussian-fit-the-histogram-automatically-detecting-the-peaks-i-tried-the-tutorials-spectrum-peaks-c-but-did-not-succeed/37265)

<div class="topic-metadata">

**Author:** [@A\_Kumar](https://root-forum.cern.ch/u/A_Kumar)\
**Replies:** 5\
**Last updated:** [March 1, 2021, 2:00am UTC](https://root-forum.cern.ch/t/i-draw-a-histogram-from-txt-file-the-resultant-histogram-consist-several-peaks-how-can-i-gaussian-fit-the-histogram-automatically-detecting-the-peaks-i-tried-the-tutorials-spectrum-peaks-c-but-did-not-succeed/37265 "2021-03-01T02:00:07Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: ROOT 6.14/06 Platform: Ubuntu 18.04 Compiler: Not Provided { TTree \*t = new TTree("t", "my tree"); t-\>ReadFile("a.txt", "x/D")…

---

## [Read .root files with Python on Windows](https://root-forum.cern.ch/t/read-root-files-with-python-on-windows/41196)

<div class="topic-metadata">

**Author:** [@g.nalin](https://root-forum.cern.ch/u/g.nalin)\
**Replies:** 25\
**Last updated:** [February 27, 2021, 11:35am UTC](https://root-forum.cern.ch/t/read-root-files-with-python-on-windows/41196 "2021-02-27T11:35:38Z")

</div>

Dear ROOTers and Python3rs, I am interested in ways to browse and manipulate .root files with Python in a Windows environment. In my research group, we use ROOT 5.34/36 (v5-34-36@v5-34-36, Apr 05 2016, 10:25:45 on win3…

---

## [Best way to compile and debug standalone Eve/track.C tutorial example](https://root-forum.cern.ch/t/best-way-to-compile-and-debug-standalone-eve-track-c-tutorial-example/42957)

<div class="topic-metadata">

**Author:** [@PBR](https://root-forum.cern.ch/u/PBR)\
**Replies:** 23\
**Last updated:** [February 26, 2021, 8:42pm UTC](https://root-forum.cern.ch/t/best-way-to-compile-and-debug-standalone-eve-track-c-tutorial-example/42957 "2021-02-26T20:42:36Z")

</div>

Hello, I have been trying to create a standalone executable of the track.C macro with the intent to debug it and become more familiar with the data structures and the methods to manage and render particle tracks. I hav…

---

## [Reading STAR Picos in Windows ROOT](https://root-forum.cern.ch/t/reading-star-picos-in-windows-root/43712)

<div class="topic-metadata">

**Author:** [@Skip](https://root-forum.cern.ch/u/Skip)\
**Replies:** 1\
**Last updated:** [February 26, 2021, 7:07am UTC](https://root-forum.cern.ch/t/reading-star-picos-in-windows-root/43712 "2021-02-26T07:07:10Z")

</div>

ROOT Version: 6.22.06 Platform: Windows 10 Compiler: Not Provided I’m wondering how to compile StRoot for Windows. It’s a series of macros and libraries to run over STAR data structures (picoDST), but I have no idea…

---

## [Possible error in NumericalMinimization.C tutorial](https://root-forum.cern.ch/t/possible-error-in-numericalminimization-c-tutorial/43710)

<div class="topic-metadata">

**Author:** [@Kristian](https://root-forum.cern.ch/u/Kristian)\
**Replies:** 7\
**Last updated:** [February 25, 2021, 9:27pm UTC](https://root-forum.cern.ch/t/possible-error-in-numericalminimization-c-tutorial/43710 "2021-02-25T21:27:54Z")

</div>

I am not sure if this is an error with ROOT or with the documentation, so I decided to just post it here. I believe there is an error in the code example NumericalMinimization, since it crashes with a nullpointer excepti…

---

## [TBrowser \*\*\* Break \*\*\* segmentation violation from ROOT 6.22/06 installed from Linux snap Ubuntu Software](https://root-forum.cern.ch/t/tbrowser-break-segmentation-violation-from-root-6-22-06-installed-from-linux-snap-ubuntu-software/43685)

<div class="topic-metadata">

**Author:** [@Alkegit21](https://root-forum.cern.ch/u/Alkegit21)\
**Replies:** 6\
**Last updated:** [February 25, 2021, 4:34pm UTC](https://root-forum.cern.ch/t/tbrowser-break-segmentation-violation-from-root-6-22-06-installed-from-linux-snap-ubuntu-software/43685 "2021-02-25T16:34:28Z")

</div>

So I installed ROOT from snap: groot@groot:~$ root-config --version 6.22/06 groot@groot:~$ root-config --platform linux groot@groot:~$ root-config --arch linuxx8664gcc groot@groot:~$ root-config --config BLAS\_blas\_LIBRA…

---

## [General Least Squares with correlated data set](https://root-forum.cern.ch/t/general-least-squares-with-correlated-data-set/43166)

<div class="topic-metadata">

**Author:** [@Estelle](https://root-forum.cern.ch/u/Estelle)\
**Replies:** 7\
**Last updated:** [February 25, 2021, 4:30pm UTC](https://root-forum.cern.ch/t/general-least-squares-with-correlated-data-set/43166 "2021-02-25T16:30:48Z")

</div>

Hello Everyone, I am trying to solve a linear equation A\*x= B with A a (n,m) matrix, x and B are vectors of n-elements and a covariance matrix V ((n,n)matrix associated to B). I found the following example to do so…

---

## [Accessing information stored by a vector of a struct in a tree](https://root-forum.cern.ch/t/accessing-information-stored-by-a-vector-of-a-struct-in-a-tree/43690)

<div class="topic-metadata">

**Author:** [@Joanna-Gao](https://root-forum.cern.ch/u/Joanna-Gao)\
**Replies:** 2\
**Last updated:** [February 25, 2021, 4:29pm UTC](https://root-forum.cern.ch/t/accessing-information-stored-by-a-vector-of-a-struct-in-a-tree/43690 "2021-02-25T16:29:17Z")

</div>

Hello, I’m trying to extract the information stored in the format of vector\<struct\> in a tree for some plotting, but my macro file gets stuck after I call tree-\>GetEntry(ievt). I’m wondering if anyone knows what to do o…

---

## [Getting the number of entries in a Ttree branch satisfying a condition](https://root-forum.cern.ch/t/getting-the-number-of-entries-in-a-ttree-branch-satisfying-a-condition/43688)

<div class="topic-metadata">

**Author:** [@R\_L](https://root-forum.cern.ch/u/R_L)\
**Replies:** 8\
**Last updated:** [February 25, 2021, 11:56am UTC](https://root-forum.cern.ch/t/getting-the-number-of-entries-in-a-ttree-branch-satisfying-a-condition/43688 "2021-02-25T11:56:51Z")

</div>

Dear community, I am currently struggling to get the number of entries in a Ttree branch satisfying flag = 1. I found the following conversation https://root-forum.cern.ch/t/find-the-number-of-entries-in-a-ttree-satisf…

---

## [Problem mixing vector and array in a TTree](https://root-forum.cern.ch/t/problem-mixing-vector-and-array-in-a-ttree/43693)

<div class="topic-metadata">

**Author:** [@fmarco76](https://root-forum.cern.ch/u/fmarco76)\
**Replies:** 3\
**Last updated:** [February 24, 2021, 10:47pm UTC](https://root-forum.cern.ch/t/problem-mixing-vector-and-array-in-a-ttree/43693 "2021-02-24T22:47:47Z")

</div>

ROOT Version: 6.20/08 Platform: Built for linuxx8664gcc From tags/v6-20-08-alice1@v6-20-08-1-g700d618 on CentOS Linux release 7.9.2009 (Core) Compiler: gcc version 7.3.0 Hello, Is it possible to store in a TBranch …

---

## [How to change colz color bar range to represent all z values?](https://root-forum.cern.ch/t/how-to-change-colz-color-bar-range-to-represent-all-z-values/43647)

<div class="topic-metadata">

**Author:** [@Cepheides](https://root-forum.cern.ch/u/Cepheides)\
**Replies:** 2\
**Last updated:** [February 22, 2021, 7:39am UTC](https://root-forum.cern.ch/t/how-to-change-colz-color-bar-range-to-represent-all-z-values/43647 "2021-02-22T07:39:20Z")

</div>

I am creating a 2D color plot with the following code: // Creates a plot of the logarithm of the luminosity due to helium burning in a star as a function of time and space // V2: Added tick marks and labels to denote di…

---

## [Tfractionfitter how can I print status and EDM? (want to save them in arrays)](https://root-forum.cern.ch/t/tfractionfitter-how-can-i-print-status-and-edm-want-to-save-them-in-arrays/43612)

<div class="topic-metadata">

**Author:** [@ahmedabdelmotteleb](https://root-forum.cern.ch/u/ahmedabdelmotteleb)\
**Replies:** 4\
**Last updated:** [February 23, 2021, 5:45pm UTC](https://root-forum.cern.ch/t/tfractionfitter-how-can-i-print-status-and-edm-want-to-save-them-in-arrays/43612 "2021-02-23T17:45:54Z")

</div>

Hi. I’m using TFractionFitter on PyROOT. This is the relevant part of my code: list\_of\_histos = ROOT.TObjArray() list\_of\_histos.Add(mc\_hist) #param 1 list\_of\_histos.Add(bkg\_hist) #param 2 …

---

## ["Unfill" a histogram](https://root-forum.cern.ch/t/unfill-a-histogram/43665)

<div class="topic-metadata">

**Author:** [@Edward\_Finkelstein](https://root-forum.cern.ch/u/Edward_Finkelstein)\
**Replies:** 2\
**Last updated:** [February 23, 2021, 12:24pm UTC](https://root-forum.cern.ch/t/unfill-a-histogram/43665 "2021-02-23T12:24:55Z")

</div>

Hello, I have a histogram of data, and I fill part of it with Gaussian data, shown below: TRandom3 \*r = new TRandom3(); r-\>SetSeed(); //time(0) int zet=10\*304; for (int i=0; i\<(zet); i++){cout \<\< hh-\>Fill(bla.GetRandom…

---

## [Rootbrowse on Mac](https://root-forum.cern.ch/t/rootbrowse-on-mac/43666)

<div class="topic-metadata">

**Author:** [@Alan\_H](https://root-forum.cern.ch/u/Alan_H)\
**Replies:** 3\
**Last updated:** [February 23, 2021, 8:50am UTC](https://root-forum.cern.ch/t/rootbrowse-on-mac/43666 "2021-02-23T08:50:23Z")

</div>

ROOT Version: 6.22/02 Built for macosx64 on Aug 17 2020, 12:46:52 From tags/v6-22-02@v6-22-02 Hi, I was trying to open a .root file in a Browser directly from my command line and found that rootbrowse file.root shoul…

---

## [How to start writing, where to get help?](https://root-forum.cern.ch/t/how-to-start-writing-where-to-get-help/43649)

<div class="topic-metadata">

**Author:** [@Shivam\_Raj](https://root-forum.cern.ch/u/Shivam_Raj)\
**Replies:** 2\
**Last updated:** [February 22, 2021, 6:07pm UTC](https://root-forum.cern.ch/t/how-to-start-writing-where-to-get-help/43649 "2021-02-22T18:07:21Z")

</div>

I have started to write code for e+e- --\>mu+mu- at energy s =\\sqrt 500 GeV. But I could not proceed and get confused. Also when I try to use ROOT in Jupyter notebook , it shows “kernel starting, please wait”, but it nev…

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

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