Hi,
I am trying to use MakeClass with a chain which befriends another one. I run MakeClass on the two chains and have merged the class declarations and the stuff in Init(). I find that the MyClass::LoadTree() function returns -2 after processing the first tree(+friend) in the chain. The first tree is processed correctly. Can someone indicate where the problem might be and any possible workaround (other than TChain::Merge() which I am already doing). I have run MakeClass with 5.14.00c and 15.15.08 with the same results.
Here is the MakeClass Init() code
Long64_t my_plots::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry); // <--- trouble here
if (centry < 0) return centry;
if (!fChain->InheritsFrom(TChain::Class())) return centry;
TChain *chain = (TChain*)fChain;
if (chain->GetTreeNumber() != fCurrent) {
fCurrent = chain->GetTreeNumber();
Notify();
}
return centry;
}
mike