From 4224f6e43031ffe1997f912ba24a9479530e5217 Mon Sep 17 00:00:00 2001
From: Luc Papeleux <L.Papeleux@ULiege.be>
Date: Wed, 11 Dec 2024 16:36:49 +0100
Subject: [PATCH] pass jobId to battery (to allow multiple runs through
 launch.py)

---
 launch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/launch.py b/launch.py
index 71aa752..98ba030 100755
--- a/launch.py
+++ b/launch.py
@@ -199,7 +199,7 @@ class LaunchJob(ParametricJob):
         return jobname.encode('ascii','ignore') # convert to ASCII if some strings were unicode
 
     def getOutFileName(self):
-        outFileName  = "%s.%s-%s.txt" % (self.pars['OUTFILE'].val, self.pars['ALGORITHM'].val,self.jobId)
+        outFileName  = "%s.%s%s.txt" % (self.pars['OUTFILE'].val, self.pars['ALGORITHM'].val,self.jobId)
         if self.debug:
             print("outFileName = ", outFileName)
         return outFileName
@@ -353,6 +353,7 @@ class LaunchJob(ParametricJob):
         pin.write(b'battery = b.Battery() \n')
         pin.write(b'battery.keepFacs = True\n')
         pin.write(('battery.dirs = [r"%s"]\n'%tests).encode('utf-8'))
+        pin.write(('battery.jobId = r"%s"\n'%self.jobId).encode('utf-8'))
 
         if (self.pars['ALGORITHM'].val == "execfile"):
             reg1=r"(.+)_0*([1-9][0-9]*)\.py"
-- 
GitLab