Hi Philippe,
> > Ah, looking again at what I'm doing, my proxy was generated in a root
> > session without the library containing A and B loaded, which meant that
> > the necessary operator[] was not defined.
>
> The latter sounds like an over-sight. I will look into it.
Well, it's defined, but it returns TObject& instead of B&, which is understandable I guess.
> > because I'm [deliberately] misusing the proxy class. I'll figure it
> > out.
>
> Out of curiosity, how do you misuse it?
I wanted to have the looping over events done in my code, rather than by the framework, so I use the proxy class (say, Proxy) directly in my own loop, like:
TChain ch("chainName");
ch.Add(some files);
Proxy* p=new Proxy(t);
p->Init(&ch);
for(int i=0; i<ch.GetEntries(); ++i){
p->Process(i); [ Access members of p ]
It has the disadvantage that I have to deal with initializing the proxy myself, and there are some more complications with setting the correct tree from the TChain (so the code as I wrote it above doesn't actually work for chains with more than one file).
I understand if you don't want to support this method of using the proxy class (although I'll say I find it quite convenient), but if you are interested, I'll try to collect my notes and provide some useful feedback.
Regards,
Philip
Received on Fri Nov 19 2010 - 20:54:32 CET
This archive was generated by hypermail 2.2.0 : Fri Nov 19 2010 - 23:50:02 CET