# Newbie

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

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

---

## [Segmentation Violation in Minuit2](https://root-forum.cern.ch/t/segmentation-violation-in-minuit2/48372)

<div class="topic-metadata">

**Author:** [@christianwos83](https://root-forum.cern.ch/u/christianwos83)\
**Replies:** 3\
**Last updated:** [January 26, 2022, 11:31am UTC](https://root-forum.cern.ch/t/segmentation-violation-in-minuit2/48372 "2022-01-26T11:31:16Z")

</div>

Hello everyone, I am running Minuit2 to do a minimization. The code compiles fine but when I run it I get a Segmentation Violation error. Below is the entire code: #include \<iostream\> #include \<vector\> #include \<strin…

---

## [TH1D Histograms visualization/filling in new (6.24) and old version (5.34/36) of ROOT: problem of error bars?](https://root-forum.cern.ch/t/th1d-histograms-visualization-filling-in-new-6-24-and-old-version-5-34-36-of-root-problem-of-error-bars/48570)

<div class="topic-metadata">

**Author:** [@seeuvl](https://root-forum.cern.ch/u/seeuvl)\
**Replies:** 4\
**Last updated:** [January 26, 2022, 11:04am UTC](https://root-forum.cern.ch/t/th1d-histograms-visualization-filling-in-new-6-24-and-old-version-5-34-36-of-root-problem-of-error-bars/48570 "2022-01-26T11:04:03Z")

</div>

Filling histograms the same way in ROOT 5.34/36 and ROOT 6.24/06 gives me different results. For example, double N\[2000\]; for (int k = 0; k \< 2000; k++) N\[k\] = k \* 5; TH1D \*n = new TH1D("n", " ", 2000, -0.5, 1999.5); f…

---

## ["No medium" problem](https://root-forum.cern.ch/t/no-medium-problem/48567)

<div class="topic-metadata">

**Author:** [@Yasenya](https://root-forum.cern.ch/u/Yasenya)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 9:57am UTC](https://root-forum.cern.ch/t/no-medium-problem/48567 "2022-01-26T09:57:31Z")

</div>

Hello all, I am currently working on a code I find online in order to create a PET tomography ring design with embedded photodetectors composed of Cherenkov radiators. I employed the following formula. However, I consis…

---

## [Installing ROOT Error: GLEW error](https://root-forum.cern.ch/t/installing-root-error-glew-error/48544)

<div class="topic-metadata">

**Author:** [@Rutik](https://root-forum.cern.ch/u/Rutik)\
**Replies:** 2\
**Last updated:** [January 26, 2022, 9:53am UTC](https://root-forum.cern.ch/t/installing-root-error-glew-error/48544 "2022-01-26T09:53:57Z")

</div>

Hi All, I’m getting the error while trying to build from source on my Mac OS Catalina, CMake Error at cmake/modules/SearchInstalledSoftware.cmake:571 (message): Please enable builtin Glew due bug in latest CMake (use…

---

## [Saving histogram data as a map or vector pair](https://root-forum.cern.ch/t/saving-histogram-data-as-a-map-or-vector-pair/48564)

<div class="topic-metadata">

**Author:** [@abunka](https://root-forum.cern.ch/u/abunka)\
**Replies:** 1\
**Last updated:** [January 26, 2022, 4:58am UTC](https://root-forum.cern.ch/t/saving-histogram-data-as-a-map-or-vector-pair/48564 "2022-01-26T04:58:55Z")

</div>

What would be the easiest way to save the contents of a histogram as a map or vector pair of bin centers and values? I would like to have something similar to the result of Print('range"), where the bin centers and histo…

---

## [\*\*Break\*\* segmentation violation](https://root-forum.cern.ch/t/break-segmentation-violation/47857)

<div class="topic-metadata">

**Author:** [@priyankaboora](https://root-forum.cern.ch/u/priyankaboora)\
**Replies:** 15\
**Last updated:** [January 25, 2022, 4:17pm UTC](https://root-forum.cern.ch/t/break-segmentation-violation/47857 "2022-01-25T16:17:50Z")

</div>

Hi everyone, I stuck while compiling the code it shows an error(attachment) of “Break segmentation violation”. Please suggest to me how should I resolve this error?

---

## [Problem with Writing and Reading Custom Class Objects from TTrees](https://root-forum.cern.ch/t/problem-with-writing-and-reading-custom-class-objects-from-ttrees/48490)

<div class="topic-metadata">

**Author:** [@andrew](https://root-forum.cern.ch/u/andrew)\
**Replies:** 3\
**Last updated:** [January 25, 2022, 1:14pm UTC](https://root-forum.cern.ch/t/problem-with-writing-and-reading-custom-class-objects-from-ttrees/48490 "2022-01-25T13:14:59Z")

</div>

Greetings, I would like to write and read custom classes in TTrees, but I am facing an issue. I have created a custom class, illustrated below (Name of the files is class.hpp and class.cpp, respectively) class.hpp #pr…

---

## [Can ROOT do a MCMC sampling?](https://root-forum.cern.ch/t/can-root-do-a-mcmc-sampling/48485)

<div class="topic-metadata">

**Author:** [@Daumann](https://root-forum.cern.ch/u/Daumann)\
**Replies:** 8\
**Last updated:** [January 24, 2022, 7:24pm UTC](https://root-forum.cern.ch/t/can-root-do-a-mcmc-sampling/48485 "2022-01-24T19:24:13Z")

</div>

Hi, I need to scan a two and another four dimensional phase spaces using MCMC. I know roostats can do a mcmc sampling, but i am more familiar with PyROOT until now. So i wonder, does ROOT have a built in tool to do a mc…

---

## [Why this TGraph is not being drawn?](https://root-forum.cern.ch/t/why-this-tgraph-is-not-being-drawn/48543)

<div class="topic-metadata">

**Author:** [@acgc99](https://root-forum.cern.ch/u/acgc99)\
**Replies:** 1\
**Last updated:** [January 24, 2022, 6:21pm UTC](https://root-forum.cern.ch/t/why-this-tgraph-is-not-being-drawn/48543 "2022-01-24T18:21:10Z")

</div>

Hi, I’m new to ROOT and C++. I have already done some graphs in ROOT, but I don’t understand why this code is not working: void test(){ Double\_t x\[\] = {1,2,3,4,5,6}; Double\_t y\[\] = {1,2,3,4,5,6}; Int\_t len = siz…

---

## [Plotting part of a txt file](https://root-forum.cern.ch/t/plotting-part-of-a-txt-file/48530)

<div class="topic-metadata">

**Author:** [@cozimus](https://root-forum.cern.ch/u/cozimus)\
**Replies:** 1\
**Last updated:** [January 24, 2022, 3:56pm UTC](https://root-forum.cern.ch/t/plotting-part-of-a-txt-file/48530 "2022-01-24T15:56:49Z")

</div>

I’m doing a pretty easy task, but I can’t find a simple way to do this. I want to plot only a part of a txt file, which looks like: #First part 2 1.96E-02 4 2.57E-02 12 2.81E-02 20 3.12E-02 28 3.17E-02 35 3.19E-0…

---

## [Making a single histogram from 2 files](https://root-forum.cern.ch/t/making-a-single-histogram-from-2-files/48510)

<div class="topic-metadata">

**Author:** [@Miguel](https://root-forum.cern.ch/u/Miguel)\
**Replies:** 2\
**Last updated:** [January 24, 2022, 7:22am UTC](https://root-forum.cern.ch/t/making-a-single-histogram-from-2-files/48510 "2022-01-24T07:22:09Z")

</div>

Hello there! I have two files, nu.root and mu.root. Each one of these files has a tree called tree, with a leaf called energy. I want to make three different histograms: one for the energy distribution of muons (mu.root…

---

## [Visual Studio 2019 - heap corruption](https://root-forum.cern.ch/t/visual-studio-2019-heap-corruption/48506)

<div class="topic-metadata">

**Author:** [@sdattalo](https://root-forum.cern.ch/u/sdattalo)\
**Replies:** 1\
**Last updated:** [January 24, 2022, 7:14am UTC](https://root-forum.cern.ch/t/visual-studio-2019-heap-corruption/48506 "2022-01-24T07:14:08Z")

</div>

root version: root\_v6.24.06 Debug Visual Studio 2019 - Win32 Debug Windows 10 I have a simple ‘helloworld’ root app that I’ve been able to successfully build with Visual Studio 2019. The include file paths, library p…

---

## [Error: Function fill\_graph(n,x,y,ex,ey,2) is not defined in current scope](https://root-forum.cern.ch/t/error-function-fill-graph-n-x-y-ex-ey-2-is-not-defined-in-current-scope/48511)

<div class="topic-metadata">

**Author:** [@acgc99](https://root-forum.cern.ch/u/acgc99)\
**Replies:** 1\
**Last updated:** [January 23, 2022, 3:49pm UTC](https://root-forum.cern.ch/t/error-function-fill-graph-n-x-y-ex-ey-2-is-not-defined-in-current-scope/48511 "2022-01-23T15:49:06Z")

</div>

Hi! I’m new to C++ and ROOT (but not to programing (python)). I’m trying to create a function to fill a TGraphErrors, but I get the following error. Processing C:\\Users\\acgc9\\Desktop\\CorrientesDeFuga.c... Warning: Auto…

---

## [Wildcarding file names with hadd on windows](https://root-forum.cern.ch/t/wildcarding-file-names-with-hadd-on-windows/48477)

<div class="topic-metadata">

**Author:** [@abunka](https://root-forum.cern.ch/u/abunka)\
**Replies:** 3\
**Last updated:** [January 22, 2022, 1:40am UTC](https://root-forum.cern.ch/t/wildcarding-file-names-with-hadd-on-windows/48477 "2022-01-22T01:40:56Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.24/06 \_Platform: Windows Compiler: Not Provided I am having a minor problem using hadd to merge files. I have a large number o…

---

## [Legend with Fit](https://root-forum.cern.ch/t/legend-with-fit/48497)

<div class="topic-metadata">

**Author:** [@MicheleScattola](https://root-forum.cern.ch/u/MicheleScattola)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 10:38pm UTC](https://root-forum.cern.ch/t/legend-with-fit/48497 "2022-01-21T22:38:31Z")

</div>

Hi, I am currently working on a plot. I have 1 canvas diveded in 2 plots. For both of the plots I am making a Fit with a function and I would like to add a legend to the canvas adding the 2 graphs and the Fit line as wel…

---

## [Data file to .root \[Segmentation violation\]](https://root-forum.cern.ch/t/data-file-to-root-segmentation-violation/48492)

<div class="topic-metadata">

**Author:** [@phy.vijayraj](https://root-forum.cern.ch/u/phy.vijayraj)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 10:08pm UTC](https://root-forum.cern.ch/t/data-file-to-root-segmentation-violation/48492 "2022-01-21T22:08:24Z")

</div>

Dear Root experts; I stuck in converting the magnetic field data in root file. I have written a code (from an example given in root forum) but am receiving segmentation fault. My data file has 6 columns and 20000 lines…

---

## [Plotting loss/accuracy vs. epoch with PyKeras](https://root-forum.cern.ch/t/plotting-loss-accuracy-vs-epoch-with-pykeras/48476)

<div class="topic-metadata">

**Author:** [@eblazek](https://root-forum.cern.ch/u/eblazek)\
**Replies:** 5\
**Last updated:** [January 21, 2022, 4:48pm UTC](https://root-forum.cern.ch/t/plotting-loss-accuracy-vs-epoch-with-pykeras/48476 "2022-01-21T16:48:59Z")

</div>

Dear experts, I am working on building a neural net with the PyKeras method of TMVA. I would love to be able to make a plot of the accuracy and loss over the course of all the epochs something like this: But I can’t …

---

## [2 canvas with 2 TApplication](https://root-forum.cern.ch/t/2-canvas-with-2-tapplication/48486)

<div class="topic-metadata">

**Author:** [@MicheleScattola](https://root-forum.cern.ch/u/MicheleScattola)\
**Replies:** 2\
**Last updated:** [January 21, 2022, 4:34pm UTC](https://root-forum.cern.ch/t/2-canvas-with-2-tapplication/48486 "2022-01-21T16:34:01Z")

</div>

Good afternoon! I am writing a file main.cpp which reads data from files and creates ROOT plots. I am interested into having 2 different canvas for 2 types of Montecarlo integration. My implementation in main.cpp looks…

---

## [Plotting branches with binning](https://root-forum.cern.ch/t/plotting-branches-with-binning/48471)

<div class="topic-metadata">

**Author:** [@Muoniex](https://root-forum.cern.ch/u/Muoniex)\
**Replies:** 10\
**Last updated:** [January 20, 2022, 6:35pm UTC](https://root-forum.cern.ch/t/plotting-branches-with-binning/48471 "2022-01-20T18:35:03Z")

</div>

Hi. I have been trying to make a binned plot, but it has not worked… I have a tree called “data” with two branches: energy and speed, with a total of 1000 events in the tree. I want to make a plot of energy vs speed, bu…

---

## [Using python to access a branch called "E.id"](https://root-forum.cern.ch/t/using-python-to-access-a-branch-called-e-id/48431)

<div class="topic-metadata">

**Author:** [@Miguel](https://root-forum.cern.ch/u/Miguel)\
**Replies:** 9\
**Last updated:** [January 20, 2022, 8:49am UTC](https://root-forum.cern.ch/t/using-python-to-access-a-branch-called-e-id/48431 "2022-01-20T08:49:43Z")

</div>

Hi there! I have a ROOT file (let it be named “file.root”), which contains a TTree called “Event”. This TTree contains a leaf called “E.id”. I want to access the information in E.id, but when I do the script: import R…

---

## [Question about TSpectrum alternatives](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 5\
**Last updated:** [January 20, 2022, 12:18am UTC](https://root-forum.cern.ch/t/question-about-tspectrum-alternatives/48447 "2022-01-20T00:18:53Z")

</div>

Hi all, in the TSpectrum documentation is written now: " TSpectrum is a legacy interface: it is not recommended to use it in new code. There will be no bug fixes nor new developments." Is there any other alternative t…

---

## [ROOT instalation Error & Make j-4 not Running](https://root-forum.cern.ch/t/root-instalation-error-make-j-4-not-running/48444)

<div class="topic-metadata">

**Author:** [@Danish\_Malik](https://root-forum.cern.ch/u/Danish_Malik)\
**Replies:** 8\
**Last updated:** [January 19, 2022, 6:00pm UTC](https://root-forum.cern.ch/t/root-instalation-error-make-j-4-not-running/48444 "2022-01-19T18:00:06Z")

</div>

I properly installed all libraries, dependencies & Prerequisties for the installation of CERN Root on my Ubuntu but unfortunately my installation stucks on make -j4 command i tried make-j, make -j2, make -j3, make -…

---

## [Using Gold Deconvolution on time series data](https://root-forum.cern.ch/t/using-gold-deconvolution-on-time-series-data/46620)

<div class="topic-metadata">

**Author:** [@Whitt](https://root-forum.cern.ch/u/Whitt)\
**Replies:** 2\
**Last updated:** [January 19, 2022, 10:05am UTC](https://root-forum.cern.ch/t/using-gold-deconvolution-on-time-series-data/46620 "2022-01-19T10:05:42Z")

</div>

Hi All, I’m a Geophysicist looking at applying Gold Deconvolution to time-series data from the TSpectrum library. I note that this code is applied on histograms in this instance. Is it possible for the TH1 classes to w…

---

## [Plotting two TH1D together](https://root-forum.cern.ch/t/plotting-two-th1d-together/48024)

<div class="topic-metadata">

**Author:** [@Miguel](https://root-forum.cern.ch/u/Miguel)\
**Replies:** 1\
**Last updated:** [December 10, 2021, 4:01pm UTC](https://root-forum.cern.ch/t/plotting-two-th1d-together/48024 "2021-12-10T16:01:56Z")

</div>

Hi there! I have a root file (“data.root”) with two TH1D files on it: “ICRC\_V2\_hists/Cos theta/data” and "“ICRC\_V2\_hists/Cos theta/MC” I have made this script to plot the two histograms together: import ROOT imp…

---

## [Axis Values in unit of 10^3](https://root-forum.cern.ch/t/axis-values-in-unit-of-10-3/48407)

<div class="topic-metadata">

**Author:** [@TheScientist](https://root-forum.cern.ch/u/TheScientist)\
**Replies:** 1\
**Last updated:** [January 17, 2022, 7:57am UTC](https://root-forum.cern.ch/t/axis-values-in-unit-of-10-3/48407 "2022-01-17T07:57:30Z")

</div>

I am trying to change my x-axis values from 0 to 10000 in unit of 10^3. I looked into TAxis documentation but could not figure it out. Please let me know about it. Thank you.

---

## [Value of tolerance (avoiding edm above max)](https://root-forum.cern.ch/t/value-of-tolerance-avoiding-edm-above-max/46521)

<div class="topic-metadata">

**Author:** [@tappourc](https://root-forum.cern.ch/u/tappourc)\
**Replies:** 10\
**Last updated:** [January 14, 2022, 6:43pm UTC](https://root-forum.cern.ch/t/value-of-tolerance-avoiding-edm-above-max/46521 "2022-01-14T18:43:49Z")

</div>

Hello guys, We are using Minuit2 in a fitting routine. After several months of struggle (to say the least), we managed to have it converged properly using Migrad and setting a tolerance of 90 (not 0.1). It resulted in…

---

## [Root on python Multithreading](https://root-forum.cern.ch/t/root-on-python-multithreading/48344)

<div class="topic-metadata">

**Author:** [@EMed](https://root-forum.cern.ch/u/EMed)\
**Replies:** 3\
**Last updated:** [January 13, 2022, 12:30pm UTC](https://root-forum.cern.ch/t/root-on-python-multithreading/48344 "2022-01-13T12:30:23Z")

</div>

Hello, I’m actually working on a python multithreading project and i need to give two Threads two different TGeoManager instances , but when a create a deep copy of a TGeoManager object i run into a segmentation error …

---

## [Undeclared identifier error (material)](https://root-forum.cern.ch/t/undeclared-identifier-error-material/48361)

<div class="topic-metadata">

**Author:** [@Yasenya](https://root-forum.cern.ch/u/Yasenya)\
**Replies:** 9\
**Last updated:** [January 13, 2022, 12:02pm UTC](https://root-forum.cern.ch/t/undeclared-identifier-error-material/48361 "2022-01-13T12:02:08Z")

</div>

Hello, I am a newbie to ROOT programming. I am using ROOT version : v6-24-06@v6-24-06 . I am trying to use the following code, but end up getting the errors: error: use of undeclared identifier ‘Vacuum’ \*TGeoVolume to…

---

## [How to create a Ntuple/Ttrees structure directly in JSROOT](https://root-forum.cern.ch/t/how-to-create-a-ntuple-ttrees-structure-directly-in-jsroot/48354)

<div class="topic-metadata">

**Author:** [@je\_flc](https://root-forum.cern.ch/u/je_flc)\
**Replies:** 11\
**Last updated:** [January 12, 2022, 4:21pm UTC](https://root-forum.cern.ch/t/how-to-create-a-ntuple-ttrees-structure-directly-in-jsroot/48354 "2022-01-12T16:21:13Z")

</div>

Is it possible to create a Ntuple/Ttrees structure directly in JSROOT and display it in the ROOT web browser? I see how to create scater plots, and histograms in javascript, but not how to create ROOT objects hierarchy,…

---

## [How to draw multiple histograms similar to VIOLINY](https://root-forum.cern.ch/t/how-to-draw-multiple-histograms-similar-to-violiny/48350)

<div class="topic-metadata">

**Author:** [@Yeung](https://root-forum.cern.ch/u/Yeung)\
**Replies:** 2\
**Last updated:** [January 12, 2022, 1:46pm UTC](https://root-forum.cern.ch/t/how-to-draw-multiple-histograms-similar-to-violiny/48350 "2022-01-12T13:46:35Z")

</div>

Dear experts, I have several normalized TH1 stored in a root file with identical binning (1000 bins). Is it possible to draw these TH1 vertically offset in one pad, similar to the “violiny” option used in this tutorial …

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

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