From 438108372823587795f7281adaa7cfe9b4439525 Mon Sep 17 00:00:00 2001
From: Adrian Meyer-Ahrens <a_meye37@uni-muenster.de>
Date: Fri, 5 Aug 2022 16:38:04 +0200
Subject: [PATCH] Fix added whitespace on mac by chopping

---
 reco/detectors/trd/pid/CbmTrdSetTracksPidLike.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/reco/detectors/trd/pid/CbmTrdSetTracksPidLike.cxx b/reco/detectors/trd/pid/CbmTrdSetTracksPidLike.cxx
index 0596657914..96f5443c86 100644
--- a/reco/detectors/trd/pid/CbmTrdSetTracksPidLike.cxx
+++ b/reco/detectors/trd/pid/CbmTrdSetTracksPidLike.cxx
@@ -71,6 +71,9 @@ Bool_t CbmTrdSetTracksPidLike::ReadData()
     fGasPar->putParams(parlist);
     FairParamObj* filenamepar = parlist->find("RepoPid");
     fFileName.Form("%s/%s", getenv("VMCWORKDIR"), filenamepar->getParamValue());
+    //Whitespace added on some mac versions somehow to the filename resulting in fatal error, chop away here
+    while (!fFileName.EndsWith(".root"))
+      fFileName.Chop();
   }
 
 
-- 
GitLab