TTree: Branch( ... )

Hi there,

I am fairly new at using Root so I apologize is this question is too simple:

I would really like to implement a self-made class in the Branch of a TTree. But when I give the following command:

calorTree->Branch(“CellStruct”, “CalorTest”, &ct);

with “CalorTest” being my self-made class. Then I get “Error in TTree::Bronch: Cannot find class:CalorTest”

while CalorTest is clearly defined in the same file. So somehow I need to tell root that CalorTest is a good class to put in a branch. I’ve heard something about “dictionaries” but couldn’t yet find anything about it. And I would like to keep as much of the code in C++ as possible.

Thx in advance.


This type of branch can only be use with a class that has been compiled. For example, you need to put the class declaration in a separate file and load this file with ACLiC.