Issue with TTree.h 's SetBranchStatus function?


I am working for my Master thesis on AliRoot, an extension of Root adapted to the geometry of the ALICE experiment at CERN’s LHC.

I wish to analyze, with a home-made macro called PlotEventNEW.C, a couple of *.root files, which are possibly too big (160 Mb).

This macro calls, among others, for the following libraries from Root : TTree.h, TChain.h, and TBranch.h.

So I get the following segment violation error :

root [0] .x CompilePlot.C("PlotEventNEW.C")
root [1] PlotEvent(3)                      
Error in <TTree::SetBranchStatus>: unknown branch -> ESD

 *** Break *** segmentation violation
Attaching to program: /proc/28235/exe, process 28235
[Thread debugging using libthread_db enabled]
[New Thread 0x2ab5d6802f10 (LWP 28235)]
0x00002ab5d5873b65 in waitpid () from /lib/
#1  0x00002ab5d5813e21 in ?? () from /lib/
#2  0x00002ab5ce34b729 in TUnixSystem::StackTrace () from /usr/lib/root/
#3  0x00002ab5ce34a637 in TUnixSystem::DispatchSignals () from /usr/lib/root/
#4  <signal handler called>
#5  0x00002ab5ce3129a0 in TObjArray::GetAbsLast () from /usr/lib/root/
#6  0x00002ab5d8ac18f3 in PlotEvent () from /home/hehi/lussange/may08/new130/./
#7  0x00002ab5d8ac218b in G__file72Idla__0_1144 () from /home/hehi/lussange/may08/new130/./
#8  0x00002ab5ceab24eb in Cint::G__ExceptionWrapper () from /usr/lib/root/
#9  0x00002ab5ceb5e45c in G__execute_call () from /usr/lib/root/
#10 0x00002ab5ceb5f240 in G__call_cppfunc () from /usr/lib/root/
#11 0x00002ab5ceb37c9a in G__interpret_func () from /usr/lib/root/
#12 0x00002ab5ceb28459 in G__getfunction () from /usr/lib/root/
#13 0x00002ab5ceafcf1b in G__getitem () from /usr/lib/root/
#14 0x00002ab5ceb040b6 in G__getexpr () from /usr/lib/root/
#15 0x00002ab5ceb8cce6 in G__exec_statement () from /usr/lib/root/
#16 0x00002ab5ceae9e26 in ?? () from /usr/lib/root/
#17 0x00002ab5ceaea0ce in G__exec_tempfile_fp () from /usr/lib/root/
#18 0x00002ab5ceb92808 in G__process_cmd () from /usr/lib/root/
#19 0x00002ab5ce322dbf in TCint::ProcessLine () from /usr/lib/root/
#20 0x00002ab5ce28b2f7 in TApplication::ProcessLine () from /usr/lib/root/
#21 0x00002ab5d0e4e0c3 in TRint::HandleTermInput () from /usr/lib/root/
#22 0x00002ab5d0e4c9a7 in TTermInputHandler::Notify () from /usr/lib/root/
#23 0x00002ab5d0e4e8dd in TTermInputHandler::ReadNotify () from /usr/lib/root/
#24 0x00002ab5ce34aad3 in TUnixSystem::CheckDescriptors () from /usr/lib/root/
#25 0x00002ab5ce34af66 in TUnixSystem::DispatchOneEvent () from /usr/lib/root/
#26 0x00002ab5ce2df8b6 in TSystem::InnerLoop () from /usr/lib/root/
#27 0x00002ab5ce2e2184 in TSystem::Run () from /usr/lib/root/
#28 0x00002ab5ce28a0af in TApplication::Run () from /usr/lib/root/
#29 0x00002ab5d0e4e4da in TRint::Run () from /usr/lib/root/
#30 0x000000000040182a in main (argc=1, argv=0x7ffff0e5a488) at ALIROOT/aliroot.cxx:85
The program is running.  Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/28235/exe, process 28235
Root > .q

So it seems the problem comes from that TTree’s function called SetBranchStatus (but this function is also used in the pre-called TChain and TBranch libraries) which cannot take into account ESD branches beyond 128.

Any ideas ?

Thanks a lot !


Error in <TTree::SetBranchStatus>: unknown branch -> ESD This indicates that the object (TTree or TChain) you called SetBranchStatus on does not have a branch named ESD.


Yes but this very same home-made macro that I used and led to this error here, worked just fine when applied to other smaller-sized *.root files.

That is why I expected that there must be a limit in the SetBranchStatus function of the TTree library of branches going up max to 128.

Perhaps some ideas on how to circumvent that ?

Thanks a lot

[quote]That is why I expected that there must be a limit in the SetBranchStatus function of the TTree library of branches going up max to 128. [/quote]I am not aware of such a limit. Can you please provide an example reproducing your problem?


Ps [quote]Perhaps some ideas on how to circumvent that ? [/quote]Maybe … But well :slight_smile: I don’t know yet what ‘that’ is :slight_smile: