From 58355d709941dd8a8f2340ce24a14ef90ec6551f Mon Sep 17 00:00:00 2001 From: Florian Uhlig <f.uhlig@gsi.de> Date: Thu, 10 Nov 2022 16:49:05 +0100 Subject: [PATCH] Fix compiler error with newer ROOT versions When using FairSoft apr22 the compilation without the fix crashes. --- reco/L1/catools/CaToolsDebugger.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reco/L1/catools/CaToolsDebugger.cxx b/reco/L1/catools/CaToolsDebugger.cxx index 8fcf3b548d..119d685e84 100644 --- a/reco/L1/catools/CaToolsDebugger.cxx +++ b/reco/L1/catools/CaToolsDebugger.cxx @@ -15,6 +15,7 @@ n->Draw("chi2") #include "CaToolsDebugger.h" +#include "TDirectory.h" #include "TFile.h" #include "TNtuple.h" @@ -44,7 +45,7 @@ void Debugger::Write() { /// Write data to file fIsWritten = true; - auto currDir {gDirectory}; + TDirectory* currDir = gDirectory; if (fFile) { fFile->cd(); for (unsigned int i = 0; i < fNtuples.size(); i++) { @@ -65,7 +66,7 @@ void Debugger::AddNtuple(const char* name, const char* varlist) /// add ntuple assert(fFile); if (GetNtupleIndex(name) >= 0) return; - auto currDir {gDirectory}; + TDirectory* currDir = gDirectory; fFile->cd(); fNtuples.push_back(new TNtuple(name, name, varlist)); gDirectory = currDir; -- GitLab