From c50c453c517e5293023e2ff2f00b51862a550b04 Mon Sep 17 00:00:00 2001
From: Philippe Canal <pcanal@fnal.gov>
Date: Mon, 17 Oct 2011 18:58:44 +0000
Subject: [PATCH] Remove the switch of TH1::AddDirectory as it is not thread
 safe and in its current form is not an optimization (due to the soft
 dependency requirement)

git-svn-id: http://root.cern.ch/svn/root/trunk@41424 27541ba8-7e3a-0410-8455-c3a389f83636
---
 io/io/src/TFileMerger.cxx | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/io/io/src/TFileMerger.cxx b/io/io/src/TFileMerger.cxx
index 1df24442ee2..45b6a75083e 100644
--- a/io/io/src/TFileMerger.cxx
+++ b/io/io/src/TFileMerger.cxx
@@ -353,14 +353,6 @@ Bool_t TFileMerger::MergeRecursive(TDirectory *target, TList *sourcelist, Int_t
    TString path(target->GetPath());
    path.Remove(0, path.Last(':') + 2);
 
-   // Gain time, do not add the objects in the list in memory.
-   Bool_t addDirStat = kTRUE;
-   if (R__TH1_Class) {
-      addDirStat = gROOT->ProcessLineFast("TH1::AddDirectoryStatus()");
-      gROOT->ProcessLine("TH1::AddDirectory(kFALSE);");
-   }
-   
-   
    Int_t nguess = sourcelist->GetSize()+1000;
    THashList allNames(nguess);
    allNames.SetOwner(kTRUE);
@@ -718,9 +710,6 @@ Bool_t TFileMerger::MergeRecursive(TDirectory *target, TList *sourcelist, Int_t
    }
    // save modifications to the target directory.
    target->SaveSelf(kTRUE);
-   if (R__TH1_Class) {
-      gROOT->ProcessLine(TString::Format("TH1::AddDirectory(%d);",addDirStat));
-   }
    return status;
 }
 
-- 
GitLab