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:
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:
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:
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:
/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++