Limit on the size of objects in TFile

Philippe, thank you for your reply. I have tried to follow the instructions in your post here, but I run into this error message:

Error in <TBufferFile::WriteByteCount>: bytecount too large (more than 1073741822)
Error in <TROOT::WriteTObject>: The current directory (PyROOT) is not associated with a file. The object (holder) has not been written.

My code reads (PyROOT)

# create large object m
rootf = TFile(output_file, "RECREATE")
t = TTree('holder', 'holder')
t.Branch('m.', m)
t.SetDirectory(rootf)
t.Fill()
t.Write()
rootf.Close()                                                                                                                                                                                                                                                                                                              

Is there anything blatantly wrong with this?

Thanks again,
Davide