# \#tree

**URL:** https://root-forum.cern.ch/tag/tree/5.md

[Latest](https://root-forum.cern.ch/latest.md) · [Categories](https://root-forum.cern.ch/categories.md) · [Tags](https://root-forum.cern.ch/tags.md)

---

## [Multiple loop indices in TTree::Draw()?](https://root-forum.cern.ch/t/multiple-loop-indices-in-ttree-draw/65073)

<div class="topic-metadata">

**Author:** [@treesaregood](https://root-forum.cern.ch/u/treesaregood)\
**Replies:** 1\
**Last updated:** [November 27, 2026, 12:17pm UTC](https://root-forum.cern.ch/t/multiple-loop-indices-in-ttree-draw/65073 "2026-11-27T12:17:18Z")

</div>

ROOT Version: 6.40.04 Platform: linuxx8664gcc Compiler: gcc Hi, Would it be possible to expose multiple independent loop indices in TTree::Draw(), to plot coincidences between hits in variable-length arrays from th…

---

## [Replacing TTree I/O Traversal with Arithmetic: A Coordinate-Indexed Read Path for CMS Open Data](https://root-forum.cern.ch/t/replacing-ttree-i-o-traversal-with-arithmetic-a-coordinate-indexed-read-path-for-cms-open-data/64971)

<div class="topic-metadata">

**Author:** [@metasmile](https://root-forum.cern.ch/u/metasmile)\
**Replies:** 8\
**Last updated:** [August 21, 2026, 10:03am UTC](https://root-forum.cern.ch/t/replacing-ttree-i-o-traversal-with-arithmetic-a-coordinate-indexed-read-path-for-cms-open-data/64971 "2026-08-21T10:03:44Z")

</div>

The SSCCS Foundation is a non-profit organization developing open-source infrastructure to lower the barriers to scientific computing. One of our foundational projects, synTagma, is a coordinate engine that maps multidi…

---

## [Share RNTupleReader field addresses across multiple files](https://root-forum.cern.ch/t/share-rntuplereader-field-addresses-across-multiple-files/64927)

<div class="topic-metadata">

**Author:** [@tomeichlersmith](https://root-forum.cern.ch/u/tomeichlersmith)\
**Replies:** 6\
**Last updated:** [July 3, 2026, 3:22pm UTC](https://root-forum.cern.ch/t/share-rntuplereader-field-addresses-across-multiple-files/64927 "2026-07-03T15:22:22Z")

</div>

I am interested in sharing the field addresses (std::shared\_ptr\<T\>) used by RNTupleReader across multiple instances of RNTupleReader. This would enable the framework I’m developing to read multiple files in sequence with…

---

## [Ignore fields when reading an RNTuple](https://root-forum.cern.ch/t/ignore-fields-when-reading-an-rntuple/64916)

<div class="topic-metadata">

**Author:** [@tomeichlersmith](https://root-forum.cern.ch/u/tomeichlersmith)\
**Replies:** 4\
**Last updated:** [June 25, 2026, 9:06pm UTC](https://root-forum.cern.ch/t/ignore-fields-when-reading-an-rntuple/64916 "2026-06-25T21:06:04Z")

</div>

I am trying to ignore (i.e. don’t bother loading the data into memory) specific fields of an RNTuple when reading a file. I can do this if I already know the type of all the fields I want by creating my own RNTupleModel …

---

## [TChain::Add(TChain\*) leaves GetEntries() reporting a wrong, too-small value](https://root-forum.cern.ch/t/tchain-add-tchain-leaves-getentries-reporting-a-wrong-too-small-value/64904)

<div class="topic-metadata">

**Author:** [@avenkate](https://root-forum.cern.ch/u/avenkate)\
**Replies:** 5\
**Last updated:** [June 19, 2026, 9:33pm UTC](https://root-forum.cern.ch/t/tchain-add-tchain-leaves-getentries-reporting-a-wrong-too-small-value/64904 "2026-06-19T21:33:34Z")

</div>

When I merge several TChains into one with chain-\>Add(otherChain), the resulting chain contains all the files (GetListOfFiles()-\>GetEntries() is correct) and all the entries are reachable (a LoadTree(i) walk and CopyTre…

---

## [Setting kEntriesReshuffled when using RDatasetSpec](https://root-forum.cern.ch/t/setting-kentriesreshuffled-when-using-rdatasetspec/64735)

<div class="topic-metadata">

**Author:** [@jamie.gooding](https://root-forum.cern.ch/u/jamie.gooding)\
**Replies:** 7\
**Last updated:** [March 11, 2026, 2:47pm UTC](https://root-forum.cern.ch/t/setting-kentriesreshuffled-when-using-rdatasetspec/64735 "2026-03-11T14:47:20Z")

</div>

Hi all, I’m trying to use RDatasetSpec to create an RDataFrame from a main tree and a friend tree in PyROOT. Since I’m passing the RDF between different python classes/functions, this seems to be the only way to do thi…

---

## [Filtering branches from a large root file fails in 6.32](https://root-forum.cern.ch/t/filtering-branches-from-a-large-root-file-fails-in-6-32/64723)

<div class="topic-metadata">

**Author:** [@Heidi\_M\_Schellman](https://root-forum.cern.ch/u/Heidi_M_Schellman)\
**Replies:** 4\
**Last updated:** [March 3, 2026, 7:10pm UTC](https://root-forum.cern.ch/t/filtering-branches-from-a-large-root-file-fails-in-6-32/64723 "2026-03-03T19:10:22Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.32.10 Platform: OSX Compiler: 16.4 (apple silicon) I am trying to filter branches from a large file as part of our open data pr…

---

## [C++ macro to write Branch() for each variable in class](https://root-forum.cern.ch/t/c-macro-to-write-branch-for-each-variable-in-class/64623)

<div class="topic-metadata">

**Author:** [@Divyang](https://root-forum.cern.ch/u/Divyang)\
**Replies:** 5\
**Last updated:** [February 2, 2026, 6:10pm UTC](https://root-forum.cern.ch/t/c-macro-to-write-branch-for-each-variable-in-class/64623 "2026-02-02T18:10:44Z")

</div>

ROOT Version: 6.24/08 Platform: Ubuntu 20.04.6 LTS x86\_64 Compiler: linuxx8664gcc Hello everyone, To create a tree of variables, I am defining a class with all the variable names. Here is the pseudocode: class Tree…

---

## [Problems in PyROOT and calling in ROOT functions](https://root-forum.cern.ch/t/problems-in-pyroot-and-calling-in-root-functions/64581)

<div class="topic-metadata">

**Author:** [@Karthi5672001](https://root-forum.cern.ch/u/Karthi5672001)\
**Replies:** 1\
**Last updated:** [January 12, 2026, 12:06am UTC](https://root-forum.cern.ch/t/problems-in-pyroot-and-calling-in-root-functions/64581 "2026-01-12T00:06:58Z")

</div>

Please read tips for efficient and successful posting and posting code Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from th…

---

## [Catching forgetting to bind the variable to the TTree early on](https://root-forum.cern.ch/t/catching-forgetting-to-bind-the-variable-to-the-ttree-early-on/64573)

<div class="topic-metadata">

**Author:** [@FoxWise](https://root-forum.cern.ch/u/FoxWise)\
**Replies:** 4\
**Last updated:** [January 7, 2026, 9:49pm UTC](https://root-forum.cern.ch/t/catching-forgetting-to-bind-the-variable-to-the-ttree-early-on/64573 "2026-01-07T21:49:24Z")

</div>

Hi all, Consider the following code: // test.cpp void test(){ int var1 = 1; int var2 = 2; int var3 = 3; // there is a lot of variables to compute auto file = std::make\_unique\<TFile\>("results.ro…

---

## [Feeding TMVA with TTrees for signal and backgrounds](https://root-forum.cern.ch/t/feeding-tmva-with-ttrees-for-signal-and-backgrounds/64537)

<div class="topic-metadata">

**Author:** [@ammelsayed](https://root-forum.cern.ch/u/ammelsayed)\
**Replies:** 2\
**Last updated:** [December 15, 2025, 11:02am UTC](https://root-forum.cern.ch/t/feeding-tmva-with-ttrees-for-signal-and-backgrounds/64537 "2025-12-15T11:02:08Z")

</div>

Dear experts, I’m using multiple root files for signal and background samples generated by Delphes. I read the files once for each process, create a corresponding TTree object, and store the variables data of interest i…

---

## [Vector of vectors in TTree vs. RNTuple](https://root-forum.cern.ch/t/vector-of-vectors-in-ttree-vs-rntuple/64416)

<div class="topic-metadata">

**Author:** [@Evander137](https://root-forum.cern.ch/u/Evander137)\
**Replies:** 2\
**Last updated:** [November 19, 2025, 8:09am UTC](https://root-forum.cern.ch/t/vector-of-vectors-in-ttree-vs-rntuple/64416 "2025-11-19T08:09:56Z")

</div>

When I try to set a branch of a vector of vector of floats in a TTree, with the following script, I get an error: void test() { // gInterpreter-\>GenerateDictionary("vector\<vector\<float\> \>","vector"); TFile \* f1…

---

## [Creating a TTree with a per-entry integer in Python](https://root-forum.cern.ch/t/creating-a-ttree-with-a-per-entry-integer-in-python/64385)

<div class="topic-metadata">

**Author:** [@yus](https://root-forum.cern.ch/u/yus)\
**Replies:** 1\
**Last updated:** [November 7, 2025, 10:06am UTC](https://root-forum.cern.ch/t/creating-a-ttree-with-a-per-entry-integer-in-python/64385 "2025-11-07T10:06:48Z")

</div>

Hi, I’m trying to fill a TTree containing one integer per entry. For example, if the entries in my TTree are events, then what I want to have is an integer with the event number. It’s exactly one integer per entry (as o…

---

## [Quiet writing failure when applying schema evolution while slow cloning](https://root-forum.cern.ch/t/quiet-writing-failure-when-applying-schema-evolution-while-slow-cloning/64350)

<div class="topic-metadata">

**Author:** [@tomeichlersmith](https://root-forum.cern.ch/u/tomeichlersmith)\
**Replies:** 10\
**Last updated:** [October 31, 2025, 6:22pm UTC](https://root-forum.cern.ch/t/quiet-writing-failure-when-applying-schema-evolution-while-slow-cloning/64350 "2025-10-31T18:22:12Z")

</div>

ROOT Version: 6.34.04 Platform: linuxx8664gcc Compiler: GCC 13.3.0 Specifically, I am using the container image ldmx/pro:v4.4.0 on DockerHub. ▶ Boilerplate Intro Copied from Previous Post The source code for this ex…

---

## [Problem with entering a character string into a ROOT Tree](https://root-forum.cern.ch/t/problem-with-entering-a-character-string-into-a-root-tree/64342)

<div class="topic-metadata">

**Author:** [@Nick\_van\_Eijndhoven](https://root-forum.cern.ch/u/Nick_van_Eijndhoven)\
**Replies:** 2\
**Last updated:** [October 21, 2025, 5:10pm UTC](https://root-forum.cern.ch/t/problem-with-entering-a-character-string-into-a-root-tree/64342 "2025-10-21T17:10:54Z")

</div>

Please read tips for efficient and successful posting and posting code Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from th…

---

## [Schema Evolution: Renaming a \`std::map\` Member Variable](https://root-forum.cern.ch/t/schema-evolution-renaming-a-std-map-member-variable/64310)

<div class="topic-metadata">

**Author:** [@tomeichlersmith](https://root-forum.cern.ch/u/tomeichlersmith)\
**Replies:** 4\
**Last updated:** [October 21, 2025, 7:26am UTC](https://root-forum.cern.ch/t/schema-evolution-renaming-a-std-map-member-variable/64310 "2025-10-21T07:26:45Z")

</div>

ROOT Version: 6.34.04 Platform: linuxx8664gcc Compiler: GCC 13.3.0 Specifically, I am using the container image ldmx/pro:v4.4.0 on DockerHub. Look there for all the messy details. I am working in a project where we…

---

## [Delphes root files and RDataFrame](https://root-forum.cern.ch/t/delphes-root-files-and-rdataframe/64329)

<div class="topic-metadata">

**Author:** [@ammelsayed](https://root-forum.cern.ch/u/ammelsayed)\
**Replies:** 7\
**Last updated:** [October 20, 2025, 6:14am UTC](https://root-forum.cern.ch/t/delphes-root-files-and-rdataframe/64329 "2025-10-20T06:14:03Z")

</div>

Hi, I’m trying to preform some analysis cuts using RDataFrame from root files generated by Delphes. But I seem to encounter a problem with reading particles data from arrays. As i understand, in a delphes file, an even…

---

## [How i can take two histograms from root-file and make its in one picture?](https://root-forum.cern.ch/t/how-i-can-take-two-histograms-from-root-file-and-make-its-in-one-picture/64325)

<div class="topic-metadata">

**Author:** [@andkon](https://root-forum.cern.ch/u/andkon)\
**Replies:** 15\
**Last updated:** [October 17, 2025, 1:16pm UTC](https://root-forum.cern.ch/t/how-i-can-take-two-histograms-from-root-file-and-make-its-in-one-picture/64325 "2025-10-17T13:16:43Z")

</div>

Hello, dear All! I have a problem: How i can take two histograms from root-file and make its in one picture? it is my code: void itog\_allGuass() { // Float\_t PMT2; Int\_t PMT2; TFile\* file1 = TFile::Open("351mm\_…

---

## [Reading leaf of fixed-size array from TTree using TTreeReader](https://root-forum.cern.ch/t/reading-leaf-of-fixed-size-array-from-ttree-using-ttreereader/64300)

<div class="topic-metadata">

**Author:** [@jaofferm](https://root-forum.cern.ch/u/jaofferm)\
**Replies:** 2\
**Last updated:** [October 16, 2025, 3:24pm UTC](https://root-forum.cern.ch/t/reading-leaf-of-fixed-size-array-from-ttree-using-ttreereader/64300 "2025-10-16T15:24:09Z")

</div>

ROOT Version: 6.36.04 Platform: macosxarm64 Compiler: Not Provided Hi ROOTers! I have a relatively basic question about reading a branch from a TTree, which might be a bit of a rehash of some older questions about …

---

## [How to show branch/ histogram entries from the command line](https://root-forum.cern.ch/t/how-to-show-branch-histogram-entries-from-the-command-line/64295)

<div class="topic-metadata">

**Author:** [@4lplusMatt](https://root-forum.cern.ch/u/4lplusMatt)\
**Replies:** 6\
**Last updated:** [October 13, 2025, 10:16am UTC](https://root-forum.cern.ch/t/how-to-show-branch-histogram-entries-from-the-command-line/64295 "2025-10-13T10:16:56Z")

</div>

Is there any command line tool to get the entries that show in a branch’s histogram? I want to get the ‘Entries’ shown when viewing the histogram for a branch in TBrowser, e.g. the number circled here for the \`llll\_tlv\_…

---

## [Multithread RDataFrame.Snapshot with big files and lots of columns](https://root-forum.cern.ch/t/multithread-rdataframe-snapshot-with-big-files-and-lots-of-columns/64155)

<div class="topic-metadata">

**Author:** [@martialc](https://root-forum.cern.ch/u/martialc)\
**Replies:** 11\
**Last updated:** [October 10, 2025, 9:05am UTC](https://root-forum.cern.ch/t/multithread-rdataframe-snapshot-with-big-files-and-lots-of-columns/64155 "2025-10-10T09:05:23Z")

</div>

ROOT Version: 6.32.11 Python Version: 3.9.14 Platform: AlmaLinux 9 (el9\_amd64\_gcc12) Compiler: g++ (GCC) 12.3.1 20230527 Hi, all! I’ve happened to stumble upon a strange error while saving large RDataFrames to dis…

---

## [String to TString](https://root-forum.cern.ch/t/string-to-tstring/64193)

<div class="topic-metadata">

**Author:** [@yordanov](https://root-forum.cern.ch/u/yordanov)\
**Replies:** 5\
**Last updated:** [September 22, 2025, 7:01pm UTC](https://root-forum.cern.ch/t/string-to-tstring/64193 "2025-09-22T19:01:21Z")

</div>

Hello, I need to copy a string into a TString. Something like: string line=“aaa”; TString name; name=line; However, the last line is not valid. name.Data()=line does not work either. What would be the correct syntax…

---

## [Increase accuracy of leaves when using RDataFrame.Mean](https://root-forum.cern.ch/t/increase-accuracy-of-leaves-when-using-rdataframe-mean/64130)

<div class="topic-metadata">

**Author:** [@ynikitenko](https://root-forum.cern.ch/u/ynikitenko)\
**Replies:** 6\
**Last updated:** [September 15, 2025, 5:06pm UTC](https://root-forum.cern.ch/t/increase-accuracy-of-leaves-when-using-rdataframe-mean/64130 "2025-09-15T17:06:01Z")

</div>

Dear ROOT-ers, I’m reading a ROOT tree with Float\_t leaves. I use RDataFrame for that: dr\_th\_no\_cut = df.Mean\["double"\]("displacement.dr\_proj\_th\_cm") My idea is that I don’t need large precision for each leaf, thus sa…

---

## [Update TTreeReader addresses failed, for a TTree in a TMemFile, read from TSocket](https://root-forum.cern.ch/t/update-ttreereader-addresses-failed-for-a-ttree-in-a-tmemfile-read-from-tsocket/64145)

<div class="topic-metadata">

**Author:** [@gib](https://root-forum.cern.ch/u/gib)\
**Replies:** 1\
**Last updated:** [September 15, 2025, 3:12pm UTC](https://root-forum.cern.ch/t/update-ttreereader-addresses-failed-for-a-ttree-in-a-tmemfile-read-from-tsocket/64145 "2025-09-15T15:12:30Z")

</div>

Dear Rooters, I have be updating “old” analysis codes (worked with ROOT 5.\*) to be compatibles with ROOT 6. I especially updated from the SetBranchAddress approach to TTreeReader for TTree. It essentially works, in pa…

---

## [Adding friend to TChain created from file saved using RDataFrame with EnableImplicitMT](https://root-forum.cern.ch/t/adding-friend-to-tchain-created-from-file-saved-using-rdataframe-with-enableimplicitmt/63952)

<div class="topic-metadata">

**Author:** [@lidia](https://root-forum.cern.ch/u/lidia)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 11:58am UTC](https://root-forum.cern.ch/t/adding-friend-to-tchain-created-from-file-saved-using-rdataframe-with-enableimplicitmt/63952 "2025-07-30T11:58:58Z")

</div>

Dear ROOT experts, I am trying to add to a TChain a friend TTree, then pass this to a RDataFrame where I want to have access to the branches of both objects. The TChain contains two TTrees from two root files created …

---

## [How to create sub-sub branch manually](https://root-forum.cern.ch/t/how-to-create-sub-sub-branch-manually/63779)

<div class="topic-metadata">

**Author:** [@yashnator](https://root-forum.cern.ch/u/yashnator)\
**Replies:** 4\
**Last updated:** [July 9, 2025, 12:43pm UTC](https://root-forum.cern.ch/t/how-to-create-sub-sub-branch-manually/63779 "2025-07-09T12:43:29Z")

</div>

Please read tips for efficient and successful posting and posting code ROOT Version: 6.36.000 Platform: MacOS 26 Compiler: clang Hi, I was developing the ROOTIO.jl package, which is a Julia interface for ROOT. We …

---

## [Reading old tree returns error](https://root-forum.cern.ch/t/reading-old-tree-returns-error/63686)

<div class="topic-metadata">

**Author:** [@gib](https://root-forum.cern.ch/u/gib)\
**Replies:** 10\
**Last updated:** [June 18, 2025, 2:31pm UTC](https://root-forum.cern.ch/t/reading-old-tree-returns-error/63686 "2025-06-18T14:31:43Z")

</div>

Dear rooters, I am trying to analyze an old TTree (the root file was produced with ROOT version 5.32, I guess the TTree also) using ROOT version 6.32.10 Describe the bug I have the following error (even if I simply do …

---

## [Use TTree::Draw() to a histogram with weights and weight errors coming from branches](https://root-forum.cern.ch/t/use-ttree-draw-to-a-histogram-with-weights-and-weight-errors-coming-from-branches/63556)

<div class="topic-metadata">

**Author:** [@FVazquez](https://root-forum.cern.ch/u/FVazquez)\
**Replies:** 2\
**Last updated:** [May 16, 2025, 4:09pm UTC](https://root-forum.cern.ch/t/use-ttree-draw-to-a-histogram-with-weights-and-weight-errors-coming-from-branches/63556 "2025-05-16T16:09:36Z")

</div>

Hi all, I have a TTree with a few branches output by simulation code, with each entry representing one MC event. One of the branches is the weight W of the event, and another is the quadratic error WE of the event. Plo…

---

## [TTree split level and custom classes for SetBranchAddress](https://root-forum.cern.ch/t/ttree-split-level-and-custom-classes-for-setbranchaddress/63498)

<div class="topic-metadata">

**Author:** [@FVazquez](https://root-forum.cern.ch/u/FVazquez)\
**Replies:** 21\
**Last updated:** [May 13, 2025, 7:50pm UTC](https://root-forum.cern.ch/t/ttree-split-level-and-custom-classes-for-setbranchaddress/63498 "2025-05-13T19:50:28Z")

</div>

ROOT Version: 6.32 Hi all, I am a bit confused about how split branches work with SetBranchAddress when using custom classes, and I struggle to find answers. Let’s say I have the following two object definitions: str…

---

## [Would it be a meaningful idea to add a description to TBranches?](https://root-forum.cern.ch/t/would-it-be-a-meaningful-idea-to-add-a-description-to-tbranches/63482)

<div class="topic-metadata">

**Author:** [@sfrances](https://root-forum.cern.ch/u/sfrances)\
**Replies:** 2\
**Last updated:** [May 4, 2025, 11:14pm UTC](https://root-forum.cern.ch/t/would-it-be-a-meaningful-idea-to-add-a-description-to-tbranches/63482 "2025-05-04T23:14:17Z")

</div>

Often users, when opening a TTree, can struggle understanding its content. Would it be meaningful/interesting/doable to add an optional text description to a TBranch? I know that probably this is not really a ROOT’s dut…

[Next page](https://root-forum.cern.ch/tag/tree/5.md?match_all_tags=true&page=1&tags%5B%5D=tree)
