Skip to content
Snippets Groups Projects
Commit d946d503 authored by Emmanuel Le Guirriec's avatar Emmanuel Le Guirriec
Browse files

Fix for memory leak while reading Calibration file

parent 61a219ef
9 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!28528Revert 63f845ae,!27054Atr20369 210,!26397BTagging config flags creation,!24036Fix for memory leak while reading BTagging Calibration file
......@@ -753,13 +753,12 @@ namespace Analysis {
// now read the histogram into memor
ATH_MSG_DEBUG("Getting object "+histname+" from file");
std::unique_ptr<TObject> hist_raw(pfile->Get(histname.c_str()));
hist = dynamic_cast<TObject *>(hist_raw.get());
hist_raw.release();
if (hist==nullptr) {
if (hist_raw.get() == nullptr) {
ATH_MSG_DEBUG("#BTAG# Could not load TObject " << histname);
return StatusCode::FAILURE;
}
else {
hist = dynamic_cast<TObject *>(hist_raw.release());
// make this histogram unassociated with the TFile, so file can be closed
// only for histogram objects, others do not get associated
// TTrees have special treatment
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment