diff --git a/examples/AlignDet/CMakeLists.txt b/examples/AlignDet/CMakeLists.txt index 98ec10289b974abc77dedf9b2ca30b7af4c0596b..ac2314e50bee061085aceb1bf1add76e7f5ec7e1 100644 --- a/examples/AlignDet/CMakeLists.txt +++ b/examples/AlignDet/CMakeLists.txt @@ -123,7 +123,7 @@ dd4hep_add_test_reg( AlignDet_Telescope_readback_xml dd4hep_add_test_reg( AlignDet_CLICSiD_stress_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_stress - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100 + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100 REGEX_PASS "Summary: Total 7372260 conditions used \\(S:7372260,L:0,C:0,M:0\\) \\(A:351060,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -132,7 +132,7 @@ dd4hep_add_test_reg( AlignDet_CLICSiD_stress_LONGTEST dd4hep_add_test_reg( AlignDet_CLICSiD_align_nominal_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -print WARNING -volmgr -destroy -plugin DD4hep_AlignmentExample_nominal - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml REGEX_PASS "Printed 35107, scanned 35107 and computed a total of 35107 alignments \\(C:35107,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) diff --git a/examples/CLICSiD/CMakeLists.txt b/examples/CLICSiD/CMakeLists.txt index 9d7d4bb3d86cf1244a726cde92de5134a9d775b0..a2715034342d5c6fa986f0243a4df9a98bc30b5f 100644 --- a/examples/CLICSiD/CMakeLists.txt +++ b/examples/CLICSiD/CMakeLists.txt @@ -46,14 +46,14 @@ include(CTest) ##dd4hep_add_test_reg ( "CLICSiD_converter_gdml_LONGTEST" ## COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" ## EXEC_ARGS geoConverter -compact2gdml -## -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml +## -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml ## -output file:CLICSiD.gdml ## REGEX_PASS " Successfully extracted GDML to" ) foreach ( typ description vis ) dd4hep_add_test_reg ( "CLICSiD_converter_${typ}_LONGTEST" COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" EXEC_ARGS geoConverter -compact2${typ} - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -output file:CLICSiD.${typ} REGEX_PASS " Handled [1-9][0-9][0-9]+ volumes" ) endforeach() @@ -61,14 +61,14 @@ endforeach() # ROOT Geometry overlap checks dd4hep_add_test_reg( CLICSiD_check_geometry_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS python ${DD4hep_ROOT}/bin/checkGeometry --compact=file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + EXEC_ARGS python ${DD4hep_ROOT}/bin/checkGeometry --compact=file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml # This takes too long --full=true --ntracks=10 --option=o --vx=0 --vy=0 --vz=0 REGEX_PASS " Execution finished..." ) # # ROOT Geometry overlap checks dd4hep_add_test_reg( CLICSiD_check_overlaps_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS python ${DD4hep_ROOT}/bin/checkOverlaps --compact=file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + EXEC_ARGS python ${DD4hep_ROOT}/bin/checkOverlaps --compact=file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml --tolerance=0.1 REGEX_PASS " Execution finished..." ) # @@ -90,7 +90,7 @@ if( "${ROOT_FIND_VERSION}" VERSION_GREATER "6.13.0" ) # ROOT Geometry export to GDML dd4hep_add_test_reg( CLICSiD_GDML_export_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS geoPluginRun -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr + EXEC_ARGS geoPluginRun -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr -plugin DD4hep_ROOTGDMLExtract -output EcalBarrel.gdml -path /world/EcalBarrel -plugin DD4hep_ROOTGDMLExtract -output EcalEndcap.gdml -path /world/EcalEndcap -plugin DD4hep_ROOTGDMLExtract -output HcalBarrel.gdml -path /world/HcalBarrel @@ -109,7 +109,7 @@ dd4hep_add_test_reg( CLICSiD_GDML_export_LONGTEST # ROOT Geometry export to GDML dd4hep_add_test_reg( CLICSiD_GDML_import_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS geoPluginRun -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr + EXEC_ARGS geoPluginRun -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -print WARNING -destroy -volmgr -plugin DD4hep_ROOTGDMLParse -input EcalBarrel.gdml -path /world/EcalBarrel -plugin DD4hep_ROOTGDMLParse -input EcalEndcap.gdml -path /world/EcalEndcap -plugin DD4hep_ROOTGDMLParse -input HcalBarrel.gdml -path /world/HcalBarrel @@ -151,14 +151,14 @@ if (DD4HEP_USE_GEANT4) # Material scan dd4hep_add_test_reg( CLICSiD_DDG4_g4material_scan_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS python ${DD4hep_ROOT}/bin/g4MaterialScan --compact=$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + EXEC_ARGS python ${DD4hep_ROOT}/bin/g4MaterialScan --compact=${DD4hep_ROOT}/DDDetectors/compact/SiD.xml "--position=0,0,0" "--direction=0,1,0" REGEX_PASS " Terminate Geant4 and delete associated actions." ) # # Geometry scan dd4hep_add_test_reg( CLICSiD_DDG4_g4geometry_scan_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS python ${DD4hep_ROOT}/bin/g4GeometryScan --compact=$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + EXEC_ARGS python ${DD4hep_ROOT}/bin/g4GeometryScan --compact=${DD4hep_ROOT}/DDDetectors/compact/SiD.xml "--position=0,0,0" "--direction=0,1,0" REGEX_PASS "| 856 2374.8789 3000.000 ( 0.00,3000.00, 0.00) Path:\"/world\" Shape:G4Box Mat:Air" ) # diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 5492c41d3adcf9a9587cf8b47938930862602cc1..8fe7bb16530909d40c821f4276a2938890833c49 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -35,16 +35,6 @@ IF(NOT TARGET DD4hep::DDCore) ENDIF() include(DD4hepMacros) -IF( "$ENV{DD4hepINSTALL}" STREQUAL "" ) - IF( DD4hep_FOUND ) - MESSAGE( FATAL_ERROR "Must source <DD4hep-install-dir>/bin/thisdd4hep.sh first" ) - EXIT(1) - ENDIF() - # When building the examples together with DD4hep (-DDD4HEP_BUILD_EXAMPLES=ON), - # thisdd4hep.sh hasn't run. Manually set up the required variables for the tests. - SET( ENV{DD4hepINSTALL} ${CMAKE_INSTALL_PREFIX} ) -ENDIF() - dd4hep_set_compiler_flags() dd4hep_configure_output() diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index c538e1a33db58baa247b687afbade964af584265..49cb73c6362232629d810db883bdd731bb2849d2 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -110,7 +110,7 @@ dd4hep_add_test_reg( ClientTests_DumpMaterials dd4hep_add_test_reg( ClientTests_MultipleGeometries COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS multipleGeo - -compact file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + -compact file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -compact file:${ClientTestsEx_INSTALL}/compact/MiniTel.xml -compact file:${ClientTestsEx_INSTALL}/compact/NestedDetectors.xml -no-interp @@ -342,7 +342,6 @@ if (DD4HEP_USE_GEANT4) COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/Check_Air.py -geometry ${ClientTestsEx_INSTALL}/compact/Check_Air.xml batch - REQUIRES DDG4 Geant4 REGEX_PASS "Imean: 85.538 eV temperature: 333.33 K pressure: 2.22 atm" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error;FATAL" ) # diff --git a/examples/Conditions/CMakeLists.txt b/examples/Conditions/CMakeLists.txt index 5a5244cf14ec60dffe5f2084d394143171221331..e4cd8c1bb01f1855f50102871de661f4ece66575 100644 --- a/examples/Conditions/CMakeLists.txt +++ b/examples/Conditions/CMakeLists.txt @@ -141,7 +141,7 @@ dd4hep_add_test_reg( Conditions_Telescope_root_load_pool dd4hep_add_test_reg( Conditions_CLICSiD_stress_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_stress - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100 + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100 REGEX_PASS "\\+ Accessed a total of 31596300 conditions \\(S:30192020,L: 0,C:1404280,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -150,7 +150,7 @@ dd4hep_add_test_reg( Conditions_CLICSiD_stress_LONGTEST dd4hep_add_test_reg( Conditions_CLICSiD_stress2_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_stress2 - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 20 + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 20 REGEX_PASS "\\+ Accessed a total of 6319260 conditions \\(S:3510700,L: 0,C:2808560,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -159,7 +159,7 @@ dd4hep_add_test_reg( Conditions_CLICSiD_stress2_LONGTEST dd4hep_add_test_reg( Conditions_CLICSiD_MT_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_MT - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 3 -runs 2 -threads 1 + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -runs 2 -threads 1 REGEX_PASS "\\+ Accessed a total of 10742742 conditions \\(S:9900174,L: 0,C:842568,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -168,7 +168,7 @@ dd4hep_add_test_reg( Conditions_CLICSiD_MT_LONGTEST dd4hep_add_test_reg( Conditions_CLICSiD_root_save_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_save - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 3 + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -conditions CLICSiDConditions.root REGEX_PASS "\\+ Successfully saved 2527704 condition to file." REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -178,7 +178,7 @@ dd4hep_add_test_reg( Conditions_CLICSiD_root_save_LONGTEST dd4hep_add_test_reg( Conditions_CLICSiD_root_load_iov_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 3 -restore iovpool + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore iovpool -conditions CLICSiDConditions.root DEPENDS Conditions_CLICSiD_root_save_LONGTEST REGEX_PASS "\\+ Accessed a total of 947889 conditions \\(S:842568,L: 0,C:105321,M:0\\)" @@ -189,7 +189,7 @@ dd4hep_add_test_reg( Conditions_CLICSiD_root_load_iov_LONGTEST dd4hep_add_test_reg( Conditions_CLICSiD_root_load_usr_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 3 -restore userpool + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore userpool -conditions CLICSiDConditions.root DEPENDS Conditions_CLICSiD_root_save_LONGTEST REGEX_PASS "\\+ Accessed a total of 947889 conditions \\(S:842568,L: 0,C:105321,M:0\\)" @@ -200,7 +200,7 @@ dd4hep_add_test_reg( Conditions_CLICSiD_root_load_usr_LONGTEST dd4hep_add_test_reg( Conditions_CLICSiD_root_load_cond_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load - -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml -iovs 3 -restore condpool + -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore condpool -conditions CLICSiDConditions.root DEPENDS Conditions_CLICSiD_root_save_LONGTEST REGEX_PASS "\\+ Accessed a total of 947889 conditions \\(S:842568,L: 0,C:105321,M:0\\)" diff --git a/examples/Persistency/CMakeLists.txt b/examples/Persistency/CMakeLists.txt index f7da2ca0175db7eb29e5c5de67e9bfbb1441fb8d..00fa85a284bc8c606c493fb4beac05ad5bf87f97 100644 --- a/examples/Persistency/CMakeLists.txt +++ b/examples/Persistency/CMakeLists.txt @@ -129,7 +129,7 @@ dd4hep_add_test_reg( Persist_MiniTel_Restore_Readouts_LONGTEST dd4hep_add_test_reg( Persist_CLICSiD_Save_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Persistency.sh" EXEC_ARGS geoPluginRun - -volmgr -destroy -input file:$ENV{DD4hepINSTALL}/DDDetectors/compact/SiD.xml + -volmgr -destroy -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -plugin DD4hep_Geometry2ROOT -output CLICSiD_geometry.root REGEX_PASS "\\+\\+\\+ Successfully saved geometry data to file." REGEX_FAIL " ERROR ;EXCEPTION;Exception;FAILED;WriteObjectAny"