From 448dff785b57b947a765dd3d106c3bcebd48a094 Mon Sep 17 00:00:00 2001 From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de> Date: Fri, 11 Mar 2022 14:09:09 +0000 Subject: [PATCH] Fix compilation with Root 6.24 . --- external/NicaFemto.patch | 12 ++++++++++++ reco/L1/L1Algo/utils/L1AlgoDraw.cxx | 1 + reco/detectors/trd/qa/CbmTrdHitDensityQa.cxx | 1 - reco/detectors/trd/qa/CbmTrdOccupancyQa.cxx | 3 --- reco/detectors/trd/qa/CbmTrdQa.cxx | 3 --- sim/transport/generators/pluto/PParticle.h | 1 + sim/transport/generators/unigen/UEvent.h | 1 + 7 files changed, 15 insertions(+), 7 deletions(-) diff --git a/external/NicaFemto.patch b/external/NicaFemto.patch index 52e1a9ca67..0cb504c1b3 100644 --- a/external/NicaFemto.patch +++ b/external/NicaFemto.patch @@ -50,3 +50,15 @@ index b8576ab..b3fc335 100644 GENERATE_LIBRARY() +diff --git a/features/NicaHelixBase.cxx b/features/NicaHelixBase.cxx +index e248f54..7317950 100644 +--- a/features/NicaHelixBase.cxx ++++ b/features/NicaHelixBase.cxx +@@ -8,6 +8,7 @@ + */ + #include "NicaHelixBase.h" + #include <TMath.h> ++#include <TString.h> + #include <iostream> + + Double_t NicaHelixBase::fgHelixBz = 0.5; diff --git a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx index 40fa018e2d..0bd92cc636 100644 --- a/reco/L1/L1Algo/utils/L1AlgoDraw.cxx +++ b/reco/L1/L1Algo/utils/L1AlgoDraw.cxx @@ -12,6 +12,7 @@ #include "TEllipse.h" #include "TFrame.h" #include "TLatex.h" +#include "TLine.h" #include "TMarker.h" #include "TPad.h" #include "TPaveText.h" diff --git a/reco/detectors/trd/qa/CbmTrdHitDensityQa.cxx b/reco/detectors/trd/qa/CbmTrdHitDensityQa.cxx index b7235b61c5..6a10ce15d6 100644 --- a/reco/detectors/trd/qa/CbmTrdHitDensityQa.cxx +++ b/reco/detectors/trd/qa/CbmTrdHitDensityQa.cxx @@ -412,7 +412,6 @@ void CbmTrdHitDensityQa::Finish() } else tempFile = new TFile(newpath, "recreate"); - gDirectory = tempFile->CurrentDirectory(); gDirectory->pwd(); if (fPlotResults) fEventCounter = (TH1I*) tempFile->Get("fEventCounter"); diff --git a/reco/detectors/trd/qa/CbmTrdOccupancyQa.cxx b/reco/detectors/trd/qa/CbmTrdOccupancyQa.cxx index f1ad48baa4..5f887f33cb 100644 --- a/reco/detectors/trd/qa/CbmTrdOccupancyQa.cxx +++ b/reco/detectors/trd/qa/CbmTrdOccupancyQa.cxx @@ -405,7 +405,6 @@ void CbmTrdOccupancyQa::SwitchToMergedFile() TString filename = "data/result.root"; TFile* Target = new TFile(filename, "READ"); if (Target) { - gDirectory = Target->CurrentDirectory(); for (fModuleOccupancyMapIt = fModuleOccupancyMap.begin(); fModuleOccupancyMapIt != fModuleOccupancyMap.end(); ++fModuleOccupancyMapIt) { TString histName = fModuleOccupancyMapIt->second->GetName(); @@ -437,7 +436,6 @@ void CbmTrdOccupancyQa::CreateLayerView() newpath.ReplaceAll(":/", ""); TFile* tempFile = new TFile(newpath, "recreate"); - gDirectory = tempFile->CurrentDirectory(); gDirectory->pwd(); cout << "CreateLayerView" << endl; Bool_t debug = false; @@ -641,7 +639,6 @@ void CbmTrdOccupancyQa::SaveHistos2File() newpath.ReplaceAll(":/", ""); TFile* tempFile = new TFile(newpath, "Update"); - gDirectory = tempFile->CurrentDirectory(); gDirectory->pwd(); cout << "SaveHistos2File" << endl; diff --git a/reco/detectors/trd/qa/CbmTrdQa.cxx b/reco/detectors/trd/qa/CbmTrdQa.cxx index 4825d51342..45059a7c00 100644 --- a/reco/detectors/trd/qa/CbmTrdQa.cxx +++ b/reco/detectors/trd/qa/CbmTrdQa.cxx @@ -1376,7 +1376,6 @@ void CbmTrdQa::SaveHistos() newpath.ReplaceAll("eds", "trd_qa"); newpath.ReplaceAll(":/", ""); TFile* tempFile = new TFile(newpath, "recreate"); - gDirectory = tempFile->CurrentDirectory(); gDirectory->pwd(); TString title; @@ -1723,7 +1722,6 @@ void CbmTrdQa::CreateLayerView(std::map<Int_t, TH1*>& Map, TString folder, TStri newpath.ReplaceAll("eds", "trd_qa"); newpath.ReplaceAll(":/", ""); TFile* tempFile = new TFile(newpath, "recreate"); - gDirectory = tempFile->CurrentDirectory(); gDirectory->pwd(); TString title(""), name(""); name.Form("_TH_%.2EGeV_", fTriggerThreshold); @@ -1809,7 +1807,6 @@ void CbmTrdQa::CreateLayerView() newpath.ReplaceAll("eds", "trd_qa"); newpath.ReplaceAll(":/", ""); TFile* tempFile = new TFile(newpath, "recreate"); - gDirectory = tempFile->CurrentDirectory(); gDirectory->pwd(); TString title(""), name(""); TPaveText* text = NULL; diff --git a/sim/transport/generators/pluto/PParticle.h b/sim/transport/generators/pluto/PParticle.h index 9a5fe77ea6..953a984cb8 100644 --- a/sim/transport/generators/pluto/PParticle.h +++ b/sim/transport/generators/pluto/PParticle.h @@ -21,6 +21,7 @@ #include "TLorentzVector.h" #include "TMath.h" +#include "TString.h" #include "PValues.h" diff --git a/sim/transport/generators/unigen/UEvent.h b/sim/transport/generators/unigen/UEvent.h index ad8abc8c71..a146bc52c6 100644 --- a/sim/transport/generators/unigen/UEvent.h +++ b/sim/transport/generators/unigen/UEvent.h @@ -7,6 +7,7 @@ #include "TLorentzVector.h" #include "TObject.h" +#include "TString.h" class UParticle; -- GitLab