# Newbie

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

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

---

## [Segmentation fault when compiling with gcc](https://root-forum.cern.ch/t/segmentation-fault-when-compiling-with-gcc/32945)

<div class="topic-metadata">

**Author:** [@RFH](https://root-forum.cern.ch/u/RFH)\
**Replies:** 1\
**Last updated:** [March 1, 2019, 8:50am UTC](https://root-forum.cern.ch/t/segmentation-fault-when-compiling-with-gcc/32945 "2019-03-01T08:50:06Z")

</div>

Hello, I am trying to run a code with g++ including root libraries. In particular I want to make use of TMinuit. When I compile the code using, g++ -o Output Input.cpp root-config --cflags root-c onfig --cflags --glib…

---

## [How to update root on the terminal](https://root-forum.cern.ch/t/how-to-update-root-on-the-terminal/32960)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [February 28, 2019, 3:35pm UTC](https://root-forum.cern.ch/t/how-to-update-root-on-the-terminal/32960 "2019-02-28T15:35:20Z")

</div>

Hi, Is it possible to update root to get the latest version using the terminal? Thanks!

---

## [Running various root codes with same canvas name in the same root session gives redefinition issue](https://root-forum.cern.ch/t/running-various-root-codes-with-same-canvas-name-in-the-same-root-session-gives-redefinition-issue/32733)

<div class="topic-metadata">

**Author:** [@Aqsa\_Shaikh](https://root-forum.cern.ch/u/Aqsa_Shaikh)\
**Replies:** 7\
**Last updated:** [February 27, 2019, 9:54am UTC](https://root-forum.cern.ch/t/running-various-root-codes-with-same-canvas-name-in-the-same-root-session-gives-redefinition-issue/32733 "2019-02-27T09:54:13Z")

</div>

I have a few programs which I run in the same root session, but I have observed that since they have same definition of canvas ie. auto c1 = new TCanvas("c1","Title",500,500); I get the following error /home/file.…

---

## [Need to add special character in Axis Title](https://root-forum.cern.ch/t/need-to-add-special-character-in-axis-title/32923)

<div class="topic-metadata">

**Author:** [@Aqsa\_Shaikh](https://root-forum.cern.ch/u/Aqsa_Shaikh)\
**Replies:** 2\
**Last updated:** [February 27, 2019, 5:01am UTC](https://root-forum.cern.ch/t/need-to-add-special-character-in-axis-title/32923 "2019-02-27T05:01:00Z")

</div>

I have made a graph in the it I need to insert σ (small sigma) as title of Y-axis. I added that as g1-\>SetTitle("graph; thickness; σ "); But the plotted graph shows “:-” as the name of my Y axis. Is there a solution to…

---

## [Using TProof with TSelector Class](https://root-forum.cern.ch/t/using-tproof-with-tselector-class/32876)

<div class="topic-metadata">

**Author:** [@sakib\_rahman](https://root-forum.cern.ch/u/sakib_rahman)\
**Replies:** 6\
**Last updated:** [February 26, 2019, 1:08am UTC](https://root-forum.cern.ch/t/using-tproof-with-tselector-class/32876 "2019-02-26T01:08:31Z")

</div>

I am trying to use TProof with TSelector Class. My code works if I use just the selector class with no TProof. But when I turn it on, it gets segmentation violation saying that it doesn’t recognize the data type of the o…

---

## [Problem with a macro file](https://root-forum.cern.ch/t/problem-with-a-macro-file/32883)

<div class="topic-metadata">

**Author:** [@JohnyBoy](https://root-forum.cern.ch/u/JohnyBoy)\
**Replies:** 4\
**Last updated:** [February 24, 2019, 2:20pm UTC](https://root-forum.cern.ch/t/problem-with-a-macro-file/32883 "2019-02-24T14:20:32Z")

</div>

Hello everyone. I’m having some problems with an example of a macro file I got at https://root.cern.ch/root/html/tutorials/hist/ratioplot.C.html . When I try to run the macro file, the following errors appear: /home/os…

---

## [Illegal Pointers and Interpreting ROOT error codes](https://root-forum.cern.ch/t/illegal-pointers-and-interpreting-root-error-codes/32880)

<div class="topic-metadata">

**Author:** [@Marisa\_P](https://root-forum.cern.ch/u/Marisa_P)\
**Replies:** 2\
**Last updated:** [February 24, 2019, 7:03am UTC](https://root-forum.cern.ch/t/illegal-pointers-and-interpreting-root-error-codes/32880 "2019-02-24T07:03:34Z")

</div>

Hello, many times in my work I will see the following error code: Error: illegal pointer to class object infile 0x0 5 GEM\_zoffset.cpp:35: The lines of code in question are TString \* s\_infile = Form("histograms\_run%d.r…

---

## [Class created by MakeClass() won't load because "error: invalid use of non-static data member"](https://root-forum.cern.ch/t/class-created-by-makeclass-wont-load-because-error-invalid-use-of-non-static-data-member/32864)

<div class="topic-metadata">

**Author:** [@Day](https://root-forum.cern.ch/u/Day)\
**Replies:** 1\
**Last updated:** [February 22, 2019, 3:51pm UTC](https://root-forum.cern.ch/t/class-created-by-makeclass-wont-load-because-error-invalid-use-of-non-static-data-member/32864 "2019-02-22T15:51:36Z")

</div>

So I have tree called “Delphes” and I load the libEvent.so library and do tree-\>MakeClass(). This creates the class and header files with the same name as the tree. If I then attempt to load the “Delphes.C” I get many “e…

---

## [Problem with TCutG in Ttree-\>Draw](https://root-forum.cern.ch/t/problem-with-tcutg-in-ttree-draw/32858)

<div class="topic-metadata">

**Author:** [@davide.rigamonti](https://root-forum.cern.ch/u/davide.rigamonti)\
**Replies:** 4\
**Last updated:** [February 22, 2019, 3:00pm UTC](https://root-forum.cern.ch/t/problem-with-tcutg-in-ttree-draw/32858 "2019-02-22T15:00:42Z")

</div>

Dear all, I’m having problems with a TCutG when used with ttree-\>Draw. Basically my code it draws an empty histogram when a TCutG is applied. I’m using ROOT 6.14/06 on Ubuntu 16.04 Please find attached my macro. Than…

---

## [Creating multiple histograms in a loop with different names](https://root-forum.cern.ch/t/creating-multiple-histograms-in-a-loop-with-different-names/32852)

<div class="topic-metadata">

**Author:** [@Jitrusko](https://root-forum.cern.ch/u/Jitrusko)\
**Replies:** 1\
**Last updated:** [February 22, 2019, 8:56am UTC](https://root-forum.cern.ch/t/creating-multiple-histograms-in-a-loop-with-different-names/32852 "2019-02-22T08:56:02Z")

</div>

Hello rooters, beginner here. My problem is: I have a root file with many histograms in it. Each histogram is called the same, but has diiferent row and column numbers: Energy\_column\_0\_row\_0, Energy\_column\_1\_row\_1, Ene…

---

## [TEfficiency error](https://root-forum.cern.ch/t/tefficiency-error/32786)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 5\
**Last updated:** [February 21, 2019, 4:29pm UTC](https://root-forum.cern.ch/t/tefficiency-error/32786 "2019-02-21T16:29:11Z")

</div>

Hi, I have a set of rootfiles containing TH1’s. I have a script dividing these TH1’s using TEfficiency to obtain efficiency plots: h\_ptEff = ROOT.TEfficiency(h1\_pt,h2\_pt) When I “hadd” these files, and calculate the e…

---

## [Issue compiling Root](https://root-forum.cern.ch/t/issue-compiling-root/32817)

<div class="topic-metadata">

**Author:** [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Replies:** 11\
**Last updated:** [February 21, 2019, 3:14pm UTC](https://root-forum.cern.ch/t/issue-compiling-root/32817 "2019-02-21T15:14:26Z")

</div>

Hi everyone Im a complete beginner using ROOT so please be patient Ultimately I would like to load a gdml file like so: “TGeoManager::Import(“tileFingerPos.gdml”);” I have not been able to make this work in root from…

---

## [Canvas without histogram from ROOT Guide For Beginners](https://root-forum.cern.ch/t/canvas-without-histogram-from-root-guide-for-beginners/32841)

<div class="topic-metadata">

**Author:** [@AOS](https://root-forum.cern.ch/u/AOS)\
**Replies:** 2\
**Last updated:** [February 21, 2019, 2:30pm UTC](https://root-forum.cern.ch/t/canvas-without-histogram-from-root-guide-for-beginners/32841 "2019-02-21T14:30:12Z")

</div>

Hello all, I took this guide https://root.cern.ch/root/htmldoc/guides/primer/ROOTPrimer.html#storing-root-objects and tried 7.1 Storing ROOT Objects. When try this macros using .x read\_from\_file.C: void read\_from\_file…

---

## [TProfile From a TH2D Histogram](https://root-forum.cern.ch/t/tprofile-from-a-th2d-histogram/32825)

<div class="topic-metadata">

**Author:** [@Maximus12108](https://root-forum.cern.ch/u/Maximus12108)\
**Replies:** 2\
**Last updated:** [February 21, 2019, 9:44am UTC](https://root-forum.cern.ch/t/tprofile-from-a-th2d-histogram/32825 "2019-02-21T09:44:14Z")

</div>

Hi, I have a 2D-Histogram and a TProfile that I have declared: Double\_t x\[ \] = {1., 2., 3., 5., 7., 9., 13., 19., 27., 37., 52., 74., 105., 155.}; //define histogram and profile TProfile \*prof = new TProfile("prof", "…

---

## [Setting Axis Range Exactly With Variable Bins](https://root-forum.cern.ch/t/setting-axis-range-exactly-with-variable-bins/32824)

<div class="topic-metadata">

**Author:** [@JackLindon](https://root-forum.cern.ch/u/JackLindon)\
**Replies:** 8\
**Last updated:** [February 20, 2019, 6:15pm UTC](https://root-forum.cern.ch/t/setting-axis-range-exactly-with-variable-bins/32824 "2019-02-20T18:15:27Z")

</div>

Hi, I have a histogram with variable size bins (for an example (0,100,150,200,500,20000)). I want to set the X axis limits so that it will go from 0 to 1000. However, if this is done with hist-\>GetXaxis()-\>SetRangeUse…

---

## [RDataFrame SaveGraph root node](https://root-forum.cern.ch/t/rdataframe-savegraph-root-node/32821)

<div class="topic-metadata">

**Author:** [@cwiel](https://root-forum.cern.ch/u/cwiel)\
**Replies:** 1\
**Last updated:** [February 20, 2019, 3:46pm UTC](https://root-forum.cern.ch/t/rdataframe-savegraph-root-node/32821 "2019-02-20T15:46:32Z")

</div>

Hi, I am very happy about the new RDataFrame and am using it frequently. I am using RDataFrame with PyROOT in version 6.16.00. I want to apply some Filters to the RDataFrame and then visualize all filter nodes with th…

---

## [Error when trying to plot chi square contour](https://root-forum.cern.ch/t/error-when-trying-to-plot-chi-square-contour/32795)

<div class="topic-metadata">

**Author:** [@hugo\_leung](https://root-forum.cern.ch/u/hugo_leung)\
**Replies:** 1\
**Last updated:** [February 19, 2019, 9:36am UTC](https://root-forum.cern.ch/t/error-when-trying-to-plot-chi-square-contour/32795 "2019-02-19T09:36:02Z")

</div>

I am trying to plot the chi square contour but I got the following error 0x00007fc1ed6987e7 in \<unknown\> from /home/hugo/bin/lib/libCling.so 0x00007fc1ed698c3f in cling::Interpreter::EvaluateInternal(std::\_\_cxx11::bas…

---

## [Cannot open gdml file](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744)

<div class="topic-metadata">

**Author:** [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Replies:** 14\
**Last updated:** [February 19, 2019, 8:39am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744 "2019-02-19T08:39:23Z")

</div>

Hi everyone Im a complete beginner using ROOT so please be patient I guess there is something that is not imported yet. Do any of you have any ideas? Im trying to import my gdml file with “TGeoafTGeoManager::Import(“t…

---

## [How to compile my code](https://root-forum.cern.ch/t/how-to-compile-my-code/32780)

<div class="topic-metadata">

**Author:** [@ACalcaterra](https://root-forum.cern.ch/u/ACalcaterra)\
**Replies:** 5\
**Last updated:** [February 18, 2019, 1:15pm UTC](https://root-forum.cern.ch/t/how-to-compile-my-code/32780 "2019-02-18T13:15:56Z")

</div>

Hi, the great thing about ROOT is that it keeps making you a newbie every few years. I used to be able have a working macro for ROOT and a compilable version that would have run on its own: #ifdef \_\_CINT\_\_ void wth(…

---

## [Stat box is not saved with TGraph](https://root-forum.cern.ch/t/stat-box-is-not-saved-with-tgraph/32745)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 1\
**Last updated:** [February 15, 2019, 8:35am UTC](https://root-forum.cern.ch/t/stat-box-is-not-saved-with-tgraph/32745 "2019-02-15T08:35:44Z")

</div>

I am fitting several TGraph objects, and if the fit is not good, I want to save a plot of the TGraph, the fit function and the stat box. On top of my macro I have the option gStyle-\>SetOptFit(); Once I defined my fu…

---

## [Font Style and size for axes labels](https://root-forum.cern.ch/t/font-style-and-size-for-axes-labels/32748)

<div class="topic-metadata">

**Author:** [@Aqsa\_Shaikh](https://root-forum.cern.ch/u/Aqsa_Shaikh)\
**Replies:** 1\
**Last updated:** [February 15, 2019, 8:28am UTC](https://root-forum.cern.ch/t/font-style-and-size-for-axes-labels/32748 "2019-02-15T08:28:37Z")

</div>

I am writing a code for plotting two graph lines on one plot with different Y-axes on either side for individual graph line. One of the axes I am plotting with the graph (first one) so it is taking the default font style…

---

## [Access tree in a .root file](https://root-forum.cern.ch/t/access-tree-in-a-root-file/32730)

<div class="topic-metadata">

**Author:** [@gugi](https://root-forum.cern.ch/u/gugi)\
**Replies:** 2\
**Last updated:** [February 14, 2019, 12:26pm UTC](https://root-forum.cern.ch/t/access-tree-in-a-root-file/32730 "2019-02-14T12:26:51Z")

</div>

Hi everyone! Can you please tell me ho to access the trees you see in the picture “events;6” and “events;5” ? I am used to files with a level less and nothing works! Can you also please tell me if it is possible to …

---

## [Trying to read TLeafs (Tleaves?) containing variable length arrays, getting segfault](https://root-forum.cern.ch/t/trying-to-read-tleafs-tleaves-containing-variable-length-arrays-getting-segfault/32719)

<div class="topic-metadata">

**Author:** [@Day](https://root-forum.cern.ch/u/Day)\
**Replies:** 1\
**Last updated:** [February 13, 2019, 3:10pm UTC](https://root-forum.cern.ch/t/trying-to-read-tleafs-tleaves-containing-variable-length-arrays-getting-segfault/32719 "2019-02-13T15:10:11Z")

</div>

Version of root: ROOT 6.15/01 Version of madgraph: 2.6.5 The TTree I am working with is what is generated by running the madgraph tutorial with Pythia8 and Delphes enabled, limiting the number of events to 10. So that …

---

## [Installation problem - missing libCint.so](https://root-forum.cern.ch/t/installation-problem-missing-libcint-so/32686)

<div class="topic-metadata">

**Author:** [@papisano](https://root-forum.cern.ch/u/papisano)\
**Replies:** 3\
**Last updated:** [February 13, 2019, 11:46am UTC](https://root-forum.cern.ch/t/installation-problem-missing-libcint-so/32686 "2019-02-13T11:46:30Z")

</div>

Hello, I’m new to ROOT and I have just installed it. If I try to run a c++ script invoking ROOT I get the following error message: ./restab: error while loading shared libraries: libCint.so: cannot open shared object …

---

## [Compile Error on Ubuntu 18.04](https://root-forum.cern.ch/t/compile-error-on-ubuntu-18-04/31136)

<div class="topic-metadata">

**Author:** [@mp2u](https://root-forum.cern.ch/u/mp2u)\
**Replies:** 7\
**Last updated:** [February 13, 2019, 1:29am UTC](https://root-forum.cern.ch/t/compile-error-on-ubuntu-18-04/31136 "2019-02-13T01:29:32Z")

</div>

Ubuntu 18.04 gcc 4.8.5 root version 5.34/36 This error came up when attempting to compile. g++ -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude -pthread -I. -I/home/manuel/root/cint/cint/inc -o…

---

## [Improve fit by trigonometric function](https://root-forum.cern.ch/t/improve-fit-by-trigonometric-function/32604)

<div class="topic-metadata">

**Author:** [@Nyx](https://root-forum.cern.ch/u/Nyx)\
**Replies:** 4\
**Last updated:** [February 12, 2019, 9:07pm UTC](https://root-forum.cern.ch/t/improve-fit-by-trigonometric-function/32604 "2019-02-12T21:07:22Z")

</div>

I need to fit around 10^5 TGraph that are basically trigonometric functions with different amplitude and phase. I am specifically interested in the frequency. For that, I define: TF1 \*Cosine = new TF1("Cosine", "\[0\]\*cos…

---

## [Loop over subdirectories of a rootfile in pyRoot](https://root-forum.cern.ch/t/loop-over-subdirectories-of-a-rootfile-in-pyroot/32666)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [February 12, 2019, 11:17am UTC](https://root-forum.cern.ch/t/loop-over-subdirectories-of-a-rootfile-in-pyroot/32666 "2019-02-12T11:17:25Z")

</div>

Hi, I have the following structure in a root file containing subdirectories with TH1’s: rootfile.root subdir1 h\_1 h\_2 … subdir2 subdir3 … I want to normalise all the histograms with a scale factor, is there any…

---

## [Struggling with TGeoRCExtension](https://root-forum.cern.ch/t/struggling-with-tgeorcextension/32694)

<div class="topic-metadata">

**Author:** [@TLacaze](https://root-forum.cern.ch/u/TLacaze)\
**Replies:** 2\
**Last updated:** [February 12, 2019, 8:39am UTC](https://root-forum.cern.ch/t/struggling-with-tgeorcextension/32694 "2019-02-12T08:39:27Z")

</div>

Hi there, I am using ROOT to generate geometries. I need to link some properties to the volumes. The way I chose to do this is to make the geometry nodes carry the properties. So I am trying to add a python dict to a T…

---

## [Print vertical text using SetBinLabel](https://root-forum.cern.ch/t/print-vertical-text-using-setbinlabel/32683)

<div class="topic-metadata">

**Author:** [@Newbie](https://root-forum.cern.ch/u/Newbie)\
**Replies:** 1\
**Last updated:** [February 11, 2019, 11:55am UTC](https://root-forum.cern.ch/t/print-vertical-text-using-setbinlabel/32683 "2019-02-11T11:55:11Z")

</div>

Hi, Is there a way to have vertical words using SetBinLabel? Like: B i n L a b e l Thanks!

---

## [Double arrays in TTreeReaderArray](https://root-forum.cern.ch/t/double-arrays-in-ttreereaderarray/32646)

<div class="topic-metadata">

**Author:** [@bdrum](https://root-forum.cern.ch/u/bdrum)\
**Replies:** 2\
**Last updated:** [February 11, 2019, 9:47am UTC](https://root-forum.cern.ch/t/double-arrays-in-ttreereaderarray/32646 "2019-02-11T09:47:59Z")

</div>

Hi rooters, The problem is - one of my ttree branches has the variable which was define like Float\_t TrackPara\[m\]\[n\]; //m and n are fixed And when I try to process it via TTreeReaderArray like this TTreeReaderArray\<F…

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

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