Dear Rooters,
I found a strange behaviour about TChain and TEntryList.
I first create a simple TTree
TFile file("out.root","RECREATE");
TTree myTree("myTree","myTree");
int a;
myTree.Branch("a",&a,"a/I");
a = 10;
for (int i=0; i<100; i++) { a = i; myTree.Fill();}
myTree.Write();
In two different files (that is simply changing out.root -> out2.root). Then if I read one tree using a TChain
TChain chain("myTree");
chain.Add("out.root");
chain.Draw(">>myList","a<10","entrylist");
TEntryList *myList = (TEntryList*)gDirectory->Get("myList");
myList->GetLists()
The "GetLists()" returns 0x0.
While if I simply do
TChain chain("myTree");
chain.Add("out.root"); chain.Add("out2.root"); chain.Draw(">>myList","a<10","entrylist");TEntryList *myList = (TEntryList*)gDirectory->Get("myList"); myList->GetLists()
It works well, and I can do, for example
myList->GetLists()->GetEntries()
and I get "2" as expected.
If this behaviour expected? I would have expected to get one single list
in case of adding one file, and 2 lists in case of 2.
I'm working with 5.27/07 trunk_at_35856; but I found the very same problem
with 5.22/00d.
The problem was triggered by https://savannah.cern.ch/bugs/?60569 and
the work-around.
Thanks,
Andrea Received on Mon Oct 25 2010 - 23:40:25 CEST
This archive was generated by hypermail 2.2.0 : Tue Oct 26 2010 - 11:50:02 CEST