From d203fba71dd18c1e547d446740f72cedb6c893ee Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Fri, 5 Feb 2021 16:56:20 +0100
Subject: [PATCH] Fix for string implemntation of newer compilers

---
 core/detectors/much/CbmMuchSegmentAuto.cxx       | 2 +-
 reco/detectors/trd/pid/CbmTrdSetTracksPidANN.cxx | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/detectors/much/CbmMuchSegmentAuto.cxx b/core/detectors/much/CbmMuchSegmentAuto.cxx
index f4b49b871c..fe08db8a6d 100644
--- a/core/detectors/much/CbmMuchSegmentAuto.cxx
+++ b/core/detectors/much/CbmMuchSegmentAuto.cxx
@@ -581,7 +581,7 @@ void CbmMuchSegmentAuto::Print(Option_t*) const {
 }
 
 void CbmMuchSegmentAuto::DrawSegmentation() {
-  string digifile(fDigiFileName);
+  string digifile(fDigiFileName.Data());
   Int_t startIndex = digifile.size() - 4;
   string txtfile   = digifile.erase(startIndex, 4);
   txtfile.append("txt");
diff --git a/reco/detectors/trd/pid/CbmTrdSetTracksPidANN.cxx b/reco/detectors/trd/pid/CbmTrdSetTracksPidANN.cxx
index c6084dd241..3ef36a1176 100644
--- a/reco/detectors/trd/pid/CbmTrdSetTracksPidANN.cxx
+++ b/reco/detectors/trd/pid/CbmTrdSetTracksPidANN.cxx
@@ -49,7 +49,8 @@ Bool_t CbmTrdSetTracksPidANN::ReadData() {
          << " is wrong geometry type." << endl;
     return kFALSE;
   }
-  fileName += "/parameters/trd/elid/ann/" + string(fTRDGeometryType) + "/";
+  fileName +=
+    "/parameters/trd/elid/ann/" + string(fTRDGeometryType.Data()) + "/";
 
   for (int i = 0; i < 10; i++) {
     stringstream ss;
-- 
GitLab