Hello,
I have a question about TFile. I write a large (~40MB) ROOT file consisting of multiple levels of TDirectory objects, each holding around a dozen histograms. I ran a job as a python executable which creates C++ objects using reflex dictionary. Here is a code excerpt for opening and closing a file:
TFile *file = TFile::Open("/tmp/test.root", “RECREATE”);
… create TDirectory and histogram objects
file->Write();
file->Close();
The “Write()” call usually takes a few seconds but the “Close()” function can run for many minutes without visibly touching the file. The file is completely “usable” after the “Write()” call. My question is: why does the “Close()” take so long and do I really need to call this function.
Thank you for your help.
Best,
Rustem