Hi,
I’m having trouble using TBufferMerger in python/pyroot.
Trying this minimal code (adapted from the C++ example in the 2019 paper) in a single thread:
#!/usr/bin/env python3
import ROOT as r
def worker(tbufferMerger):
tfileOutput = tbufferMerger.GetFile()
hist = r.TH1F("test", "test", 100, 0, 100)
tfileOutput.Write()
tBufferMerger = r.TBufferMerger("/tmp/testOutput.root", "recreate")
worker(tBufferMerger)
I obtain:
Error in <ROOT::TBufferMergerFile::Write const>: A const TFile object should not be saved. We try to proceed anyway.
TFile::Write:0: RuntimeWarning: file /tmp/testOutput.root not opened in write mode
Am I missing something?
Cheers,
Seth
ROOT Version: 6.26/04
Platform: linuxx8664gcc
Compiler: gcc11