From c5c59a04df1c8a3566ffd2d4c225da41aefd9254 Mon Sep 17 00:00:00 2001
From: Michael Reuscher <michael.reuscher@desy.de>
Date: Tue, 15 Aug 2023 16:14:55 +0200
Subject: [PATCH] args for asapo and for long event now bool

---
 simrunner/config_processing.py | 4 ++--
 simrunner/main.py              | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/simrunner/config_processing.py b/simrunner/config_processing.py
index 719699c..e0f3d5a 100644
--- a/simrunner/config_processing.py
+++ b/simrunner/config_processing.py
@@ -24,7 +24,7 @@ def read_config(asapo):
 def set_arguments_various(da_config, test_data_path, args):
     data_config = da_config
     e_dict = {}
-    byte_sizes = create_size_list(int(args.AmountOfSets))
+    byte_sizes = create_size_list(args.AmountOfSets)
     # Loop durch jede Byte-Größe, um entsprechende Ereignisargumente zu erstellen
     for size in byte_sizes:
         event_name = f'Data_Set_{size}'
@@ -64,7 +64,7 @@ def set_arguments_long(da_config, test_data_path):
 
 # Function to create the list of event arguments based on the chosen function
 def create_event_list(args, test_data_path):
-    if args.function == 'long':
+    if args.long:
         e_list = set_arguments_long(read_config(args.asapo), test_data_path)
     else:
         e_list = set_arguments_various(read_config(args.asapo), test_data_path, args)
diff --git a/simrunner/main.py b/simrunner/main.py
index 2f792b3..26e1e08 100644
--- a/simrunner/main.py
+++ b/simrunner/main.py
@@ -23,13 +23,13 @@ def parse_arguments():
                         help='Host addresses of remote machines default: local')
     parser.add_argument('-u', '--user', type=str, default=current_user,
                         help='Username for SSH connection default: current user')
-    parser.add_argument('-f', '--function', choices=['various', 'long'], default='various',
-                        help='Choose function to execute default: various')
+    parser.add_argument('-l', '--long', action='store_true',
+                        help='Do Eventtyp long? default = false')
     parser.add_argument('-d', '--data', type=str, default=main_directory,
                         help='Folder to store the date for visualizer default: ./')
     parser.add_argument('-p', '--testData', type=str, default=main_directory,
                         help='Folder to store the test data from detector sim default: ./')
-    parser.add_argument('-a', '--AmountOfSets', type=str, default='23',
+    parser.add_argument('-a', '--AmountOfSets', type=int, default=23,
                         help='Amount of Data_Sets, default = 23')
     parser.add_argument('--asapo', action='store_true',
                         help='Stream to asapo default = false')
-- 
GitLab