See Thread safe fill of same tree and histograms from different synchronized threads - #3 by pcanal
https://root-forum.cern.ch/search?q=tbuffermerger