TChainIndex from individual TTreeIndex (+ TChain friends)

Hello,

this post follows a previous discussion (that I can not reopen)

To summarize: I have a TChain from several files (500) and I wanted to produce a index (actually a stamp,
but I must admit I did not test TTimeStamp yet, I just calculated myself the corresponding epoch as an long int)
I also have another TTree (or TChain) in one file a priori.
I would like to “merge” then using a “friend” mechanism, using the “biggest” TChain as friend.
The data in the master tree has stamps with a precision of the second, whereas the data in the friend goes down to the millisecond so for one stamp in the master I will have several in the friend (they are sorted though).
If I understand correctly the GetEntryNumberWithBestIndex would be the appropriate mechanism (it did work on a small scale).
The problem I had previously was a crash in saving the TTreeIndex (see TTreeIndex write crash). I thus was suggested to generate one index par tree of the chain.
My next question is thus: can you provide a minimal example on how to “merge” all these indexes for the chain ?

Thank you in advance,
Best regards
Julien


ROOT Version: v5-34-36
Platform: Scientific Linux 6
Compiler: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.