# Newbie

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

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

---

## [How can I stop a macro at a certain point to check variables etc.?](https://root-forum.cern.ch/t/how-can-i-stop-a-macro-at-a-certain-point-to-check-variables-etc/52811)

<div class="topic-metadata">

**Author:** [@omartarif](https://root-forum.cern.ch/u/omartarif)\
**Replies:** 1\
**Last updated:** [December 20, 2022, 9:32am UTC](https://root-forum.cern.ch/t/how-can-i-stop-a-macro-at-a-certain-point-to-check-variables-etc/52811 "2022-12-20T09:32:33Z")

</div>

I would like a functionality similar to IPython embed where I can put a flag inside a .C macro to stop it running at that point and open a root prompt to check the variable values for debugging purposes. How can I achiev…

---

## [Plottinh derivative of a histogram without error bars](https://root-forum.cern.ch/t/plottinh-derivative-of-a-histogram-without-error-bars/52787)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 5\
**Last updated:** [December 20, 2022, 9:14am UTC](https://root-forum.cern.ch/t/plottinh-derivative-of-a-histogram-without-error-bars/52787 "2022-12-20T09:14:32Z")

</div>

Hi, I have a histogram and I find its derivavtive and fills it in another histogram. the histogram with the derivative has error bars, Is it possible to plot the histogram (derivative histogram) with errors? Also how …

---

## [Std::map error](https://root-forum.cern.ch/t/std-map-error/52785)

<div class="topic-metadata">

**Author:** [@shu11](https://root-forum.cern.ch/u/shu11)\
**Replies:** 7\
**Last updated:** [December 17, 2022, 1:19pm UTC](https://root-forum.cern.ch/t/std-map-error/52785 "2022-12-17T13:19:35Z")

</div>

Hi, What’s wrong with this code? ROOT version is 6.27: std::map\<std::string, int\> m{{"CPU", 10}, {"GPU", 15}} IncrementalExecutor::executeFunction: symbol '??$min@\_K@std@@YAAEB\_KAEB\_K0@Z' unresolved while linking funct…

---

## [Out of memory when ROOT does not have permission to write to a directory](https://root-forum.cern.ch/t/out-of-memory-when-root-does-not-have-permission-to-write-to-a-directory/52801)

<div class="topic-metadata">

**Author:** [@jocl](https://root-forum.cern.ch/u/jocl)\
**Replies:** 1\
**Last updated:** [December 16, 2022, 5:29pm UTC](https://root-forum.cern.ch/t/out-of-memory-when-root-does-not-have-permission-to-write-to-a-directory/52801 "2022-12-16T17:29:23Z")

</div>

Hi all, No code here, but I am wondering about some behavior I observed. I have a compiled program which uses ROOT - the actual content of the program is not particularly important to the behavior, but it reads from a …

---

## [Code is not reading the data from .txt file](https://root-forum.cern.ch/t/code-is-not-reading-the-data-from-txt-file/52793)

<div class="topic-metadata">

**Author:** [@syadav](https://root-forum.cern.ch/u/syadav)\
**Replies:** 1\
**Last updated:** [December 16, 2022, 1:50pm UTC](https://root-forum.cern.ch/t/code-is-not-reading-the-data-from-txt-file/52793 "2022-12-16T13:50:44Z")

</div>

My code is not reading the data from the txt file. I have given the correct path too still not reading.

---

## [Analysis skeleton for a TChain](https://root-forum.cern.ch/t/analysis-skeleton-for-a-tchain/52777)

<div class="topic-metadata">

**Author:** [@Stefano\_John](https://root-forum.cern.ch/u/Stefano_John)\
**Replies:** 2\
**Last updated:** [December 15, 2022, 3:50pm UTC](https://root-forum.cern.ch/t/analysis-skeleton-for-a-tchain/52777 "2022-12-15T15:50:48Z")

</div>

Hi again guys, sorry for my naive questions. I’m still trying to understand the logic of ROOT. Following my previous topic How to read array variable in a Tree , I create the .h and .C (and modify it) files but I cann…

---

## [Is TLorentzVector got some limitation](https://root-forum.cern.ch/t/is-tlorentzvector-got-some-limitation/52771)

<div class="topic-metadata">

**Author:** [@masterluke](https://root-forum.cern.ch/u/masterluke)\
**Replies:** 5\
**Last updated:** [December 15, 2022, 1:45pm UTC](https://root-forum.cern.ch/t/is-tlorentzvector-got-some-limitation/52771 "2022-12-15T13:45:57Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.26/06 Platform: Ubuntu20.04 Compiler: C Is TLorentzVector got some limit? For when I tape TLorentzVector particle\[100\]\[100-1…

---

## [Issues with Rtypes.h](https://root-forum.cern.ch/t/issues-with-rtypes-h/52774)

<div class="topic-metadata">

**Author:** [@blessed](https://root-forum.cern.ch/u/blessed)\
**Replies:** 1\
**Last updated:** [December 15, 2022, 2:49pm UTC](https://root-forum.cern.ch/t/issues-with-rtypes-h/52774 "2022-12-15T14:49:16Z")

</div>

I am facing issues with Rtypes.h, which calls some other root headers that call some functions that are not defined in the scope: QUOTE(name) gives me error with the first underscore, and somewhere the right bracket aft…

---

## [Error with name of the script](https://root-forum.cern.ch/t/error-with-name-of-the-script/52768)

<div class="topic-metadata">

**Author:** [@jamal](https://root-forum.cern.ch/u/jamal)\
**Replies:** 3\
**Last updated:** [December 15, 2022, 10:47am UTC](https://root-forum.cern.ch/t/error-with-name-of-the-script/52768 "2022-12-15T10:47:26Z")

</div>

Hi , i’m a cernroot beginner and i’m having trouble with a (maybe stupid) name question. For example, in Linux (i use Gedit to write my scripts), i’ve this file “test.C”: int test() { printf(“TEST \\n”); return 0; } …

---

## [Which one is more time-consuming? Multiple TH1 or Single TH2](https://root-forum.cern.ch/t/which-one-is-more-time-consuming-multiple-th1-or-single-th2/52759)

<div class="topic-metadata">

**Author:** [@tachyon](https://root-forum.cern.ch/u/tachyon)\
**Replies:** 2\
**Last updated:** [December 14, 2022, 7:35am UTC](https://root-forum.cern.ch/t/which-one-is-more-time-consuming-multiple-th1-or-single-th2/52759 "2022-12-14T07:35:44Z")

</div>

(Sorry in advance, I’m not sure this is the right place to ask this question.) When we want to make histograms for two variables, we can simply use one 2d histogram. Or we can use multiple 1d histograms (such that the …

---

## [Removing events in a root file](https://root-forum.cern.ch/t/removing-events-in-a-root-file/52712)

<div class="topic-metadata">

**Author:** [@giacomor](https://root-forum.cern.ch/u/giacomor)\
**Replies:** 1\
**Last updated:** [December 12, 2022, 4:30pm UTC](https://root-forum.cern.ch/t/removing-events-in-a-root-file/52712 "2022-12-12T16:30:31Z")

</div>

Hi, I have a root file that contains a tree and some histograms. For some reason i want to remove some events. Is there a way to just remove events from the file ? Or do I have to copy the tree in a new file after sel…

---

## [How to run pyROOT with crontab](https://root-forum.cern.ch/t/how-to-run-pyroot-with-crontab/52728)

<div class="topic-metadata">

**Author:** [@HienDoan](https://root-forum.cern.ch/u/HienDoan)\
**Replies:** 2\
**Last updated:** [December 12, 2022, 9:00am UTC](https://root-forum.cern.ch/t/how-to-run-pyroot-with-crontab/52728 "2022-12-12T09:00:54Z")

</div>

Hello, I want to run pyROOT with crontab. I import ROOT in .py file and when the crontab is running, an error message shows up: ModuleNotFoundError: No module named ‘ROOT’ This is my crontab’s content: PATH=/usr/loc…

---

## [TMVA Tutorial Fatal error](https://root-forum.cern.ch/t/tmva-tutorial-fatal-error/52501)

<div class="topic-metadata">

**Author:** [@steven1](https://root-forum.cern.ch/u/steven1)\
**Replies:** 12\
**Last updated:** [December 10, 2022, 10:31am UTC](https://root-forum.cern.ch/t/tmva-tutorial-fatal-error/52501 "2022-12-10T10:31:41Z")

</div>

Hi Root Forum, While trying out the TMVA tutorial : CNN classification for Python, I keep getting the same fatal error. I opted for using keras. My python version is Python 3.6.16 root-config --python-version: 3.6.9 I…

---

## [EtaPhiVector](https://root-forum.cern.ch/t/etaphivector/52701)

<div class="topic-metadata">

**Author:** [@abunka](https://root-forum.cern.ch/u/abunka)\
**Replies:** 3\
**Last updated:** [December 10, 2022, 8:52am UTC](https://root-forum.cern.ch/t/etaphivector/52701 "2022-12-10T08:52:23Z")

</div>

Hello ROOTers, How would i go about creating an EtaPhiVector with randomly generated eta and phi values? I am currently trying a simple random number generation for a specific range for each of my two coordinates, and t…

---

## [How to draw a Gaussian](https://root-forum.cern.ch/t/how-to-draw-a-gaussian/33715)

<div class="topic-metadata">

**Author:** [@IP25](https://root-forum.cern.ch/u/IP25)\
**Replies:** 4\
**Last updated:** [December 9, 2022, 11:40am UTC](https://root-forum.cern.ch/t/how-to-draw-a-gaussian/33715 "2022-12-09T11:40:27Z")

</div>

Hey everyone, I had a silly question. I have all the parameters for a gaussian distribution, the mean, the standard deviation as well as its the area under curve. I am trying to recreate the gaussian with my specific pa…

---

## [Is it possible to convert a function into a histogram?](https://root-forum.cern.ch/t/is-it-possible-to-convert-a-function-into-a-histogram/52698)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 4\
**Last updated:** [December 9, 2022, 8:57am UTC](https://root-forum.cern.ch/t/is-it-possible-to-convert-a-function-into-a-histogram/52698 "2022-12-09T08:57:05Z")

</div>

Hi, Using functions in root, I made a gaussian function as below: { TF1 \*f12 = new TF1(“f12”,“\[0\]exp(-0.5((x-\[1\])/\[2\])\*\*2)”,45,130); f12-\>SetFillColor(4); f12-\>SetParameter(0,10000); f12-\>SetParLimits(0,0,100000); …

---

## [TGraph Not Working, Returning Error Message: could not convert argument to buffer or nullptr](https://root-forum.cern.ch/t/tgraph-not-working-returning-error-message-could-not-convert-argument-to-buffer-or-nullptr/52635)

<div class="topic-metadata">

**Author:** [@RNugent](https://root-forum.cern.ch/u/RNugent)\
**Replies:** 3\
**Last updated:** [December 9, 2022, 12:37am UTC](https://root-forum.cern.ch/t/tgraph-not-working-returning-error-message-could-not-convert-argument-to-buffer-or-nullptr/52635 "2022-12-09T00:37:01Z")

</div>

Hi, I’m trying to make a simple graph and I keep encountering the error message (along with 11 others): “TypeError: could not convert argument 2 (could not convert argument to buffer or nullptr)”. I have my code below. I…

---

## [Three Column TextFile TH2D](https://root-forum.cern.ch/t/three-column-textfile-th2d/52691)

<div class="topic-metadata">

**Author:** [@Voldemort](https://root-forum.cern.ch/u/Voldemort)\
**Replies:** 1\
**Last updated:** [December 8, 2022, 4:37am UTC](https://root-forum.cern.ch/t/three-column-textfile-th2d/52691 "2022-12-08T04:37:59Z")

</div>

Hi there, I’ve got a txtfile that holds 3 columns of data. Column1 would be the x-axis (date), column2 is y-axis(sensor #) and column3 is the temp. I would like to make a 2D plot where the Temperature readings are plott…

---

## [How to set a cumulative histogram's y-axis to a percentage scale instead of the number of bins](https://root-forum.cern.ch/t/how-to-set-a-cumulative-histograms-y-axis-to-a-percentage-scale-instead-of-the-number-of-bins/52697)

<div class="topic-metadata">

**Author:** [@edus1898](https://root-forum.cern.ch/u/edus1898)\
**Replies:** 1\
**Last updated:** [December 8, 2022, 2:22pm UTC](https://root-forum.cern.ch/t/how-to-set-a-cumulative-histograms-y-axis-to-a-percentage-scale-instead-of-the-number-of-bins/52697 "2022-12-08T14:22:09Z")

</div>

My code is the following: { TCanvas \*c1 = new TCanvas(); h = new TH1D ("h", "Distanza Angolare; Distanza Angolare (deg); Conteggi; ", 100, 0, 5); fstream file; file.open("Dist\_Ang.txt", ios::in); double value; whil…

---

## [Is it possible to redine the axis and bins of a histogram copied using clone()?](https://root-forum.cern.ch/t/is-it-possible-to-redine-the-axis-and-bins-of-a-histogram-copied-using-clone/52695)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 4\
**Last updated:** [December 8, 2022, 1:23pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-redine-the-axis-and-bins-of-a-histogram-copied-using-clone/52695 "2022-12-08T13:23:32Z")

</div>

Hi, I want to open a histogram from a root file. For fitting the histogram properly I want to change the axis of the histogram, so for this I copy the histogram into a new histogram using clone() function, but unfortuna…

---

## [How to read array variable in a Tree](https://root-forum.cern.ch/t/how-to-read-array-variable-in-a-tree/52673)

<div class="topic-metadata">

**Author:** [@Stefano\_John](https://root-forum.cern.ch/u/Stefano_John)\
**Replies:** 15\
**Last updated:** [December 8, 2022, 7:33am UTC](https://root-forum.cern.ch/t/how-to-read-array-variable-in-a-tree/52673 "2022-12-08T07:33:48Z")

</div>

Hi again guys, I have a few, probably, naive questions related to my script. I’m trying to read a variable length array as a branch of a TTree (not mine). I do not understand how to get, for each entry of the related ro…

---

## [Is there any example of using ROOT::Math::Derivator?](https://root-forum.cern.ch/t/is-there-any-example-of-using-root-derivator/52689)

<div class="topic-metadata">

**Author:** [@anhle263](https://root-forum.cern.ch/u/anhle263)\
**Replies:** 2\
**Last updated:** [December 7, 2022, 7:27pm UTC](https://root-forum.cern.ch/t/is-there-any-example-of-using-root-derivator/52689 "2022-12-07T19:27:38Z")

</div>

Hello, I intend to use ROOT::Math::Derivator for computing numerical derivative of a function. Does ROOT provide any example of how to use the above class? Thank you very much.

---

## [Unable to draw histogram from a root file](https://root-forum.cern.ch/t/unable-to-draw-histogram-from-a-root-file/52687)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 2\
**Last updated:** [December 7, 2022, 4:30pm UTC](https://root-forum.cern.ch/t/unable-to-draw-histogram-from-a-root-file/52687 "2022-12-07T16:30:39Z")

</div>

Hi, I am unable to draw a 2D histrogram which is already inside a root file. I want to open this histrogram for fitting it. The following is my macro : void Gamma\_Constraint\_187() { // DEFINING CANVAS TCanvas \*c1 = ne…

---

## [Plotting from ttree with constrain](https://root-forum.cern.ch/t/plotting-from-ttree-with-constrain/52682)

<div class="topic-metadata">

**Author:** [@gini](https://root-forum.cern.ch/u/gini)\
**Replies:** 6\
**Last updated:** [December 7, 2022, 2:12pm UTC](https://root-forum.cern.ch/t/plotting-from-ttree-with-constrain/52682 "2022-12-07T14:12:22Z")

</div>

Hi, I want to plot a 2D histogram (TKE:M\_Tot) from a TTree with the constraint condition “Psd\_All\[i\]\>=1000 && Psd\_All\[i\]\<=2500”, where i =34 as Psd\_All is an array of size 34. The following is the small peice of code : …

---

## [Understanding Interesting Isolation Variable Plot](https://root-forum.cern.ch/t/understanding-interesting-isolation-variable-plot/52667)

<div class="topic-metadata">

**Author:** [@Thomas\_Warford](https://root-forum.cern.ch/u/Thomas_Warford)\
**Replies:** 1\
**Last updated:** [December 6, 2022, 7:04pm UTC](https://root-forum.cern.ch/t/understanding-interesting-isolation-variable-plot/52667 "2022-12-06T19:04:49Z")

</div>

Hi everyone, Me and my lab partner are doing an undergraduate lab using the 13 TeV ATLAS open dataset. We have been using the monte carlo data for the Higgs decaying into 2 photons (all 4 production processes combined)…

---

## [ROOT Function Plotter](https://root-forum.cern.ch/t/root-function-plotter/52659)

<div class="topic-metadata">

**Author:** [@Subhu18](https://root-forum.cern.ch/u/Subhu18)\
**Replies:** 4\
**Last updated:** [December 6, 2022, 12:50pm UTC](https://root-forum.cern.ch/t/root-function-plotter/52659 "2022-12-06T12:50:13Z")

</div>

Hey , Im plotting this sinc function(sin(x)/x) using TF1 class, when I plot it for the short range it gives me the accurate result (value 1 at x=0). but when I plot it for large range it gives me some strange plot, al…

---

## [Getting the original macro back in tutorials](https://root-forum.cern.ch/t/getting-the-original-macro-back-in-tutorials/52615)

<div class="topic-metadata">

**Author:** [@Subhu18](https://root-forum.cern.ch/u/Subhu18)\
**Replies:** 2\
**Last updated:** [December 5, 2022, 8:03am UTC](https://root-forum.cern.ch/t/getting-the-original-macro-back-in-tutorials/52615 "2022-12-05T08:03:23Z")

</div>

Hello, I was trying to run the readily available macros in the Tutorial directory in Root and I edited the code and made some changes and its not running , now I dont understand the code and dont know how to get that or…

---

## [Retrieve ArrayValue from a TTree](https://root-forum.cern.ch/t/retrieve-arrayvalue-from-a-ttree/52607)

<div class="topic-metadata">

**Author:** [@Stefano\_John](https://root-forum.cern.ch/u/Stefano_John)\
**Replies:** 4\
**Last updated:** [December 4, 2022, 11:02am UTC](https://root-forum.cern.ch/t/retrieve-arrayvalue-from-a-ttree/52607 "2022-12-04T11:02:54Z")

</div>

Hi to everyone, as always, I’m a beginner in ROOT. And it is still a bit complicated to understand how it works for me, since it’s also a quite huge framework. However, as the title of my topic expresses, I have a root …

---

## [How to store histograms in different folders in a root file?](https://root-forum.cern.ch/t/how-to-store-histograms-in-different-folders-in-a-root-file/52594)

<div class="topic-metadata">

**Author:** [@Divyang](https://root-forum.cern.ch/u/Divyang)\
**Replies:** 2\
**Last updated:** [December 2, 2022, 12:29pm UTC](https://root-forum.cern.ch/t/how-to-store-histograms-in-different-folders-in-a-root-file/52594 "2022-12-02T12:29:25Z")

</div>

Hello, I have a different set of histograms and I want to store them in separate folders. I am new to ROOT, so I don’t know how to do this. The following code is the pseudo-code for what I want to do. Please help me wi…

---

## [What's the right way to have an array inside the interactive shell?](https://root-forum.cern.ch/t/whats-the-right-way-to-have-an-array-inside-the-interactive-shell/52581)

<div class="topic-metadata">

**Author:** [@shu11](https://root-forum.cern.ch/u/shu11)\
**Replies:** 4\
**Last updated:** [December 1, 2022, 10:47pm UTC](https://root-forum.cern.ch/t/whats-the-right-way-to-have-an-array-inside-the-interactive-shell/52581 "2022-12-01T22:47:19Z")

</div>

Hi, Current ROOT version is 6.26/08. Just define an array like the following (doesn’t matter what types the array is, symptom is the same). root \[6\] uint8\_t bin\[\]={1,0,0,1,0,0,0,0,1,1,0}; root \[7\] bin\[0\] (unsigned ch…

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

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