From 3f9b5adc307ce3f251f48eabd7b4a848ffd70c6f Mon Sep 17 00:00:00 2001
From: "se.gorbunov" <se.gorbunov@gsi.de>
Date: Wed, 11 May 2022 09:57:54 +0000
Subject: [PATCH] L1: bugfix in performance file name

---
 reco/L1/CbmL1.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx
index d1194facd9..440f4f8ce6 100644
--- a/reco/L1/CbmL1.cxx
+++ b/reco/L1/CbmL1.cxx
@@ -1849,7 +1849,10 @@ void CbmL1::Finish()
 
   // Open output file and write histograms
   boost::filesystem::path p = (FairRunAna::Instance()->GetUserOutputFileName()).Data();
-  std::string histoOutName  = p.parent_path().string() + "/L1_histo_" + p.filename().string();
+  std::string dir           = p.parent_path().string();
+  if (dir.empty()) dir = ".";
+  std::string histoOutName = dir + "/L1_histo_" + p.filename().string();
+
   LOG(info) << "\033[31;1mHistograms will be saved to: \033[0m" << histoOutName;
 
   TFile* outfile = new TFile(histoOutName.c_str(), "RECREATE");
-- 
GitLab