Hello,
the following is not a serious issue. I am asking out of curiosity.
I have 2 ROOT files with a tree, and I merge them.
I’m interested how the merged file is read. Apparently a merged file with 200 entries
is read differently than a chain of 2 files with 100 entries each.
I would expect that each basket of the merged file is read exactly once.
But what I see is different. One of the baskets is always read twice.
I can reproduce this with different trees and files. Is it working as supposed?
Thanks, Misha.
Example.
I have 2 files with 100 events each created with Proofbench, which I merge into a 3rd file of 200 events.
My Selector code prints out the number of bytes read and read calls per entry in a tree.
In the case of a merged file baskets are read in a regular way for first 100 entries.
For the remaining entries one read call is issued per bunch of baskets physically adjacent on disk.
This is similar to TTreeCache with learning phase of 100 entries.
Your example does not use the TreeCache at all. I have modified your files (see attachment) and made a small pilot file shown below showing how to activate the cache in your case.
For example, when running on the plain.root file, you should get the following output
Excuse me, perhaps I didn’t put it clearly enough.
I do not state that I use TTreeCache. And it is not my intention.
I’m interested how merged files are read without TTreeCache enabled.
I mentioned TTreeCache in the following context.
I notice that baskets of the merged file are accessed as if
TTreeCache is enabled with a learning phase of 100 entries.
Thank you very much for your time. Indeed there is no difference between
a merged and a normal file.
I have now two issues which I would like to understand. www-linux.gsi.de/~zynovyev/onebasket/stat.log
1)
Here is what happens when the aforementioned merged file is read.