Checking data content after performing a merge


We often merge a large number of data files containing TTrees, somewhere on the order of twenty to fifty TTrees that are merged together. We are interested in providing a consistency check to assure our users that the merged TTree contains the same data in all entries that the original files do.

I’d like to avoid literally comparing all the data members for such a check. Can anyone suggest a some shortcut to check that would give us some level of assurance that the merge has gone well?



There is no trivial answer. See … ght=#20669 for some clues.


Hi Heather,

I would suggest to compare the quantities below for the TChain of all files vs the merged file
-size of merged file approximatively equal (with some margin to take into account
different date/time and directory structure)
-number of entries
-comparison of the ziped and unziped size of all branches

Look at the TTree/TBranch API for doing it.