[ROOT] Why can I not enable reading of a split branch?

From: koblitz@poly.in2p3.fr
Date: Thu Jul 17 2003 - 17:19:54 MEST


Hi Philippe,

following my questions from yesterday I spend another afternoon hunting 
bugs in root (at least I consider this to be a bug).
What I do is (same file/library as yesterday):
1. Create a chain inputChain
2. Add a file to it
3. Then
   inputChain->SetBranchStatus("*",0);
   inputChain->SetBranchStatus("BRawHeader",1);  <- This is a split branch
   b_header=inputChain->GetBranch("BRawHeader");
   TRawHeader *header=0;
   b_header->SetAddress(&header);
   inputChain->GetEntry(3)
   -> No byte is read, but lots of constructors called, we had that 
      yesterday...
   header->Print()
   -> header is not filled, but at least no crash...

You can now nicely enable the individual branches of the split branch but 
enabling them all via inputChain->SetBranchStatus("BRawHeader",1); does 
not seem to work. This is especially problematic as I don't know in my 
code which input branches I have to expect. I consider this behaviour a 
bug, since enabling a branch should work irrespective of its split status.

Cheers,
  Birger



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET