# Newbie

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

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

---

## [Draw multiple root files along with graph file on the same canvas](https://root-forum.cern.ch/t/draw-multiple-root-files-along-with-graph-file-on-the-same-canvas/34956)

<div class="topic-metadata">

**Author:** [@A\_Kumar](https://root-forum.cern.ch/u/A_Kumar)\
**Replies:** 3\
**Last updated:** [July 3, 2019, 8:09am UTC](https://root-forum.cern.ch/t/draw-multiple-root-files-along-with-graph-file-on-the-same-canvas/34956 "2019-07-03T08:09:17Z")

</div>

I wish to draw selected histogram(20th) from every root file (4 root files) which contains 21 histogram along with graph having particular values which is saved in form of root file. With vs.5.xx.xx it perhaps looks like…

---

## [Manipulating vector variables with rdataframe](https://root-forum.cern.ch/t/manipulating-vector-variables-with-rdataframe/34942)

<div class="topic-metadata">

**Author:** [@kjohns](https://root-forum.cern.ch/u/kjohns)\
**Replies:** 6\
**Last updated:** [July 2, 2019, 12:28pm UTC](https://root-forum.cern.ch/t/manipulating-vector-variables-with-rdataframe/34942 "2019-07-02T12:28:02Z")

</div>

hi, i am using root 6.16.00 and python 2.7.15 i am trying to migrate a simple python analysis to rdataframe. however i don’t grasp how i can manipulate vectors of variables found in the original tree. in the original…

---

## [Symbol vector\<double\> is not defined in current scope](https://root-forum.cern.ch/t/symbol-vector-double-is-not-defined-in-current-scope/34948)

<div class="topic-metadata">

**Author:** [@DHorne](https://root-forum.cern.ch/u/DHorne)\
**Replies:** 3\
**Last updated:** [July 2, 2019, 12:02pm UTC](https://root-forum.cern.ch/t/symbol-vector-double-is-not-defined-in-current-scope/34948 "2019-07-02T12:02:53Z")

</div>

I’ve just installed ROOT 5.34/36 (installation details below) and I’m falling at the first hurdle when following the ROOT Primer pdf. Basic arithmetic is working as on page 7, section 2.1 “ROOT as calculator” but at the…

---

## [Accessing TH1D and manipulating them?](https://root-forum.cern.ch/t/accessing-th1d-and-manipulating-them/34938)

<div class="topic-metadata">

**Author:** [@tk231](https://root-forum.cern.ch/u/tk231)\
**Replies:** 7\
**Last updated:** [July 2, 2019, 11:16am UTC](https://root-forum.cern.ch/t/accessing-th1d-and-manipulating-them/34938 "2019-07-02T11:16:21Z")

</div>

Hi! I have a number of TH1D files in a ROOT file and I would like to read them out one by one and plot them. I currently have written the following: void histo\_redraw() { TString filename = "file.root"; TFile\* file = …

---

## [How to run a program twice (or more)](https://root-forum.cern.ch/t/how-to-run-a-program-twice-or-more/34944)

<div class="topic-metadata">

**Author:** [@Mapse](https://root-forum.cern.ch/u/Mapse)\
**Replies:** 2\
**Last updated:** [July 2, 2019, 7:38am UTC](https://root-forum.cern.ch/t/how-to-run-a-program-twice-or-more/34944 "2019-07-02T07:38:06Z")

</div>

Hello, i’m using Sublime editor to run my codes. I just use .x (name of the code.cpp) and my code runs at the terminal. But when i try to run it again i receive this message: note: previous definition is here a…

---

## [Problems with the root websocket support](https://root-forum.cern.ch/t/problems-with-the-root-websocket-support/34810)

<div class="topic-metadata">

**Author:** [@cricket](https://root-forum.cern.ch/u/cricket)\
**Replies:** 9\
**Last updated:** [July 1, 2019, 8:15am UTC](https://root-forum.cern.ch/t/problems-with-the-root-websocket-support/34810 "2019-07-01T08:15:49Z")

</div>

Hello ROOTers! I’m having some trouble getting the ws.C example web socket code (from the root tutorials dir) working. I haven’t made any major changes to the ws.C or ws.htm files apart from replacing var path = window…

---

## [Plotting several graphs on divided canvas using compiled macro](https://root-forum.cern.ch/t/plotting-several-graphs-on-divided-canvas-using-compiled-macro/34902)

<div class="topic-metadata">

**Author:** [@angad](https://root-forum.cern.ch/u/angad)\
**Replies:** 9\
**Last updated:** [July 1, 2019, 7:57am UTC](https://root-forum.cern.ch/t/plotting-several-graphs-on-divided-canvas-using-compiled-macro/34902 "2019-07-01T07:57:16Z")

</div>

\_ROOT Version: v6-18-00 \_Platform: Ubuntu 18.04 \_Compiler: g++ Hi everyone, I am trying to plot four graphs on a divided TCanvas in a compiled macro. The first case is a simple example showing what I would like to …

---

## [Draw two histograms in same canvas from two different root files](https://root-forum.cern.ch/t/draw-two-histograms-in-same-canvas-from-two-different-root-files/34900)

<div class="topic-metadata">

**Author:** [@NewRootUser](https://root-forum.cern.ch/u/NewRootUser)\
**Replies:** 4\
**Last updated:** [June 28, 2019, 11:53am UTC](https://root-forum.cern.ch/t/draw-two-histograms-in-same-canvas-from-two-different-root-files/34900 "2019-06-28T11:53:14Z")

</div>

I’m new to ROOT and trying to draw two histogram on the same canvas from root file. I tried to use “same” method for vs.6.14/6 but it didn’t work. My senior who used the same method for vs.5.38.xx got the result with the…

---

## [Using GSLMultiFit for the Fitter](https://root-forum.cern.ch/t/using-gslmultifit-for-the-fitter/34889)

<div class="topic-metadata">

**Author:** [@ems](https://root-forum.cern.ch/u/ems)\
**Replies:** 1\
**Last updated:** [June 28, 2019, 11:48am UTC](https://root-forum.cern.ch/t/using-gslmultifit-for-the-fitter/34889 "2019-06-28T11:48:54Z")

</div>

I am trying to perform a 3D fit using nonlinear least squares. I used the example3Dfit.C in tutorials as the base method for the fit, but am having trouble switching my Minimizer. My main problem is with the following s…

---

## [RooStats hypothesis testing into](https://root-forum.cern.ch/t/roostats-hypothesis-testing-into/34803)

<div class="topic-metadata">

**Author:** [@GiacomoBoldrini](https://root-forum.cern.ch/u/GiacomoBoldrini)\
**Replies:** 2\
**Last updated:** [June 26, 2019, 5:19pm UTC](https://root-forum.cern.ch/t/roostats-hypothesis-testing-into/34803 "2019-06-26T17:19:00Z")

</div>

Dear experts. I was asked to do a test hypothesis but I don’t really know what I’m doing, I’ll explain myself. I have a distribution “genpdf” from which I sample a dataset. I’m then asked to do a statistical test on th…

---

## [Legendre polynomials missing, not linking to GSL (Mathmore already installed)](https://root-forum.cern.ch/t/legendre-polynomials-missing-not-linking-to-gsl-mathmore-already-installed/34879)

<div class="topic-metadata">

**Author:** [@jbrummer](https://root-forum.cern.ch/u/jbrummer)\
**Replies:** 9\
**Last updated:** [June 28, 2019, 9:31am UTC](https://root-forum.cern.ch/t/legendre-polynomials-missing-not-linking-to-gsl-mathmore-already-installed/34879 "2019-06-28T09:31:38Z")

</div>

Hello everyone, I have a problem in accessing the Legendre polynomials but it is not as simple as just enabling Mathmore when configuring ROOT. Firstly, I run ROOT v5-34-00-patches installed on Ubuntu 18.04. The configu…

---

## [How to assign a value to a variable manually?](https://root-forum.cern.ch/t/how-to-assign-a-value-to-a-variable-manually/34884)

<div class="topic-metadata">

**Author:** [@mrc1104](https://root-forum.cern.ch/u/mrc1104)\
**Replies:** 2\
**Last updated:** [June 27, 2019, 6:34pm UTC](https://root-forum.cern.ch/t/how-to-assign-a-value-to-a-variable-manually/34884 "2019-06-27T18:34:35Z")

</div>

I am using Form() to allow me to manually select which files I want to load. ie: void main(Int\_t Hist1){ TFile::Open(Form(“ThisFile\_%d”,Hist1)); } I have to scale the data in each file by a file dependent factor. Ca…

---

## [Getting data from scopes](https://root-forum.cern.ch/t/getting-data-from-scopes/34872)

<div class="topic-metadata">

**Author:** [@bg92](https://root-forum.cern.ch/u/bg92)\
**Replies:** 8\
**Last updated:** [June 27, 2019, 12:28pm UTC](https://root-forum.cern.ch/t/getting-data-from-scopes/34872 "2019-06-27T12:28:48Z")

</div>

Dear all, I would like to know if one can get data from scopes using C++ (Tektronic: TLS216 for instance)? I would like to integrate this procedure inside a root code for data analysis … Thanks a lot for your help. B …

---

## [Syntax to add Legend to histogram plots and deleting the statistics being shown at the top right hand corner](https://root-forum.cern.ch/t/syntax-to-add-legend-to-histogram-plots-and-deleting-the-statistics-being-shown-at-the-top-right-hand-corner/34867)

<div class="topic-metadata">

**Author:** [@Angey](https://root-forum.cern.ch/u/Angey)\
**Replies:** 1\
**Last updated:** [June 27, 2019, 11:34am UTC](https://root-forum.cern.ch/t/syntax-to-add-legend-to-histogram-plots-and-deleting-the-statistics-being-shown-at-the-top-right-hand-corner/34867 "2019-06-27T11:34:20Z")

</div>

How do I add a Legend to my histogram plots and also how do I delete the statistics shown at the top right hand corner (the box with mean and rms entries) of my plot? I went through the answers in the forum related to t…

---

## [Error when drawing a histogram where a function has been fitted to](https://root-forum.cern.ch/t/error-when-drawing-a-histogram-where-a-function-has-been-fitted-to/34843)

<div class="topic-metadata">

**Author:** [@Christoph\_Vogl](https://root-forum.cern.ch/u/Christoph_Vogl)\
**Replies:** 3\
**Last updated:** [June 27, 2019, 10:42am UTC](https://root-forum.cern.ch/t/error-when-drawing-a-histogram-where-a-function-has-been-fitted-to/34843 "2019-06-27T10:42:18Z")

</div>

I have created some histograms and saved them in a .root file (analysis.root). Now I read them using my macro02.C , fit a function to them and save them again in a different .root file (results.root). Now I want to draw…

---

## [Plotting histograms using stars, pointer heads as the plot points](https://root-forum.cern.ch/t/plotting-histograms-using-stars-pointer-heads-as-the-plot-points/34773)

<div class="topic-metadata">

**Author:** [@Angey](https://root-forum.cern.ch/u/Angey)\
**Replies:** 10\
**Last updated:** [June 26, 2019, 5:04am UTC](https://root-forum.cern.ch/t/plotting-histograms-using-stars-pointer-heads-as-the-plot-points/34773 "2019-06-26T05:04:00Z")

</div>

Hi. I am completely new to ROOT. It is just a couple of weeks I have started off with it learning to plot histograms for my project however I don’t know how to plot the histograms with the coordinate points marked as sta…

---

## [Importing 2D large data from text file in root and plotting it, performing pattern recognition on charge cluster formation](https://root-forum.cern.ch/t/importing-2d-large-data-from-text-file-in-root-and-plotting-it-performing-pattern-recognition-on-charge-cluster-formation/34752)

<div class="topic-metadata">

**Author:** [@sanchitsharma](https://root-forum.cern.ch/u/sanchitsharma)\
**Replies:** 9\
**Last updated:** [June 24, 2019, 4:18pm UTC](https://root-forum.cern.ch/t/importing-2d-large-data-from-text-file-in-root-and-plotting-it-performing-pattern-recognition-on-charge-cluster-formation/34752 "2019-06-24T16:18:45Z")

</div>

Hi, I am very new to ROOT. My task is to read a series text files with 256 X 256 data matrix and do pattern recognition analysis in each of the files. Can you please suggest me the things I need to focus to achieve thi…

---

## [Trouble with showing the results of a fit on a graph](https://root-forum.cern.ch/t/trouble-with-showing-the-results-of-a-fit-on-a-graph/34751)

<div class="topic-metadata">

**Author:** [@YoichiroNambu](https://root-forum.cern.ch/u/YoichiroNambu)\
**Replies:** 5\
**Last updated:** [June 24, 2019, 3:22pm UTC](https://root-forum.cern.ch/t/trouble-with-showing-the-results-of-a-fit-on-a-graph/34751 "2019-06-24T15:22:44Z")

</div>

\_ROOT Version:6.14/08 \_Platform:cernVM Compiler: Not Provided Hi! I’m trying to create a graph with a couple of fits, using the attached macro. I am trying to get the result of my fits to appear on the graph (The v…

---

## [Plotting data using the real time](https://root-forum.cern.ch/t/plotting-data-using-the-real-time/34789)

<div class="topic-metadata">

**Author:** [@Thabo\_Lepota](https://root-forum.cern.ch/u/Thabo_Lepota)\
**Replies:** 1\
**Last updated:** [June 24, 2019, 2:57pm UTC](https://root-forum.cern.ch/t/plotting-data-using-the-real-time/34789 "2019-06-24T14:57:21Z")

</div>

Hello Everyone I would like to display the following data 19-05-22\_2246.zip (2.1 MB) using the actual real-time on the data, currently, it is plotting using the seconds. How can i achieve that ? thank you in advance

---

## [Fitting multiple TH1D onto another TH1D](https://root-forum.cern.ch/t/fitting-multiple-th1d-onto-another-th1d/34784)

<div class="topic-metadata">

**Author:** [@tk231](https://root-forum.cern.ch/u/tk231)\
**Replies:** 14\
**Last updated:** [June 24, 2019, 1:28pm UTC](https://root-forum.cern.ch/t/fitting-multiple-th1d-onto-another-th1d/34784 "2019-06-24T13:28:57Z")

</div>

Hi, What I’m trying to do is the following: I have a measured spectrum saved as a TH1D in a ROOT file and I have a few simulated spectra also saved as TH1Ds in a number of ROOT files. I’m hoping to fit the simulat…

---

## [Cannot compile ROOT from source, Looking for python error make](https://root-forum.cern.ch/t/cannot-compile-root-from-source-looking-for-python-error-make/34771)

<div class="topic-metadata">

**Author:** [@GiacomoBoldrini](https://root-forum.cern.ch/u/GiacomoBoldrini)\
**Replies:** 4\
**Last updated:** [June 24, 2019, 11:48am UTC](https://root-forum.cern.ch/t/cannot-compile-root-from-source-looking-for-python-error-make/34771 "2019-06-24T11:48:16Z")

</div>

Hello everyone. In an attempt to enable RooFit i deleted my already working ROOT to build a new one with the option -Droofit=ON. turns out that now make cannot find any python interpreter in my system but keeps finding …

---

## [Using own header files in ROOT](https://root-forum.cern.ch/t/using-own-header-files-in-root/34757)

<div class="topic-metadata">

**Author:** [@LKaufmann](https://root-forum.cern.ch/u/LKaufmann)\
**Replies:** 2\
**Last updated:** [June 24, 2019, 6:14am UTC](https://root-forum.cern.ch/t/using-own-header-files-in-root/34757 "2019-06-24T06:14:13Z")

</div>

Hello! I’m still very new to ROOT, so I am very sorry for these kind of questions! But now here’s my problem: I want to include an own written header file into a code that I want to open with ROOT. But everytime I w…

---

## [How do I stretched a histogram along x-axis?](https://root-forum.cern.ch/t/how-do-i-stretched-a-histogram-along-x-axis/34759)

<div class="topic-metadata">

**Author:** [@kbo](https://root-forum.cern.ch/u/kbo)\
**Replies:** 5\
**Last updated:** [June 23, 2019, 6:09am UTC](https://root-forum.cern.ch/t/how-do-i-stretched-a-histogram-along-x-axis/34759 "2019-06-23T06:09:55Z")

</div>

I have a 1D histogram. I want to stretched it along xaxis. How do I do that?

---

## [Strange behaviour of 2dimensional ROOT fit](https://root-forum.cern.ch/t/strange-behaviour-of-2dimensional-root-fit/34739)

<div class="topic-metadata">

**Author:** [@giacbold](https://root-forum.cern.ch/u/giacbold)\
**Replies:** 2\
**Last updated:** [June 22, 2019, 4:26pm UTC](https://root-forum.cern.ch/t/strange-behaviour-of-2dimensional-root-fit/34739 "2019-06-22T16:26:47Z")

</div>

Hello everyone. This might be a stupid question but i can’t find the answer myself. I’m asked to generate some montecarlo data according to a distribution in two angles (theta = t, phi = p). This distribution has 3 par…

---

## [How do I make my poln fit go through the origin?](https://root-forum.cern.ch/t/how-do-i-make-my-poln-fit-go-through-the-origin/34756)

<div class="topic-metadata">

**Author:** [@Skip](https://root-forum.cern.ch/u/Skip)\
**Replies:** 2\
**Last updated:** [June 21, 2019, 7:49pm UTC](https://root-forum.cern.ch/t/how-do-i-make-my-poln-fit-go-through-the-origin/34756 "2019-06-21T19:49:01Z")

</div>

Hello, ROOTers! I have a very simple question that I imagine has a very simple solution, but I can’t seem to figure it out myself. I have a polynomial fit I’m doing, and I would like to make it go through the origin. Th…

---

## [How to read the rootfiles and TTree](https://root-forum.cern.ch/t/how-to-read-the-rootfiles-and-ttree/34714)

<div class="topic-metadata">

**Author:** [@shahina](https://root-forum.cern.ch/u/shahina)\
**Replies:** 1\
**Last updated:** [June 20, 2019, 7:57am UTC](https://root-forum.cern.ch/t/how-to-read-the-rootfiles-and-ttree/34714 "2019-06-20T07:57:32Z")

</div>

Hi all. I have some root files already present and I need to read the data inside the root file using TTree.How to do that?

---

## [If Else problems for running code](https://root-forum.cern.ch/t/if-else-problems-for-running-code/34719)

<div class="topic-metadata">

**Author:** [@JorgeM](https://root-forum.cern.ch/u/JorgeM)\
**Replies:** 1\
**Last updated:** [June 20, 2019, 6:24am UTC](https://root-forum.cern.ch/t/if-else-problems-for-running-code/34719 "2019-06-20T06:24:13Z")

</div>

Hello fellow ROOTers, I am trying to run some if else statements for my code, but It doesn’t seem to work. //----Filling the Histograms---- std::string answer; cout \<\< "Open default file? (y or n) "; cin \>\> ans…

---

## [Full width at half maximum help?](https://root-forum.cern.ch/t/full-width-at-half-maximum-help/34711)

<div class="topic-metadata">

**Author:** [@JorgeM](https://root-forum.cern.ch/u/JorgeM)\
**Replies:** 3\
**Last updated:** [June 20, 2019, 5:41am UTC](https://root-forum.cern.ch/t/full-width-at-half-maximum-help/34711 "2019-06-20T05:41:55Z")

</div>

Hi! I am trying to calculate the full width at half maximum of a specific peak in my histogram (I have several at different energies.) Is there a way to do this just for a specific peak in a multipeak hist? I found th…

---

## [Having a hard time running root](https://root-forum.cern.ch/t/having-a-hard-time-running-root/34673)

<div class="topic-metadata">

**Author:** [@ROGER10](https://root-forum.cern.ch/u/ROGER10)\
**Replies:** 1\
**Last updated:** [June 18, 2019, 9:38pm UTC](https://root-forum.cern.ch/t/having-a-hard-time-running-root/34673 "2019-06-18T21:38:08Z")

</div>

Hello, I recently installed root and all of the components needed for me to run it on my mac. Everything went well while building and I was able to run root the first time. I restarted my mac while trying to install some…

---

## [AddButton function when writing a GUI](https://root-forum.cern.ch/t/addbutton-function-when-writing-a-gui/34640)

<div class="topic-metadata">

**Author:** [@ReynLieu](https://root-forum.cern.ch/u/ReynLieu)\
**Replies:** 4\
**Last updated:** [June 18, 2019, 7:04am UTC](https://root-forum.cern.ch/t/addbutton-function-when-writing-a-gui/34640 "2019-06-18T07:04:11Z")

</div>

Hi ROOTers, I find that the declaration of TControlBar::AddButton() can be like “void TControlBar::AddButton ( const char\* label, const char\* action, const char\* hint = “”, const char\* type = “button”)” I wonder what a…

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

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