Skip to content
Snippets Groups Projects
Commit 75b9fafa authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

fix root build dir initialization

parent 75cf7538
No related branches found
No related tags found
1 merge request!10Update dis
This commit is part of merge request !10. Comments created here will be created in the context of that merge request.
......@@ -20,6 +20,7 @@ dis:process:
needs: ["detector", "dis:generate"]
timeout: 1 hour
script:
- source options/env.sh
- ./util/compile_analyses.py dis
- ./benchmarks/dis/dis.sh --config barrel --ebeam 18 --pbeam 275
artifacts:
......
......@@ -26,6 +26,7 @@ dvmp:process:
needs: ["detector", "dvmp:generate"]
timeout: 1 hour
script:
- source options/env.sh
- ./util/compile_analyses.py dvmp
- ./util/run_many.py ./benchmarks/dvmp/dvmp.sh
-c jpsi_barrel
......
......@@ -73,7 +73,7 @@ def compile_analyses(benchmark):
print("Compiling all analyis scripts for '{}'".format(benchmark))
## Ensure our build directory exists
_init_build_dir()
_init_build_dir(benchmark)
## Get a list of all analysis scripts
_compile_all(benchmark)
......@@ -81,13 +81,16 @@ def compile_analyses(benchmark):
## All done!
print('All analyses for', benchmark, 'compiled successfully')
def _init_build_dir():
def _init_build_dir(benchmark):
'''Initialize our ROOT build directory (if using one).'''
print(' --> Initializing ROOT build directory ...')
build_dir = os.getenv('ROOT_BUILD_DIR')
if build_dir is None:
build_prefix = os.getenv('ROOT_BUILD_DIR')
if build_prefix is None:
print(' --> ROOT_BUILD_DIR not set, no action needed.')
return
## deduce the root build directory
pwd = os.getenv('PWD')
build_dir = '{}/{}/{}'.format(build_prefix, pwd, ANALYSIS_PATH.format(benchmark))
print(" --> Ensuring directory '{}' exists".format(build_dir))
os.system('mkdir -p {}'.format(build_dir))
......@@ -109,7 +112,7 @@ def _compile_all(benchmark):
def _compile_cmd(file):
'''Return a one-line shell command to compile an analysis script.'''
return r'bash -c "source options/env.sh && root -q -b -e \".L {}+\""'.format(file)
return r'bash -c "root -q -b -e \".L {}+\""'.format(file)
if __name__ == "__main__":
args = parser.parse_args()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment