diff --git a/man/man7/fccanalysis-file.7 b/man/man7/fccanalysis-file.7 index ff3d681d0e..8fdd23038a 100644 --- a/man/man7/fccanalysis-file.7 +++ b/man/man7/fccanalysis-file.7 @@ -78,6 +78,13 @@ The analysis RDataFrame can be split into several chunks\&. .br Default value: 1 .RE +.RE +.PP +\fBoutputDir\fR +.RS 4 +User can specify the directory for the output files. The output directory can be +overwriten by specifiing absolute path with `\-\-output` commandline argument\&. +.RE .PP This section is under construction. You are invited to help :) .SH SEE ALSO diff --git a/python/FCCAnalysisRun.py b/python/FCCAnalysisRun.py index 65bcfe898f..c3bebc06de 100644 --- a/python/FCCAnalysisRun.py +++ b/python/FCCAnalysisRun.py @@ -371,18 +371,23 @@ def runLocal(rdfModule, infile_list, args): else: print(f'----> Info: Number of local events: {nevents_local}') - outfilepath = getElement(rdfModule, "outputDir") + output_dir = getElement(rdfModule, "outputDir") if not args.batch: - outfilepath += '/' + args.output + print(os.path.isabs(args.output)) + if os.path.isabs(args.output): + print('----> Warning: Provided output path is absolute, "outputDir" from analysis script will be ignored!') + outfile_path = os.path.join(output_dir, args.output) else: - outfilepath = args.output + outfile_path = args.output + print('----> Info: Output file path:') + print(' ' + outfile_path) #Run RDF start_time = time.time() - outn = runRDF(rdfModule, file_list, outfilepath, nevents_local, args) + outn = runRDF(rdfModule, file_list, outfile_path, nevents_local, args) outn = outn.GetValue() - outfile = ROOT.TFile(outfilepath, 'update') + outfile = ROOT.TFile(outfile_path, 'update') param = ROOT.TParameter(int)('eventsProcessed', nevents_orig if nevents_orig != 0 else nevents_local) param.Write() diff --git a/python/Parsers.py b/python/Parsers.py index d2fc12d8cd..697866df66 100644 --- a/python/Parsers.py +++ b/python/Parsers.py @@ -18,7 +18,7 @@ def setup_build_parser(parser): publicOptions.add_argument('-j','--build-threads', type=int, default=1, - help='bumber of threads when building (equivalent to `make -j`)') + help='number of threads when building (equivalent to `make -j`)') def setup_pin_parser(parser): publicOptions = parser.add_argument_group('User pin options')