Dear ROOT experts,
I have a piece of code that generates a TFile containing O(100) TDirectories. Each directory contains many histograms, so that the TFile in the end contains O(100k) histograms and is roughly 100MB large.
When I am done filling the histogram I close the file with:
OutputFile.Close();
This takes a very long time. If I instead do:
gROOT->GetListOfFiles()->RemoveAt(0);
It finishes rapidly. My question is if this second method has negative side effects, such as memory leak etc. Also, are there other ways to properly close the file without taking such a long time?
Looking forward to your response! Kind regards,
Peter Meiring
_ROOT Version:_ROOT 6.12/07
Platform: SLC6
Compiler: gcc (GCC) 7.3.1 20180127