TFile > 2GB

I am having a problem writing multiple TObjects to a TFile using the TObject::Write() method when the total size of the objects exceeds 2GB. The TObjects all write to the TFile fine while the TFile is less than 2GB; however, the object that would make the TFile exceed that size and any objects thereafter do not get written.

I am using the 5.26/00 binary installation on SLC5 x86_64.

Is there some special flag I should use to enable large files?


My code is along the lines of:
{

output = new TFile(“output.root”,“RECREATE”,“output file”);

object1->Write();
object2->Write();
object3->Write();
object4->Write();
object5->Write();
object6->Write();
object7->Write();
object8->Write();

output-> Close();
}

ROOT has no limitation on the file size. However one single object streamed to the same buffer cannot exceed 1 GByte. Split your object into sub-objects when you have a very large object or use a TTree instead.

Rene