ROOT Crash When Creating 100s of TH2Fs

I am creating 100s of 2D histograms. I create a file first; then at the time of histogram creation, I try to move the histogram to the file, hoping that it wouldn’t be memory resident, using this command:

TH2F->SetDirectory(TFile->GetDirectory(""));

This causes a crash.

Is there any way to fix this?

Thanks.

_ROOT Version: 6.12

your_file->cd(); // where to save it
your_histogram->Write(); // store it now
delete your_histogram; // remove from RAM

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.