@@ -385,33 +385,30 @@ def run_stages(args, rdf_module, anapath):
385385 output_filepath = None
386386 output_dir = os .path .join (output_dir , output_stem )
387387
388- info_msg = f'Adding process "{ process_name } " with:'
388+ info_msg = f'Will run over process "{ process_name } " with:'
389389 if fraction < 1 :
390- info_msg += f'\n \t - fraction: { fraction } '
391- info_msg += f'\n \t - number of files: { len (file_list ):,} '
390+ info_msg += f'\n - fraction: { fraction } '
391+ info_msg += f'\n - number of input files: { len (file_list ):,} '
392392 if output_dir :
393- info_msg += f'\n \t - output directory: { output_dir } '
393+ info_msg += f'\n - output directory: { output_dir } '
394394 if output_filepath :
395- info_msg += f'\n \t - output file path: { output_dir } '
395+ info_msg += f'\n - output file path: { output_filepath } '
396396 if len (chunk_list ) > 1 :
397- info_msg += f'\n \t - number of chunks: { chunks } '
398-
399- # Create directory if more than 1 chunk
400- if len (chunk_list ) > 1 :
401- output_directory = os .path .join (output_dir , output_stem )
402-
403- if not os .path .exists (output_directory ):
404- os .system (f'mkdir -p { output_directory } ' )
397+ info_msg += f'\n - number of output chunks: { chunks } '
398+ LOGGER .info (info_msg )
405399
406400 # Running locally
407401 LOGGER .info ('Running locally...' )
408402 if len (chunk_list ) == 1 :
409403 args .output = output_filepath
410404 run_local (rdf_module , chunk_list [0 ], args )
411405 else :
406+ # Create directory if more than 1 chunk
407+ if not os .path .exists (output_dir ):
408+ os .system (f'mkdir -p { output_dir } ' )
409+
412410 for index , chunk in enumerate (chunk_list ):
413- args .output = os .path .join (output_directory ,
414- f'chunk{ index } .root' )
411+ args .output = os .path .join (output_dir , f'chunk{ index } .root' )
415412 run_local (rdf_module , chunk , args )
416413
417414
0 commit comments