TRefArrays and MakeProxy with modified Event.cxx

Hi ,

I modified the example $ROOTSYS/test/Event.cxx/.h by adding a new class called “DTag” which is essentially a reconstructed D meson. That works and I produce my DTag objects.

The problem I have is when I try to add a TRefArray* fDauTrack, which is intended to be a list of pointers to the daughter tracks in the Track list. The .cxx and .h files are attached, and I use the MainEvent.cxx program inthe sample to generate the tree.

The Tree gets built without complaint and I can run MakeProxy without complaint, but when I try looping with the Process command, I get a message which I do not understand. If I comment out any lines to do with fDauTrack, it works fine, but when I add this bach in(as is attached below) I get the following error:

root [0] TFile* f = new TFile(“Event.root”, “READ”);
Warning in TClass::TClass: no dictionary for class Event is available
Warning in TClass::TClass: no dictionary for class EventHeader is available
Warning in TClass::TClass: no dictionary for class Track is available
Warning in TClass::TClass: no dictionary for class DTag is available
root [1] TTree* mytree = (TTree*)(f->Get(“T”));
root [2] mytree->MakeProxy(“MyEventAnalysis”, “DVVAnalysis.C”);
root [3] mytree->Process(“MyEventAnalysis.h+”);
Info in TUnixSystem::ACLiC: creating shared library /home/smith/DTagVV/./MyEventAnalysis_h.so
Error: abstract class object ‘TCollection default_val’ declared FILE:/usr/local/root/include/TBranchProxyTemplate.h LINE:124
Error: abstract class object ‘TSeqCollection default_val’ declared FILE:/usr/local/root/include/TBranchProxyTemplate.h LINE:124
Warning: Error occured during reading source files
Warning: Error occured during dictionary source generation
!!!Removing /home/smith/DTagVV/./fileeZl5sM.cxx /home/smith/DTagVV/./fileeZl5sM.h !!!
Error: rootcint: error loading headers…
Error in : Dictionary generation failed!
Info in : Invoking compiler to check macro’s validity
g++: compilation of header file requested
Error in TSelector::GetSelector: file MyEventAnalysis.h+ does not have a valid class deriving from TSelector
(long long)-1
Event.cxx (12.4 KB)
Event.h (8.16 KB)

unfortunately MakeProxy does not yet support TRefArray or any STL collection. This should be fixed in the next few months.

Philippe.

It doesn’t seem to complain about the fMuon and fHighPt ones that come with the Event.cxx example, only the ones I add.

Does MakeClass support them?

Is there an example of how to reference them to get to the object they point to using the output of MakeClass?

Thanks,
Alex

[quote]It doesn’t seem to complain about the fMuon and fHighPt ones that come with the Event.cxx example, only the ones I add.[/quote]The difference is that your TRefArray are nested inside a TClonesArray while the others are not. What is actually not implemented is TCollections (include TRefArray) inside a TClonesArray.
MakeClass would not support it either but might be ignoring it better.
Philippe.