TTree using objects but not dictionary?

I am wondering if it is possible to somehow store “home made” objects in a TTree without generating a dictionary with CINT.

No it is not possible at the moment.
You need to generate the dictionary (either via CINT or via genreflex).

However, generating the dictionary is usually very simple :slight_smile:
In the usual case, you case simply do:root [] .L myclass.cxx+and you are done.

Cheers,
Philippe.

Thanks for a quick reply. I am compiling my code with the root libraries, and I keep getting errors such as these:

Warning in TClassTable::Add: class BuildEvent already in TClassTable

when I start my code … and I can not figure out how to avoid them, that’s why I was hoping to be able to avoid the whole dictionary thing :confused:

Hi,

This actually means that you are generating (or loading) the dictionary for BuildEvent twice!
However do you generate the dictionary for BuildEvent?

Cheers,
Philippe.

I have this bit in the end of my Makefile:

BuildEvent.$(ObjSuf): BuildEvent.h

EventDict.$(SrcSuf): BuildEvent.h LinkDef.h
@echo “Generating the dictionary $@…”
@rootcint -f $@ -c $^
@echo “$@ done”
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) -c $<

The main program is linked together with BuildEvent.cpp (implementation file) and the EventDict.

By the way, I guess I should tell you that I use version 5.18 of root.

Hi,

What you gave looked ok. Maybe you are linking both against the EventDict.cxx and a library that also contains it.

Maybe the best way to proceed is to upload a complete running example showing the problem.

Cheers,
Philippe.