# TTree problems with branching I guess

**URL:** <https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311>\
**Category:** Newbie\
**Created:** [November 25, 2024, 10:17am UTC](https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311 "2024-11-25T10:17:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eduarddlin](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eduarddlin/32/38026_2.png) [@eduarddlin](https://root-forum.cern.ch/u/eduarddlin)\
**Post date:** [November 25, 2024, 10:17am UTC](https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311/1 "2024-11-25T10:17:44Z")

</div>

Hello everyone!  
I am trying to to copy a TTree and do some analysis with it.  
TTree is created by converting .dat data. It is separated into branches as so:

```auto
  t->Branch("px",px,"px[n]/F");
  t->Branch("py",py,"py[n]/F");
  t->Branch("pz",pz,"pz[n]/F");

```

where n is just a large number defined in code.  
It is created correctly if viewed from TBrowser. A normal TTree with correct branches and so on.  
When then I try to read this Tree in a different program:

```auto
    TFile *f = new TFile("data.root");
    TTree *t1 = (TTree*)f->Get("TreeFile");
    t1->SetBranchAddress("px",&px);
    t1->SetBranchAddress("py",&py);
    t1->SetBranchAddress("pz",&pz);

```

where data.root is my TTree file i created.  
I get a couple of warnings:

```auto
In module 'Tree':

**/root_v6.32.06/include/TTree.h:597:29:**  **warning:** **inline function 'TTree::SetBranchAddress<float>' is not defined [-Wundefined-inline]**
template <class T> Int_t SetBranchAddress(const char *bname, T *add, TBranch **ptr = nullptr) {

```

And then code crushes printing:

```auto
/path/to/code **note:** used here
[runStaticInitializersOnce]: Failed to materialize symbols:
--"a lot of different symbols"--
[runStaticInitializersOnce]: Failed to materialize symbols: { (main, { ____ orc_init_func.cling-module-100 }) }
cling JIT session error: Failed to materialize symbols: { (main, { __Z14"nameofcode"v }) }

```

I am not sure if this mistakes is related with previous warnings, but it occurred only now.  
Root is downloaded and assembled from pre-compiled binary distribution from the official website.  
Would be glad for any tips!  
_ROOT Version:_ root\_v6.32.06  
_Platform:_ macOS 14.6.1  
_Compiler:_ clang++

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 25, 2024, 4:16pm UTC](https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311/2 "2024-11-25T16:16:25Z")

</div>

Hi Eduard,

Welcome to the ROOT community!  
Sorry to read things did not work out of the box for you.  
I think there is a problem with the installation: do you manage to run ROOT and do something with it?

Cheers,  
Danilo

---

<div class="post-metadata">

**Author:** ![eduarddlin](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eduarddlin/32/38026_2.png) [@eduarddlin](https://root-forum.cern.ch/u/eduarddlin)\
**Post date:** [November 25, 2024, 5:50pm UTC](https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311/3 "2024-11-25T17:50:45Z")

</div>

Hi Danilo!

Thank you for your answer! Root was successfully working for last couple of weeks - same version and platform. Also some other root programs do run on it without any problems.

Dlin E.

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 26, 2024, 10:08am UTC](https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311/4 "2024-11-26T10:08:50Z")

</div>

Hello,

What is the minimal running reproducer that triggers the bug in an otherwise fully working ROOT installation?

Best,  
D

---

<div class="post-metadata">

**Author:** ![eduarddlin](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eduarddlin/32/38026_2.png) [@eduarddlin](https://root-forum.cern.ch/u/eduarddlin)\
**Post date:** [November 26, 2024, 1:36pm UTC](https://root-forum.cern.ch/t/ttree-problems-with-branching-i-guess/62311/5 "2024-11-26T13:36:30Z")

</div>

Hello,

i checked for a while and the line that gives that kind of an error is:

```auto
ios_base::sync_with_stdio(false);

```

which should just work as a command to the compiler to not synchronize the standard C++ streams to C streams.  
If I try to delete it the compiler answer changes to:

```auto

IncrementalExecutor::executeFunction: symbol '_ZNSt3 __16__ math3sinB8ne180100Ef' unresolved while linking [cling interface function]!

You are probably missing the definition of std:: __1::__ math::sin[abi:ne180100](float)

Maybe you need to load the corresponding shared library?

```

Which seems like a different kind of a mistake.  
Thank you,  
Dlin E
