From 48031ef55e52186b9b35353637eea311181d35c7 Mon Sep 17 00:00:00 2001
From: "s.zharko@gsi.de" <s.zharko@gsi.de>
Date: Wed, 24 Apr 2024 10:41:25 +0200
Subject: [PATCH] bugfix: default config for mcbm_qa.C

---
 macro/mcbm/mcbm_qa.C | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/macro/mcbm/mcbm_qa.C b/macro/mcbm/mcbm_qa.C
index b3607a1f7e..a971627d91 100644
--- a/macro/mcbm/mcbm_qa.C
+++ b/macro/mcbm/mcbm_qa.C
@@ -86,6 +86,11 @@ void mcbm_qa(Int_t nEvents = 0,
   TString recFile  = dataset + ".rec.root";
   TString sinkFile = dataset + ".qa.root";
   TString qaConfig = (config.Length() ? config : srcDir + "/macro/qa/configs/qa_tasks_config_" + setupName + ".yaml");
+  if (gSystem->AccessPathName(qaConfig.Data())) {  // file not found, using default one
+    std::cout << "-I- " << myName << ": the QA configuration file " << qaConfig << " not found, using default one\n";
+    qaConfig = srcDir + "/macro/qa/configs/qa_tasks_config_mcbm.yaml";
+  }
+
   TString benchmarkOut = sinkFile + ".qa.benchmark.root";
   // ------------------------------------------------------------------------
 
-- 
GitLab