From bb585e8fe88f18be00cedf0154aafe3c9d412eb6 Mon Sep 17 00:00:00 2001 From: Riccardo Maria Bianchi <riccardo.maria.bianchi@cern.ch> Date: Tue, 7 Apr 2020 18:30:58 +0000 Subject: [PATCH] Fix 'dump-geo' in master --- .../GeoModelStandalone/DumpGeo/share/dump-geo | 16 ++++++++++++++-- .../GeoModelStandalone/DumpGeo/share/dump-geo.py | 3 ++- graphics/VP1/VP1Algs/share/vp1.py | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo b/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo index efd838b881d..6a912499d00 100755 --- a/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo +++ b/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo @@ -60,6 +60,7 @@ declare -a FILES_POOLROOT declare -a FILES_VP1CFG declare -a FILES_EXTRAJOBOPT declare -a LOCALEVENTSRC_AVAILDIRS + FLAG_FORCE=0 FLAG_HELP=0 FLAG_DATA=0 @@ -179,16 +180,23 @@ while [ $i -le $# ]; do FLAG_SLHC=1 elif [ "x${arg}" == "x-customgeom" ]; then FLAG_CUSTOMGEOMETRY=1 + ## Muon Layout + elif [ "x${arg:0:12}" == "x-muonLayout" ]; then + ERRORS="$ERRORS\nNeed argument to -muonLayout. Example: -muonLayout=MuonSpectrometer-R.09.00.AsymNSW" elif [ "x${arg:0:12}" == "x-muonLayout=" ]; then MUONLAYOUT=${arg:12:$((${#arg}-12))} if [ "x$MUONLAYOUT" == "x" ]; then ERRORS="$ERRORS\nNeed argument to -muonLayout. Example: -muonLayout=MuonSpectrometer-R.09.00.AsymNSW" fi + # Muon NSW AGDD custom file + elif [ "x${arg:0:9}" == "x-nswagdd" ]; then + ERRORS="$ERRORS\nNeed argument to -nswagdd. Example: -nswagdd=stations.v2.06.xml" elif [ "x${arg:0:9}" == "x-nswagdd=" ]; then NSWAGDDFILE=${arg:9:$((${#arg}-9))} if [ "x$NSWAGDDFILE" == "x" ]; then ERRORS="$ERRORS\nNeed argument to -nswagdd. Example: -nswagdd=stations.v2.06.xml" fi + ### elif [ "x${arg}" == "x-mc" ]; then FLAG_MC=1 elif [ "x${arg}" == "x-multinp" ]; then @@ -824,11 +832,11 @@ if [ "x$FLAG_CUSTOMGEOMETRY" != "x0" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi OPTS="${OPTS}vp1CustomGeometry=True" fi -if [ "x$MUONLAYOUT" != "x0" ]; then +if [ "x$MUONLAYOUT" != "x" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi OPTS="${OPTS}vp1MuonLayout=\"$MUONLAYOUT\"" fi -if [ "x$NSWAGDDFILE" != "x0" ]; then +if [ "x$NSWAGDDFILE" != "x" ]; then if [ "x$OPTS" != "x" ]; then OPTS="$OPTS;"; fi OPTS="${OPTS}vp1NSWAGDDFiles=[\"${NSWAGDDFILE}\"]" fi @@ -886,6 +894,10 @@ if [ "x$FLAG_TEST" != "x0" ]; then exit 0 fi +#print the final list of options that have been set +echo "'dump-geo' - Options that have been set to run the application: ${OPTS}" + + ################################################## ## Possibly get boot-strap file for http mode ## ################################################## diff --git a/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo.py b/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo.py index 308effbae6a..c261aa596c8 100644 --- a/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo.py +++ b/DetectorDescription/GeoModel/GeoModelStandalone/DumpGeo/share/dump-geo.py @@ -206,8 +206,9 @@ if (vp1SLHC): TrkDetFlags.TRT_BuildStrawLayers = False TrkDetFlags.MaterialSource = 'None' +print("vp1NSWAGDDFiles:", vp1NSWAGDDFiles, "len:", len(vp1NSWAGDDFiles)) if vp1Muon and len(vp1NSWAGDDFiles)>0: - print "*** DumpGeo NOTE *** You specified custom vp1NSWAGDDFiles, creating NSWAGDDTool to read NSWAGDD information from custom file(s) instead from built-in geometry" + print "*** DumpGeo NOTE *** You specified custom vp1NSWAGDDFiles, creating NSWAGDDTool to read NSWAGDD information from custom file(s) '%s' instead from built-in geometry"%(', '.join(vp1NSWAGDDFiles)) from AthenaCommon.AppMgr import theApp from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() diff --git a/graphics/VP1/VP1Algs/share/vp1.py b/graphics/VP1/VP1Algs/share/vp1.py index 963213d5890..d62c3322107 100644 --- a/graphics/VP1/VP1Algs/share/vp1.py +++ b/graphics/VP1/VP1Algs/share/vp1.py @@ -263,7 +263,7 @@ from AtlasGeoModel import GeoModelInit from AthenaCommon.AppMgr import ToolSvc if vp1Muon and len(vp1NSWAGDDFiles)>0: - printfunc ("*** VP1 NOTE *** You specified custom vp1NSWAGDDFiles, creating NSWAGDDTool to read NSWAGDD information from custom file(s) instead from built-in geometry") + printfunc ("*** VP1 NOTE *** You specified custom vp1NSWAGDDFiles, creating NSWAGDDTool to read NSWAGDD information from custom file(s) '%s' instead from built-in geometry"%(', '.join(vp1NSWAGDDFiles))) from AthenaCommon.AppMgr import theApp from AGDD2GeoSvc.AGDD2GeoSvcConf import AGDDtoGeoSvc AGDD2Geo = AGDDtoGeoSvc() -- GitLab