TTree symbol lost in interactive session


_ROOT Version: 6.14.04
_Platform: macOS High Sierra
Compiler: Not Provided


Hi,
I’m having a problem since moving to ROOT6 from 5.34 with interactive sessions access a TTree in files. I can access my TTree fine when just accessing simple variables in branches, but once I use a function in my TTree (which executes fine), subsequent commands to Draw from the tree return this error (‘teb’ is the TTree in my files):

IncrementalExecutor::executeFunction: symbol ‘teb’ unresolved while linking [cling interface function]!

I never had any problems with the same code in v5.34, and if I access functions in macros, the tree remains accessible afterwards. I’d appreciate any help!!

Thanks, Heather

You need to show what you actually do (how you open the root file, retrieve the tree and then some commands which work and some which don’t).

Sorry, here is an example of what I do:

$ root -l

Loaded: libGRETINA.dylib, and libS800.dylib

root [0] TFile *f = new TFile("~/gretina-unpack/SimulationMod.root")

(TFile *) 0x7fd879407ca0

root [1] teb->Draw( "g2.cc" )

Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1

root [2] teb->Draw("g2.xtals.maxIntPtX()")

root [3] teb->Draw ("g2.cc" )

IncrementalExecutor::executeFunction: symbol 'teb' unresolved while linking [cling interface function]!

Lines [1] and [2] generated the expected histrograms, no problem. But as soon as I call any function in the tree (as in [2], all subsequent commands show the error.

Thanks!

Try:

TFile *f = TFile::Open("~/gretina-unpack/SimulationMod.root");
TTree *teb; f->GetObject("teb", teb);
// teb->Draw(...)

Thank you! That works. Though I’m not sure I understand exactly why I’m getting the behavior I see, and only with ROOT6. But this works.

Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.