Problem when using compiled TTree Class

Dear all!

I am trying to compile a programm, which creates a TChain from several (~450) TTree-files and then loops over them, using the Loop-function from the automatically created Class (TTree::MakeClass(“MyClass.C”). In the loop I am also using a set of functions, defined in another file.

I am succeeding in compiling everything (please ignore warnings), however, when I am trying to use the compiled program, it crashes immediately with segfault - presumably when it checks for the classes used in the programm, it doesn’t process anything (if I comment out the instantiation of the TTree::MyClass it works fine). The ntuple I want to use contains only standard floats and double (however, as mentioned, the programm doesn’t even try to access these). Nobody here has a clue of what could cause the problem.

I attach the code (with the programm cleared of all ntuples accept one and the loop being empty). Find the Makefile attached in the next post.

Thanks a lot in advance!
v1204_SinglePions_test.C (1.11 KB)
v1204_SinglePions_test.h (87.7 KB)
MakeChain_test.C (525 Bytes)

here is the makefile
Makefile_test.txt (1.82 KB)

in case anybody was wondering…

I am using version
Version 5.12/00e


I can not build you example (missing functions_hadcalib_test.o) and I would not be able to run it (missing data file). Could make available a complete example?


Here are the missing files…

The data file is a bit to big, I guess (that’s why I was reluctant to send it in the first place and unfortunately I can’t redo it with less events), so please follow this link: … .pool.root
functions_hadcalib.h (1.82 KB)
functions_hadcalib.C (13.4 KB)

The problem is the class created by MakeClass in your case is too large to be build on the stack (look at the size and number of array) So replace v1204_SinglePions a(mytree);by v1204_SinglePions *a = new v1204_SinglePions(mytree);Alternatively, you could try MakeProxy instead of MakeClass.


That solved it - thanks a lot!!!