# Newbie

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

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

---

## [Extract rms from text files and plot](https://root-forum.cern.ch/t/extract-rms-from-text-files-and-plot/54060)

<div class="topic-metadata">

**Author:** [@gdash](https://root-forum.cern.ch/u/gdash)\
**Replies:** 3\
**Last updated:** [March 16, 2023, 9:36am UTC](https://root-forum.cern.ch/t/extract-rms-from-text-files-and-plot/54060 "2023-03-16T09:36:01Z")

</div>

I have 50 files and I’m trying to extract rms from each and plot them with file name. I have the following code. import os import ROOT from array import array # Define the directory where the text files are located dir…

---

## [Multigraph with a linear & a log axis (data set)](https://root-forum.cern.ch/t/multigraph-with-a-linear-a-log-axis-data-set/54032)

<div class="topic-metadata">

**Author:** [@GeetJ](https://root-forum.cern.ch/u/GeetJ)\
**Replies:** 5\
**Last updated:** [March 15, 2023, 8:02pm UTC](https://root-forum.cern.ch/t/multigraph-with-a-linear-a-log-axis-data-set/54032 "2023-03-15T20:02:43Z")

</div>

Hi, I have the following data sets: (a) linear X-axis + linear Y1-axis with asymmetric errors (b) linear X-axis + logarithmic Y2-axis with symmetric errors. How do I have them on the same plot together? Use multigrap…

---

## [Latest ROOT release](https://root-forum.cern.ch/t/latest-root-release/52243)

<div class="topic-metadata">

**Author:** [@Yeung](https://root-forum.cern.ch/u/Yeung)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 6:39pm UTC](https://root-forum.cern.ch/t/latest-root-release/52243 "2023-03-15T18:39:17Z")

</div>

Hello, Is 6.26/08 the latest stable release? In this link Releases - ROOT the latest one is 6.26/06. Thanks, Y

---

## [File not showing up](https://root-forum.cern.ch/t/file-not-showing-up/54045)

<div class="topic-metadata">

**Author:** [@tthakare](https://root-forum.cern.ch/u/tthakare)\
**Replies:** 2\
**Last updated:** [March 15, 2023, 10:31am UTC](https://root-forum.cern.ch/t/file-not-showing-up/54045 "2023-03-15T10:31:37Z")

</div>

I am trying condense my ntuples into single file. The terminal output shows that output files is ready but whenever I go on to check output file in the directory it says file not found. Is there any solution for that?

---

## [Problem in plotting using MultiGraph](https://root-forum.cern.ch/t/problem-in-plotting-using-multigraph/54004)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 2\
**Last updated:** [March 14, 2023, 8:35am UTC](https://root-forum.cern.ch/t/problem-in-plotting-using-multigraph/54004 "2023-03-14T08:35:23Z")

</div>

Hi, I want to plot 4 different data sets using multigraph on the same plot. For Data set A and D I want to draw the markers with error bars(without joining the lines between them). While for Data set B and C I want to…

---

## [No Dictionary is available](https://root-forum.cern.ch/t/no-dictionary-is-available/53959)

<div class="topic-metadata">

**Author:** [@Natilus](https://root-forum.cern.ch/u/Natilus)\
**Replies:** 3\
**Last updated:** [March 13, 2023, 6:10pm UTC](https://root-forum.cern.ch/t/no-dictionary-is-available/53959 "2023-03-13T18:10:11Z")

</div>

Dear Root experts, I have a code that runs over a root file and after reading data and applying some cuts writes the data to an output root file. The code compiles successfully with no errors. However, in the runtime, …

---

## [Copy rdataframe column into another rdataframe](https://root-forum.cern.ch/t/copy-rdataframe-column-into-another-rdataframe/53969)

<div class="topic-metadata">

**Author:** [@lilina](https://root-forum.cern.ch/u/lilina)\
**Replies:** 1\
**Last updated:** [March 10, 2023, 9:13pm UTC](https://root-forum.cern.ch/t/copy-rdataframe-column-into-another-rdataframe/53969 "2023-03-10T21:13:49Z")

</div>

Hi! I have two different dataframes with the same number of entries. How can I copy one column of the dataframe 1 into the dataframe 2? Many thanks!

---

## [Unable to fit a custom function](https://root-forum.cern.ch/t/unable-to-fit-a-custom-function/53899)

<div class="topic-metadata">

**Author:** [@seb\_root\_newbie](https://root-forum.cern.ch/u/seb_root_newbie)\
**Replies:** 5\
**Last updated:** [March 10, 2023, 2:24pm UTC](https://root-forum.cern.ch/t/unable-to-fit-a-custom-function/53899 "2023-03-10T14:24:51Z")

</div>

Dear ROOT experts, I’m trying to fit a custom function: f(x) = c0 + c2.x + c1.exp(c3.x) from a binned histogram with weights (errors). I’ve tried using TGraphError, but the fit fails. (As a new user, I’m unable to p…

---

## [TTree with class and array](https://root-forum.cern.ch/t/ttree-with-class-and-array/53790)

<div class="topic-metadata">

**Author:** [@hvsouza](https://root-forum.cern.ch/u/hvsouza)\
**Replies:** 13\
**Last updated:** [March 9, 2023, 8:02pm UTC](https://root-forum.cern.ch/t/ttree-with-class-and-array/53790 "2023-03-09T20:02:01Z")

</div>

Dear all, I’ve crossed this problem several times. And I am not sure how to deal with it. Please, find attached an example script to reproduce the problem (execute example\_tree\_write.C and then example\_tree\_read.C. To…

---

## [Draw TH2F with lego option and error bars](https://root-forum.cern.ch/t/draw-th2f-with-lego-option-and-error-bars/53950)

<div class="topic-metadata">

**Author:** [@rookie\_root](https://root-forum.cern.ch/u/rookie_root)\
**Replies:** 6\
**Last updated:** [March 9, 2023, 1:59pm UTC](https://root-forum.cern.ch/t/draw-th2f-with-lego-option-and-error-bars/53950 "2023-03-09T13:59:15Z")

</div>

Hi, I would like to draw a TH2F lego style but with the errors shown. I tried to combine both the LEGO and E options but it does not seem to work, it is either or… (when I simply add the e after lego I do get some dots…

---

## [Error compiling ROOT and Pythia8 from source (M1 Mac)](https://root-forum.cern.ch/t/error-compiling-root-and-pythia8-from-source-m1-mac/53930)

<div class="topic-metadata">

**Author:** [@jmccool](https://root-forum.cern.ch/u/jmccool)\
**Replies:** 2\
**Last updated:** [March 8, 2023, 2:56pm UTC](https://root-forum.cern.ch/t/error-compiling-root-and-pythia8-from-source-m1-mac/53930 "2023-03-08T14:56:59Z")

</div>

Hello, I am a beginner when it comes to using the terminal and unix, and I am trying to compile Root from source with Pythia8. I believe that I have downloaded pythia and root as well as added the various important dire…

---

## [CMAKE error when installing root](https://root-forum.cern.ch/t/cmake-error-when-installing-root/53918)

<div class="topic-metadata">

**Author:** [@SKY](https://root-forum.cern.ch/u/SKY)\
**Replies:** 4\
**Last updated:** [March 8, 2023, 12:14pm UTC](https://root-forum.cern.ch/t/cmake-error-when-installing-root/53918 "2023-03-08T12:14:26Z")

</div>

\_ROOT Version: v6-28-00 Platform: MacOS Compiler: Not Provided I am trying to install root following instructions: and when I try to build using the following commands: cd ../root-build cmake -DCMAKE\_INSTALL\_PREFI…

---

## [TGraphErrors Multithread Fit with ROOT::Fit:Fitter](https://root-forum.cern.ch/t/tgrapherrors-multithread-fit-with-root-fitter/51299)

<div class="topic-metadata">

**Author:** [@lilina](https://root-forum.cern.ch/u/lilina)\
**Replies:** 8\
**Last updated:** [March 8, 2023, 11:29am UTC](https://root-forum.cern.ch/t/tgrapherrors-multithread-fit-with-root-fitter/51299 "2023-03-08T11:29:53Z")

</div>

Hi, Could someone help me to set up multi-threaded fitting with ROOT::Fit:Fitter for TGraphsErrors? I have seen examples with TH1::Fit and TGraph::Fit and also with the fitter but only using histograms and vectors. I ne…

---

## [How to plot two 2D histograms on the same canvas?](https://root-forum.cern.ch/t/how-to-plot-two-2d-histograms-on-the-same-canvas/53926)

<div class="topic-metadata">

**Author:** [@Divyang](https://root-forum.cern.ch/u/Divyang)\
**Replies:** 3\
**Last updated:** [March 8, 2023, 10:50am UTC](https://root-forum.cern.ch/t/how-to-plot-two-2d-histograms-on-the-same-canvas/53926 "2023-03-08T10:50:19Z")

</div>

Hello everyone, I saw the attached 2D histogram in one report. As you can notice, there are two 2D histograms on the same canvas, one with colour code and other with red colour. I think this is a nice presentation to no…

---

## [Problem to use a compiled library in a root script](https://root-forum.cern.ch/t/problem-to-use-a-compiled-library-in-a-root-script/53925)

<div class="topic-metadata">

**Author:** [@Leo\_Tarbouriech](https://root-forum.cern.ch/u/Leo_Tarbouriech)\
**Replies:** 1\
**Last updated:** [March 8, 2023, 9:22am UTC](https://root-forum.cern.ch/t/problem-to-use-a-compiled-library-in-a-root-script/53925 "2023-03-08T09:22:18Z")

</div>

I am trying to use a library to improve and simplify root graphics. For the moment I am doing the following program for testing. 1 R\_\_ADD\_INCLUDE\_PATH(/afs/cern.ch/user/l/ltarbour/PlottingHelper) 2 #include "TCanvas…

---

## [TTree larger than 100Gb error while merging files](https://root-forum.cern.ch/t/ttree-larger-than-100gb-error-while-merging-files/53916)

<div class="topic-metadata">

**Author:** [@helene](https://root-forum.cern.ch/u/helene)\
**Replies:** 2\
**Last updated:** [March 7, 2023, 6:17pm UTC](https://root-forum.cern.ch/t/ttree-larger-than-100gb-error-while-merging-files/53916 "2023-03-07T18:17:11Z")

</div>

Hello, When I am using hadd to merge all my root files, I encounter this error: Output file of the TFile Merger (targeting results.xRay.root) has been deleted (likely due to a TTree larger than 100Gb) Aborted \_ROOT V…

---

## [Plot data from a branch versus other branch](https://root-forum.cern.ch/t/plot-data-from-a-branch-versus-other-branch/53895)

<div class="topic-metadata">

**Author:** [@LuisMiguel](https://root-forum.cern.ch/u/LuisMiguel)\
**Replies:** 10\
**Last updated:** [March 6, 2023, 2:42pm UTC](https://root-forum.cern.ch/t/plot-data-from-a-branch-versus-other-branch/53895 "2023-03-06T14:42:36Z")

</div>

Hello everyone I have in the same tree two branches, one silicon detector data “Si1” and the time in “t1”. When I draw the data from Si1 it plots directly by channel or energy if I apply the calibration. The issue is th…

---

## [Histogram with not adjacent custom bins](https://root-forum.cern.ch/t/histogram-with-not-adjacent-custom-bins/53892)

<div class="topic-metadata">

**Author:** [@alexandg](https://root-forum.cern.ch/u/alexandg)\
**Replies:** 1\
**Last updated:** [March 6, 2023, 11:59am UTC](https://root-forum.cern.ch/t/histogram-with-not-adjacent-custom-bins/53892 "2023-03-06T11:59:34Z")

</div>

Please read tips for efficient and successful posting and posting code \_ROOT Version: 6.24 \_Platform: lxplus7 \_Compiler: g++ 4.8.5 Hello, I would like to make a histogram with custom bins. Not just custom bin widt…

---

## [What C++ standard is used to build the precompiled binaries?](https://root-forum.cern.ch/t/what-c-standard-is-used-to-build-the-precompiled-binaries/53598)

<div class="topic-metadata">

**Author:** [@pauln](https://root-forum.cern.ch/u/pauln)\
**Replies:** 3\
**Last updated:** [March 6, 2023, 10:12am UTC](https://root-forum.cern.ch/t/what-c-standard-is-used-to-build-the-precompiled-binaries/53598 "2023-03-06T10:12:12Z")

</div>

Hi all, Is there a way to check what c++ standard was used to build a pre-compiled binary distribution of ROOT? Or is this documented somewhere? Cheers, Paul

---

## [Restrict the fit range on x-axis](https://root-forum.cern.ch/t/restrict-the-fit-range-on-x-axis/53843)

<div class="topic-metadata">

**Author:** [@alex14](https://root-forum.cern.ch/u/alex14)\
**Replies:** 4\
**Last updated:** [March 5, 2023, 5:17am UTC](https://root-forum.cern.ch/t/restrict-the-fit-range-on-x-axis/53843 "2023-03-05T05:17:18Z")

</div>

Hi all, I have a question about fitting TH1D histograms to the user-defined function “gaus” As I mentioned, I fit the histogram hist\_am\[k\]-\>Fit(“gaus”); but now I want to restrict the fit range on the right side to 2. …

---

## [FFT demo error in 6.27 binary (win 10)](https://root-forum.cern.ch/t/fft-demo-error-in-6-27-binary-win-10/52669)

<div class="topic-metadata">

**Author:** [@shu11](https://root-forum.cern.ch/u/shu11)\
**Replies:** 10\
**Last updated:** [March 3, 2023, 7:22am UTC](https://root-forum.cern.ch/t/fft-demo-error-in-6-27-binary-win-10/52669 "2023-03-03T07:22:01Z")

</div>

Hi, Here is the screen capture and error message. ROOT is a binary and fftw3 is enabled in the binary build. After this error, ROOT just exited. Is the problem in the binary build? Can someone confirm? | Welcome to RO…

---

## [Problem accesing tree data in makeclass Loop](https://root-forum.cern.ch/t/problem-accesing-tree-data-in-makeclass-loop/53839)

<div class="topic-metadata">

**Author:** [@Zvonko](https://root-forum.cern.ch/u/Zvonko)\
**Replies:** 7\
**Last updated:** [March 2, 2023, 8:46pm UTC](https://root-forum.cern.ch/t/problem-accesing-tree-data-in-makeclass-loop/53839 "2023-03-02T20:46:42Z")

</div>

Hi, I am experiencing issues while trying to access data stored in Ttree. I am using Loop function in makeClass. My Ttree consists of: // Declaration of leaf types Int\_t info\_iev; Int\_t info\_…

---

## [ROOT Snapshot function seems to be blocked when using vector\<vector\<float\>\>](https://root-forum.cern.ch/t/root-snapshot-function-seems-to-be-blocked-when-using-vector-vector-float/53696)

<div class="topic-metadata">

**Author:** [@mchiusi](https://root-forum.cern.ch/u/mchiusi)\
**Replies:** 6\
**Last updated:** [March 2, 2023, 3:41pm UTC](https://root-forum.cern.ch/t/root-snapshot-function-seems-to-be-blocked-when-using-vector-vector-float/53696 "2023-03-02T15:41:55Z")

</div>

Good morning, I’m trying to create a new TTree containing some selected branches from a more general TTree. I’m having some issues with the following branches: genpart\_posx, genpart\_posy and genpart\_posz. In the origin…

---

## [Error with Readoptical.cpp](https://root-forum.cern.ch/t/error-with-readoptical-cpp/53846)

<div class="topic-metadata">

**Author:** [@Saradindu](https://root-forum.cern.ch/u/Saradindu)\
**Replies:** 2\
**Last updated:** [March 2, 2023, 12:53pm UTC](https://root-forum.cern.ch/t/error-with-readoptical-cpp/53846 "2023-03-02T12:53:36Z")

</div>

Dear Sir, While compiling my program i am getting the following error. ReadOptical.cpp:105:29: error: invalid use of incomplete type ‘class TKey’ 105 | TString name = key-\>GetName(); | …

---

## [Applying cut on histogram without changing axis range](https://root-forum.cern.ch/t/applying-cut-on-histogram-without-changing-axis-range/53835)

<div class="topic-metadata">

**Author:** [@beg1nner](https://root-forum.cern.ch/u/beg1nner)\
**Replies:** 3\
**Last updated:** [March 1, 2023, 4:16pm UTC](https://root-forum.cern.ch/t/applying-cut-on-histogram-without-changing-axis-range/53835 "2023-03-01T16:16:31Z")

</div>

Hello, it’s a very basic question, but I have looked everywhere and could not find a satisfying solution. I have a histogram in a .root file, which does not have a TTree structure. What I want to do is to apply cut on …

---

## [I want to use Jupyter on windows but I have some problem](https://root-forum.cern.ch/t/i-want-to-use-jupyter-on-windows-but-i-have-some-problem/53825)

<div class="topic-metadata">

**Author:** [@CIAE](https://root-forum.cern.ch/u/CIAE)\
**Replies:** 1\
**Last updated:** [March 1, 2023, 8:10am UTC](https://root-forum.cern.ch/t/i-want-to-use-jupyter-on-windows-but-i-have-some-problem/53825 "2023-03-01T08:10:04Z")

</div>

Hi, I installed ROOT on Windows in order to be able to use ROOT on Jupyter Notebook. ROOT seems to be properly installed but I’m not sure how to access C++ from Jupyter at this point. Any help would be appreciated! I k…

---

## [Question about the function "Form" that return a format string](https://root-forum.cern.ch/t/question-about-the-function-form-that-return-a-format-string/53815)

<div class="topic-metadata">

**Author:** [@LongHoa](https://root-forum.cern.ch/u/LongHoa)\
**Replies:** 3\
**Last updated:** [March 1, 2023, 5:57am UTC](https://root-forum.cern.ch/t/question-about-the-function-form-that-return-a-format-string/53815 "2023-03-01T05:57:27Z")

</div>

Hello, I would want to ask about the Form function in ROOT. I read from the TString class reference page that this function is not very safe to format strings, as the string can be overwritten. I encountered such issue …

---

## [Data plots from root interpreter but not from macro](https://root-forum.cern.ch/t/data-plots-from-root-interpreter-but-not-from-macro/53820)

<div class="topic-metadata">

**Author:** [@jcooper](https://root-forum.cern.ch/u/jcooper)\
**Replies:** 10\
**Last updated:** [February 28, 2023, 9:51pm UTC](https://root-forum.cern.ch/t/data-plots-from-root-interpreter-but-not-from-macro/53820 "2023-02-28T21:51:45Z")

</div>

For following simple data file: # trial data plotdata1 #x y 1.0 1.0 3.0 2.0 3.0 3.5 5.0 3.0 5.0 5.0 7.0 5.0 7.0 7.0 8.0 6.0 I can load and plot it from the interpreter with: TGraph gr ("plotdata1.txt") gr.D…

---

## [Find Maximum of THn?](https://root-forum.cern.ch/t/find-maximum-of-thn/53797)

<div class="topic-metadata">

**Author:** [@lost0431](https://root-forum.cern.ch/u/lost0431)\
**Replies:** 2\
**Last updated:** [February 28, 2023, 5:48pm UTC](https://root-forum.cern.ch/t/find-maximum-of-thn/53797 "2023-02-28T17:48:16Z")

</div>

I am creating a four dimensional histogram, using THn. Now I want to normalize it. Previously, for lower dimensions, I used hist -\> Scale(1./hist -\> GetMaximum()); but this does not work for THn. I get the error error…

---

## [Drawing histogram ratio as bars](https://root-forum.cern.ch/t/drawing-histogram-ratio-as-bars/53801)

<div class="topic-metadata">

**Author:** [@yburkard](https://root-forum.cern.ch/u/yburkard)\
**Replies:** 12\
**Last updated:** [February 28, 2023, 4:12pm UTC](https://root-forum.cern.ch/t/drawing-histogram-ratio-as-bars/53801 "2023-02-28T16:12:57Z")

</div>

Dear Users, I have a simple question which I could not find the answer to. I want to draw a histogram ratio plot as bars starting from the line y=1. My code lines look as follows (hist1 and hist2 are TH1D objects): rat…

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

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