Compiling App with Trees


I’m writing a program and I want to use Root to create a Tree.

I made a class called EventData and I want to store Objects of EventData in an Branch. In the documentation (page 196) is an example how to do this. The problem is, that every example I found handling branches with the C++ interpreter, but I want to compile my programm with gcc and run it.

So the first question is, if this is generally possible, to use branches holding user defind objects in compiled projects?

I create my Branch like this:

[code]//create a new ROOT Tree
TTree* tree = new TTree(“T”, “test input”);

EventData* event = new EventData();

tree->Branch("Event Info", "EventData", &event, 32000, 0);[/code]

The Message I got is:
Error in TTree::Bronch: Cannot find class:EventData

The implementation of EventData is compiled into a shared library and linked successfully. I read something about dictionary but every example is for using CINT, what I don’t want.

I hope someone can give me any basic informations what I have to do or what I have to search for, to find a solution.

Thanks a lot and have a nice day.


Ditto same problem here… Any suggestions? I want to avoid the interpreter as well and use the compiler…


This particular forum is to announce working application that you may want to shared with the community. Please post question in the appropriate support forum.


PS. You are missing the dictionary for EventData, see the FAQ on how to generate a dictionary or the User’s Guide.

Oh, sry for using the wrong forum. I create the thread in the right forum, so this one can be delete.