diff --git a/cmake/run_test_package.sh b/cmake/run_test_package.sh index e730b666eb0bde7cf855494ccea946562295a8b0..00d8e47fd26cff11928b7103dda13f43735c6eaa 100755 --- a/cmake/run_test_package.sh +++ b/cmake/run_test_package.sh @@ -7,8 +7,8 @@ # #----- initialize environment for this package - including DD4hep -source @CMAKE_INSTALL_PREFIX@/bin/this@PackageName@.sh - +export DD4hepExamplesINSTALL=@CMAKE_INSTALL_PREFIX@; +source @CMAKE_INSTALL_PREFIX@/bin/this@PackageName@.sh; #----- parse command line - first argument is the # test to run command=$1 diff --git a/examples/AlignDet/CMakeLists.txt b/examples/AlignDet/CMakeLists.txt index c026bf9ef32968cd0c645c0e341ac54aaf3bcf6b..9c0b330daf18f38f7c243a5bf7718feab203fe24 100644 --- a/examples/AlignDet/CMakeLists.txt +++ b/examples/AlignDet/CMakeLists.txt @@ -29,7 +29,7 @@ dd4hep_configure_scripts( AlignDet DEFAULT_SETUP WITH_TESTS) dd4hep_add_test_reg( AlignDet_Telescope_dump_geometry COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy - -compact file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml + -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -plugin DD4hep_DetectorDump REGEX_PASS "/world/Telescope/module_9 NumDau\\:1 VolID\\:00000903 Place" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -39,7 +39,7 @@ dd4hep_add_test_reg( AlignDet_Telescope_dump_geometry dd4hep_add_test_reg( AlignDet_Telescope_populate COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_populate - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 10 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10 REGEX_PASS "Summary INFO Processed a total 190 conditions \\(S:190,L:0,C:0,M:0\\) and \\(C:190,M:0\\) alignments. Created:200" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -48,8 +48,8 @@ dd4hep_add_test_reg( AlignDet_Telescope_populate dd4hep_add_test_reg( AlignDet_Telescope_read_xml COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml - -deltas file:${DD4hep_DIR}/examples/Conditions/data/repository.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml + -deltas file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml REGEX_PASS "20 conditions in slice. \\(T:20,S:20,L:0,C:0,M:0\\) Alignments accessed: 20 \\(A:19,M:0\\) for IOV:run\\(1\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -58,8 +58,8 @@ dd4hep_add_test_reg( AlignDet_Telescope_read_xml dd4hep_add_test_reg( AlignDet_Telescope_dump_xml COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml - -delta file:${DD4hep_DIR}/examples/Conditions/data/repository.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml + -delta file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml -plugin DD4hep_ConditionsXMLRepositoryWriter -iov_type run -iov_value 1500 REGEX_PASS "Summary: Converted 33 conditions. 0 conditions without recipe" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -69,8 +69,8 @@ dd4hep_add_test_reg( AlignDet_Telescope_dump_xml dd4hep_add_test_reg( AlignDet_Telescope_write_xml COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml - -delta file:${DD4hep_DIR}/examples/Conditions/data/repository.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml + -delta file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml -plugin DD4hep_ConditionsXMLRepositoryWriter -iov_type run -iov_value 1500 -manager -output new_cond.xml REGEX_PASS "Successfully wrote 33 conditions \\(0 unconverted\\) to file: new_cond.xml" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -80,7 +80,7 @@ dd4hep_add_test_reg( AlignDet_Telescope_write_xml dd4hep_add_test_reg( AlignDet_Telescope_stress COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_stress - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 20 -runs 111 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 20 -runs 111 REGEX_PASS "Summary: Total 4598 conditions used \\(S:4598,L:0,C:0,M:0\\) \\(A:380,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -89,8 +89,8 @@ dd4hep_add_test_reg( AlignDet_Telescope_stress dd4hep_add_test_reg( AlignDet_Telescope_align_new COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_align_telescope - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml - -setup file:${DD4hep_DIR}/examples/Conditions/data/manager.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml + -setup file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/manager.xml REGEX_PASS "World transformation of: /world/Telescope/module_3/sensor Tr:\\( 3.9e\\+02, 0, 4.9 \\[cm\\]\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -99,7 +99,7 @@ dd4hep_add_test_reg( AlignDet_Telescope_align_new dd4hep_add_test_reg( AlignDet_Telescope_align_nominal COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_nominal - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml REGEX_PASS "Printed 20, scanned 20 and computed a total of 20 alignments \\(C:20,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -108,7 +108,7 @@ dd4hep_add_test_reg( AlignDet_Telescope_align_nominal dd4hep_add_test_reg( AlignDet_Telescope_readback_xml COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -deltas file:./new_cond.xml REGEX_PASS "33 conditions in slice. \\(T:33,S:33,L:0,C:0,M:0\\) Alignments accessed: 20 \\(A:19,M:0\\) for IOV:run\\(1\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -118,7 +118,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 10 -runs 100 + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 10 -runs 100 REGEX_PASS "Summary: Total 7352100 conditions used \\(S:7352100,L:0,C:0,M:0\\) \\(A:350100,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -127,7 +127,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 -volmgr -destroy -plugin DD4hep_AlignmentExample_nominal - -input file:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml REGEX_PASS "Printed 35011, scanned 35011 and computed a total of 35011 alignments \\(C:35011,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -136,7 +136,7 @@ dd4hep_add_test_reg( AlignDet_CLICSiD_align_nominal_LONGTEST dd4hep_add_test_reg( AlignDet_AlephTPC_load COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun - -input file:${DD4hep_DIR}/examples/AlignDet/compact/AlephTPC.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/AlephTPC.xml -destroy -no-interpreter -plugin DD4hep_GlobalAlignmentInstall REGEX_PASS "189 nodes/ 24 volume UID's in Detector Geometry" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -146,10 +146,10 @@ dd4hep_add_test_reg( AlignDet_AlephTPC_load dd4hep_add_test_reg( AlignDet_AlephTPC_global_align COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun - -input file:${DD4hep_DIR}/examples/AlignDet/compact/AlephTPC.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/AlephTPC.xml -destroy -no-interpreter -plugin DD4hep_GlobalAlignmentInstall - -plugin DD4hep_XMLLoader file:${DD4hep_DIR}/examples/AlignDet/compact/AlephTPC_alignment.xml BUILD_DEFAULT + -plugin DD4hep_XMLLoader file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/AlephTPC_alignment.xml BUILD_DEFAULT REGEX_PASS "Successfully parsed XML: AlephTPC_alignment.xml" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -158,11 +158,11 @@ dd4hep_add_test_reg( AlignDet_AlephTPC_global_align dd4hep_add_test_reg( AlignDet_AlephTPC_global_reset COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" EXEC_ARGS geoPluginRun - -input file:${DD4hep_DIR}/examples/AlignDet/compact/AlephTPC.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/AlephTPC.xml -destroy -no-interpreter -plugin DD4hep_GlobalAlignmentInstall - -plugin DD4hep_XMLLoader file:${DD4hep_DIR}/examples/AlignDet/compact/AlephTPC_alignment.xml - -plugin DD4hep_XMLLoader file:${DD4hep_DIR}/examples/AlignDet/compact/AlephTPC_reset.xml + -plugin DD4hep_XMLLoader file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/AlephTPC_alignment.xml + -plugin DD4hep_XMLLoader file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/AlephTPC_reset.xml REGEX_PASS "Successfully parsed XML: AlephTPC_reset.xml" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) diff --git a/examples/CLICSiD/CMakeLists.txt b/examples/CLICSiD/CMakeLists.txt index 60d1f1aa67fccbe227fa6f22495894944651e6ce..7946bf4e04ead84da5cccef7359fcca7d9825ed5 100644 --- a/examples/CLICSiD/CMakeLists.txt +++ b/examples/CLICSiD/CMakeLists.txt @@ -17,7 +17,8 @@ dd4hep_package ( CLICSiD MAJOR 0 MINOR 0 PATCH 1 USES [ROOT REQUIRED COMPONENTS Geom] [DD4hep REQUIRED COMPONENTS DDCore] ) -dd4hep_install_dir( compact scripts sim DESTINATION ${DD4hep_DIR}/examples/CLICSiD ) +set(CLICSiDEx_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/CLICSiD) +dd4hep_install_dir( compact scripts sim DESTINATION ${CLICSiDEx_INSTALL} ) #-------------------------------------------------------------------------- if (DD4HEP_USE_GEANT4) find_package(Geant4 REQUIRED) @@ -37,7 +38,7 @@ foreach ( typ description gdml 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:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + -input file:${CLICSiDEx_INSTALL}/compact/compact.xml -output file:CLICSiD.${typ} REGEX_PASS " Handled [1-9][0-9][0-9]+ volumes" ) endforeach() @@ -46,7 +47,7 @@ endforeach() dd4hep_add_test_reg( CLICSiD_check_geometry_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" EXEC_ARGS python ${DD4hep_DIR}/python/checkGeometry.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + --compact=file:${CLICSiDEx_INSTALL}/compact/compact.xml # This takes too long --full=true --ntracks=10 --option=o --vx=0 --vy=0 --vz=0 REGEX_PASS " Execution finished..." ) # @@ -54,7 +55,7 @@ dd4hep_add_test_reg( CLICSiD_check_geometry_LONGTEST dd4hep_add_test_reg( CLICSiD_check_overlaps_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" EXEC_ARGS python ${DD4hep_DIR}/python/checkOverlaps.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + --compact=file:${CLICSiDEx_INSTALL}/compact/compact.xml --tolerance=0.1 REGEX_PASS " Execution finished..." ) # @@ -65,7 +66,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:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml -print WARNING -destroy -volmgr + EXEC_ARGS geoPluginRun -input file:${CLICSiDEx_INSTALL}/compact/compact.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 @@ -84,7 +85,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:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact_nocalo.xml -print WARNING -destroy -volmgr + EXEC_ARGS geoPluginRun -input file:${CLICSiDEx_INSTALL}/compact/compact_nocalo.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 @@ -111,7 +112,7 @@ if (DD4HEP_USE_GEANT4) foreach(script testDDPython CLICMagField CLICPhysics CLICRandom CLICSiDScan) dd4hep_add_test_reg( CLICSiD_DDG4_${script}_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/${script}.py + EXEC_ARGS python ${CLICSiDEx_INSTALL}/scripts/${script}.py REQUIRES DDG4 Geant4 REGEX_PASS "TEST_PASSED" REGEX_FAIL "Exception;EXCEPTION;ERROR" ) @@ -121,7 +122,7 @@ if (DD4HEP_USE_GEANT4) dd4hep_add_test_reg( CLICSiD_DDG4_g4material_scan_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" EXEC_ARGS python ${DD4hep_DIR}/python/g4MaterialScan.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + --compact=file:${CLICSiDEx_INSTALL}/compact/compact.xml "--position=0,0,0" "--direction=0,1,0" REQUIRES DDG4 Geant4 REGEX_PASS " Terminate Geant4 and delete associated actions." ) @@ -132,7 +133,7 @@ if (DD4HEP_USE_GEANT4) # Build AClick from the source file dd4hep_add_test_reg( CLICSiD_DDG4_${script}_as_AClick_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_CLICSiD.sh" - EXEC_ARGS root.exe -b -x -n -q -l "${DD4hep_DIR}/examples/DDG4/examples/run.C(\"${DD4hep_DIR}/examples/CLICSiD/scripts/${script}\")" + EXEC_ARGS root.exe -b -x -n -q -l "${DD4hep_DIR}/examples/DDG4/examples/run.C(\"${CLICSiDEx_INSTALL}/scripts/${script}\")" REQUIRES DDG4 Geant4 REGEX_PASS "UserEvent_1 INFO Geant4TestEventAction> calling end.event_id=9" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) diff --git a/examples/CLICSiD/scripts/CLICSiDAClick.C b/examples/CLICSiD/scripts/CLICSiDAClick.C index ec23601cfbb7c096815dff2403399142788d1f89..e0c40866e97d1e865e25d1581af67459a12442db 100644 --- a/examples/CLICSiD/scripts/CLICSiDAClick.C +++ b/examples/CLICSiD/scripts/CLICSiDAClick.C @@ -1,4 +1,3 @@ -// $Id$ //==================================================================== // AIDA Detector description implementation //-------------------------------------------------------------------- @@ -43,7 +42,7 @@ Geant4SensDetActionSequence* setupDetector(Geant4Kernel& kernel, const std::stri int setupG4_CINT(bool interactive) { Geant4Kernel& kernel = Geant4Kernel::instance(Detector::getInstance()); - string install_dir = getenv("DD4hepINSTALL"); + string install_dir = getenv("DD4hepExamplesINSTALL"); Phase p; kernel.loadGeometry(("file:"+install_dir+"/examples/CLICSiD/compact/compact.xml").c_str()); diff --git a/examples/CLICSiD/scripts/CLICSiDXML.C b/examples/CLICSiD/scripts/CLICSiDXML.C index c100dbded9180950c59d29907fca16e550e3a421..11b0ce5e54be730b42274de1f0f008d8fb8b8cb3 100644 --- a/examples/CLICSiD/scripts/CLICSiDXML.C +++ b/examples/CLICSiD/scripts/CLICSiDXML.C @@ -26,7 +26,7 @@ using namespace std; using namespace dd4hep::sim::Setup; int setupG4_XML(bool interactive) { - string install_dir = getenv("DD4hepINSTALL"); + string install_dir = getenv("DD4hepExamplesINSTALL"); string prefix = "file:"+install_dir+"/examples/"; Kernel& kernel = Kernel::instance(dd4hep::Detector::getInstance()); kernel.loadGeometry((prefix+"CLICSiD/compact/compact.xml").c_str()); diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 7f315bd91fc55a25601668b4baaeabc4682f348b..c06eea95d490b2f3919606a2367f8c075db3cf07 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -36,6 +36,7 @@ find_package ( ROOT REQUIRED COMPONENTS Geom GenVector ) include(${ROOT_USE_FILE}) # dd4hep_set_compiler_flags() +SET( ENV{DD4hepExamplesINSTALL} ${CMAKE_INSTALL_PREFIX} ) # dd4hep_configure_output() dd4hep_package ( dd4hepExample MAJOR 0 MINOR 15 PATCH 0 diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt index 545312316d9aac211e32869fdec4eb09a4f3204a..845b9a7efa55df7a5081af1a1b38755a373d6d14 100644 --- a/examples/ClientTests/CMakeLists.txt +++ b/examples/ClientTests/CMakeLists.txt @@ -23,7 +23,8 @@ dd4hep_add_plugin( ClientTests SOURCES src/*.cpp OPTIONAL [BOOST SOURCES src_boost/*.cpp] ) # -dd4hep_install_dir( compact scripts ref DESTINATION ${DD4hep_DIR}/examples/ClientTests ) +set(ClientTestsEx_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/ClientTests) +dd4hep_install_dir( compact scripts ref DESTINATION ${ClientTestsEx_INSTALL} ) #-------------------------------------------------------------------------- #-------------------------------------------------------------------------- @@ -34,7 +35,7 @@ dd4hep_configure_scripts( ClientTests DEFAULT_SETUP WITH_TESTS) dd4hep_add_test_reg( ClientTests_MiniTel_JSON_Dump COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_JsonDumper - ${CMAKE_CURRENT_SOURCE_DIR}/compact/MiniTel.json + ${ClientTestsEx_INSTALL}/compact/MiniTel.json REGEX_PASS "Successfully dumped json input" REGEX_FAIL "Exception" REGEX_FAIL "FAILED" @@ -44,7 +45,7 @@ dd4hep_add_test_reg( ClientTests_MiniTel_JSON_Dump dd4hep_add_test_reg( ClientTests_MiniTel_JSON_Detector COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun -volmgr -destroy -plugin DD4hep_XMLLoader - file:${CMAKE_CURRENT_SOURCE_DIR}/compact/MiniTel_json.xml + file:${ClientTestsEx_INSTALL}/compact/MiniTel_json.xml REGEX_PASS "Successfully processed JSON input" REGEX_FAIL "Exception" REGEX_FAIL "FAILED" @@ -54,7 +55,7 @@ dd4hep_add_test_reg( ClientTests_MiniTel_JSON_Detector dd4hep_add_test_reg( ClientTests_DumpMaterials COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/MiniTel.xml + -input file:${ClientTestsEx_INSTALL}/compact/MiniTel.xml -volmgr -destroy -plugin DD4hep_MaterialTable -type xml REGEX_PASS "material name=\"PEEK\"" REGEX_FAIL "Exception" @@ -65,7 +66,7 @@ dd4hep_add_test_reg( ClientTests_DumpMaterials dd4hep_add_test_reg( ClientTests_DumpElements COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/MiniTel.xml + -input file:${ClientTestsEx_INSTALL}/compact/MiniTel.xml -volmgr -destroy -plugin DD4hep_ElementTable -type xml REGEX_PASS "formula=\"UUB\" name=\"UUB\"" REGEX_FAIL "Exception" @@ -77,7 +78,7 @@ dd4hep_add_test_reg( ClientTests_DumpElements dd4hep_add_test_reg( ClientTests_MultiPlace COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/SiBarrelMultiSensitiveLongVolID.xml -volmgr -destroy + -input file:${ClientTestsEx_INSTALL}/compact/SiBarrelMultiSensitiveLongVolID.xml -volmgr -destroy -plugin DD4hep_VolumeMgrTest SiTrackerBarrel REGEX_PASS "Volume:component1_1 IDDesc:OK \\[S\\] vid:00200668000000ff system:00ff barrel:0000 layer:0001 module:0033 sensor:0001" @@ -88,7 +89,7 @@ dd4hep_add_test_reg( ClientTests_MultiPlace dd4hep_add_test_reg( ClientTests_Bitfield64_LongVoldID COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/SiBarrelMultiSensitiveLongVolID.xml -volmgr -destroy + -input file:${ClientTestsEx_INSTALL}/compact/SiBarrelMultiSensitiveLongVolID.xml -volmgr -destroy -plugin DD4hep_VolumeMgrTest SiTrackerBarrel REGEX_PASS "Volume:component1_1 IDDesc:OK \\[S\\] vid:00200668000000ff system:00ff barrel:0000 layer:0001 module:0033 sensor:0001" @@ -99,7 +100,7 @@ dd4hep_add_test_reg( ClientTests_Bitfield64_LongVoldID dd4hep_add_test_reg( ClientTests_Bitfield64_BarrelSides COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/Bitfield_SidesTest.xml -volmgr -destroy + -input file:${ClientTestsEx_INSTALL}/compact/Bitfield_SidesTest.xml -volmgr -destroy -plugin DD4hep_DetectorVolumeDump -plugin DD4hep_VolumeDump volids -plugin DD4hep_VolumeMgrTest all @@ -109,7 +110,7 @@ dd4hep_add_test_reg( ClientTests_Bitfield64_BarrelSides dd4hep_add_test_reg( ClientTests_Bitfield64_BarrelSides2 COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/Bitfield_SidesTest2.xml -volmgr -destroy + -input file:${ClientTestsEx_INSTALL}/compact/Bitfield_SidesTest2.xml -volmgr -destroy -plugin DD4hep_DetectorVolumeDump -plugin DD4hep_VolumeDump volids -plugin DD4hep_VolumeMgrTest all @@ -119,7 +120,7 @@ dd4hep_add_test_reg( ClientTests_Bitfield64_BarrelSides2 dd4hep_add_test_reg( ClientTests_Check_Handle_Casts COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -volmgr -destroy -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/Check_Handles.xml + -volmgr -destroy -input file:${ClientTestsEx_INSTALL}/compact/Check_Handles.xml -plugin DD4hep_DetectorVolumeDump REGEX_PASS "| 164 casts PASSED 90 casts FAILED |") # @@ -127,7 +128,7 @@ dd4hep_add_test_reg( ClientTests_Check_Handle_Casts dd4hep_add_test_reg( ClientTests_Save_ROOT_MiniTel_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun - -volmgr -destroy -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/MiniTel.xml + -volmgr -destroy -input file:${ClientTestsEx_INSTALL}/compact/MiniTel.xml -plugin DD4hep_Geometry2ROOT -output MiniTel_geometry.root REGEX_PASS "\\+\\+\\+ Successfully saved geometry data to file.") # @@ -138,7 +139,7 @@ foreach (test Box Cone ConeSegment Tube ElTube Trap Trapezoid TruncatedTube ExtrudedPolygon) dd4hep_add_test_reg( ClientTests_Check_Shape_${test} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS geoDisplay file:${CMAKE_CURRENT_SOURCE_DIR}/compact/Check_Shape_${test}.xml -load -destroy + EXEC_ARGS geoDisplay file:${ClientTestsEx_INSTALL}/compact/Check_Shape_${test}.xml -load -destroy REGEX_PASS "Shape verification SUCCESSFUL." ) endforeach() # @@ -152,7 +153,7 @@ foreach (test Assemblies BoxTrafos IronCylinder LheD_tracker MagnetFields Materi dd4hep_add_test_reg( ClientTests_volume_materials_${test} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun -print WARNING -volmgr -destroy - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml + -input file:${ClientTestsEx_INSTALL}/compact/${test}.xml -plugin DD4hep_VolumeDump -materials REGEX_PASS "\\+\\+\\+ Checked [1-9][0-9]* materials in volume placements. 0 are BAD." ) @@ -161,7 +162,7 @@ foreach (test Assemblies BoxTrafos IronCylinder LheD_tracker MagnetFields Materi dd4hep_add_test_reg( ClientTests_converter_${type}_${test} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoConverter -compact2${type} - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml + -input file:${ClientTestsEx_INSTALL}/compact/${test}.xml -output file:${test}.${type} REGEX_PASS " Handled [1-9][0-9]* volumes" ) endforeach(type) @@ -178,7 +179,7 @@ foreach (test Assemblies BoxTrafos LheD_tracker MagnetFields MiniTel SiliconBloc # Test material scans in [origine to 10 meters in y] dd4hep_add_test_reg( ClientTests_material_scan_${test} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS materialScan file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml 0 0 0 0 10000 0 + EXEC_ARGS materialScan file:${ClientTestsEx_INSTALL}/compact/${test}.xml 0 0 0 0 10000 0 REGEX_PASS " Average Material " ) # # Geant4 material scan. From position=0,0,0 to end-of-world @@ -186,7 +187,7 @@ foreach (test Assemblies BoxTrafos LheD_tracker MagnetFields MiniTel SiliconBloc dd4hep_add_test_reg( ClientTests_g4material_scan_${test}_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS python ${DD4hep_DIR}/python/g4MaterialScan.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml + --compact=file:${ClientTestsEx_INSTALL}/compact/${test}.xml "--position=0,0,0" "--direction=0,1,0" REGEX_PASS " Terminate Geant4 and delete associated actions." ) endif(DD4HEP_USE_GEANT4) @@ -200,7 +201,7 @@ foreach (test BoxTrafos IronCylinder MiniTel SiliconBlock NestedSimple MultiColl dd4hep_add_test_reg( ClientTests_parse_xml_string_${test} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS geoPluginRun -destroy -print WARNING - -plugin DD4hep_XML_InMemory -input ${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml + -plugin DD4hep_XML_InMemory -input ${ClientTestsEx_INSTALL}/compact/${test}.xml -plugin DD4hep_VolumeDump -materials REGEX_PASS "\\+\\+\\+ Checked [1-9][0-9]* materials in volume placements. 0 are BAD." ) # @@ -208,7 +209,7 @@ foreach (test BoxTrafos IronCylinder MiniTel SiliconBlock NestedSimple MultiColl dd4hep_add_test_reg( ClientTests_check_geometry_${test}_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS python ${DD4hep_DIR}/python/checkGeometry.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml + --compact=file:${ClientTestsEx_INSTALL}/compact/${test}.xml --full=true --ntracks=10 REGEX_PASS " Execution finished..." ) # @@ -216,7 +217,7 @@ foreach (test BoxTrafos IronCylinder MiniTel SiliconBlock NestedSimple MultiColl dd4hep_add_test_reg( ClientTests_check_overlaps_${test}_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" EXEC_ARGS python ${DD4hep_DIR}/python/checkOverlaps.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/${test}.xml + --compact=file:${ClientTestsEx_INSTALL}/compact/${test}.xml --tolerance=0.1 REGEX_PASS " Execution finished..." ) endforeach() @@ -228,7 +229,7 @@ if (DD4HEP_USE_GEANT4) # Geant4 test if production cuts are processed dd4hep_add_test_reg( ClientTests_sim_MiniTel_prod_cuts COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/MiniTelRegions.py batch + EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/MiniTelRegions.py batch REQUIRES DDG4 Geant4 REGEX_PASS "minitel_region_1: Set cut \\[gamma/0\\] = 5.000" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) @@ -236,7 +237,7 @@ if (DD4HEP_USE_GEANT4) # Geant4 test if production cuts are processed dd4hep_add_test_reg( ClientTests_sim_MiniTel_limitset COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/MiniTelRegions.py batch + EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/MiniTelRegions.py batch REQUIRES DDG4 Geant4 REGEX_PASS "LimitSet: Particle type: mu- PDG: 13 : 3.000000" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) @@ -244,7 +245,7 @@ if (DD4HEP_USE_GEANT4) # Test of an example user analysis creating an N-tuple instead of an output file with events dd4hep_add_test_reg( ClientTests_sim_UserAnalysis COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/MiniTelEnergyDeposits.py batch + EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/MiniTelEnergyDeposits.py batch REQUIRES DDG4 Geant4 REGEX_PASS "Entries : 200 " REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) @@ -252,7 +253,7 @@ if (DD4HEP_USE_GEANT4) # Test of an example user analysis creating an N-tuple instead of an output file with events dd4hep_add_test_reg( ClientTests_sim_TrackingRegion COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/TrackingRegion.py batch + EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/TrackingRegion.py batch REQUIRES DDG4 Geant4 REGEX_PASS "Placement tracking_volume_1 not converted \\[Veto'ed for simulation\\]" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) @@ -261,7 +262,7 @@ if (DD4HEP_USE_GEANT4) foreach(script Assemblies LheD_tracker MiniTel NestedDetectors ) dd4hep_add_test_reg( ClientTests_sim_${script} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/${script}.py batch + EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/${script}.py batch REQUIRES DDG4 Geant4 REGEX_PASS NONE REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) @@ -271,8 +272,8 @@ if (DD4HEP_USE_GEANT4) foreach(script MultiCollections MultiSegmentations MultiSegmentCollections ) dd4hep_add_test_reg( ClientTests_sim_${script} COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_ClientTests.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/MultiCollections.py - -compact ${CMAKE_CURRENT_SOURCE_DIR}/compact/${script}.xml -batch + EXEC_ARGS python ${ClientTestsEx_INSTALL}/scripts/MultiCollections.py + -compact ${ClientTestsEx_INSTALL}/compact/${script}.xml -batch REQUIRES DDG4 Geant4 REGEX_PASS NONE REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) diff --git a/examples/ClientTests/compact/Check_Shape_Box.xml b/examples/ClientTests/compact/Check_Shape_Box.xml index 6256b0a464881b53047dc7c4d82f067c85b427cc..0d85e779001430d1ca4fef84ecbedc534904e763 100644 --- a/examples/ClientTests/compact/Check_Shape_Box.xml +++ b/examples/ClientTests/compact/Check_Shape_Box.xml @@ -10,7 +10,7 @@ <position x="30" y="30" z="30"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Box.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Box.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Cone.xml b/examples/ClientTests/compact/Check_Shape_Cone.xml index c72744adaa5d174c3c7989bba9422c9a5079b899..cb00f7672ee1bd8b28fe4417b0e5d046fdc323e9 100644 --- a/examples/ClientTests/compact/Check_Shape_Cone.xml +++ b/examples/ClientTests/compact/Check_Shape_Cone.xml @@ -10,7 +10,7 @@ <position x="30" y="30" z="30"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Cone.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Cone.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_ConeSegment.xml b/examples/ClientTests/compact/Check_Shape_ConeSegment.xml index b7f3645f5bebde91542b05c05a4e9d4cd88ca564..bcb0edda4ea813b6b5f344e0cc63d7d4fa9758e6 100644 --- a/examples/ClientTests/compact/Check_Shape_ConeSegment.xml +++ b/examples/ClientTests/compact/Check_Shape_ConeSegment.xml @@ -15,7 +15,7 @@ <position x="30*cm" y="30*cm" z="-80*cm"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_ConeSegment.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_ConeSegment.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_CutTube.xml b/examples/ClientTests/compact/Check_Shape_CutTube.xml index 36285bb0f2ba4660caa4eee41b6b3bb084bf9fce..cd899a1d9e3c001794ab1f029aaf238d788c6d5c 100644 --- a/examples/ClientTests/compact/Check_Shape_CutTube.xml +++ b/examples/ClientTests/compact/Check_Shape_CutTube.xml @@ -13,7 +13,7 @@ <position x="30" y="30" z="50"/> <rotation x="0" y="pi/4" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_CutTube.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_CutTube.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_ElTube.xml b/examples/ClientTests/compact/Check_Shape_ElTube.xml index 6246ccf7e912eb148c14da6b96a7a24d5beef4b8..e6a0e6945088f5acb4ede2170bbd6d57d9564ff8 100644 --- a/examples/ClientTests/compact/Check_Shape_ElTube.xml +++ b/examples/ClientTests/compact/Check_Shape_ElTube.xml @@ -10,7 +10,7 @@ <position x="30" y="30" z="50"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_ElTube.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_ElTube.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_ExtrudedPolygon.xml b/examples/ClientTests/compact/Check_Shape_ExtrudedPolygon.xml index af41c989d257bcb5950bb69ad0f2c81df9fb809c..cd910e142f9f37edb2cdcca0ccc2e75699fa953d 100644 --- a/examples/ClientTests/compact/Check_Shape_ExtrudedPolygon.xml +++ b/examples/ClientTests/compact/Check_Shape_ExtrudedPolygon.xml @@ -21,7 +21,7 @@ <section z="60*cm" x="0*cm" y="30*cm" scale="1.2"/> </shape> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_ExtrudedPolygon.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_ExtrudedPolygon.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml b/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml index 80d175067762874cd635d6ec8453b271af1f91cf..babcd27ab37feb0b3e84e097f4685ca8515bec55 100644 --- a/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml +++ b/examples/ClientTests/compact/Check_Shape_Hyperboloid.xml @@ -10,7 +10,7 @@ <position x="30*cm" y="30*cm" z="30*cm"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Hyperboloid.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Hyperboloid.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Paraboloid.xml b/examples/ClientTests/compact/Check_Shape_Paraboloid.xml index dd0f6aa47995593a3a38469630b8ea52f1d36246..c4d7a06af7c44df76e2b3554c2a5191529dd7d32 100644 --- a/examples/ClientTests/compact/Check_Shape_Paraboloid.xml +++ b/examples/ClientTests/compact/Check_Shape_Paraboloid.xml @@ -10,7 +10,7 @@ <position x="30*cm" y="30*cm" z="30*cm"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Paraboloid.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Paraboloid.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Polycone.xml b/examples/ClientTests/compact/Check_Shape_Polycone.xml index 23672a84f59612e221bf0018c7e6d426d01876ee..21d61cc0a1712c4cf5529a9ddf6c4ed9ccab34dc 100644 --- a/examples/ClientTests/compact/Check_Shape_Polycone.xml +++ b/examples/ClientTests/compact/Check_Shape_Polycone.xml @@ -21,7 +21,7 @@ <position x="30" y="30" z="30"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Polycone.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Polycone.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml b/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml index fe90d8227126e7d48a74b6515118009192db8856..cbb29f5f609994b47d4f8e461b9ab30b72410df5 100644 --- a/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml +++ b/examples/ClientTests/compact/Check_Shape_PseudoTrap.xml @@ -19,7 +19,7 @@ <rotation x="0" y="0" z="0"/> </check> --> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_PseudoTrap.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Sphere.xml b/examples/ClientTests/compact/Check_Shape_Sphere.xml index c104a5a33d6616219a71f00880eec30ad23c583f..3713d65038efbe82c3014406b06b0637890bbfd9 100644 --- a/examples/ClientTests/compact/Check_Shape_Sphere.xml +++ b/examples/ClientTests/compact/Check_Shape_Sphere.xml @@ -10,7 +10,7 @@ <position x="30" y="30" z="30"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Sphere.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Sphere.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Torus.xml b/examples/ClientTests/compact/Check_Shape_Torus.xml index b196b6a980998b0b392147bb41815167e0f9fb29..8fe8015c94fa35d7df822af8151928e5b9eaafd9 100644 --- a/examples/ClientTests/compact/Check_Shape_Torus.xml +++ b/examples/ClientTests/compact/Check_Shape_Torus.xml @@ -10,7 +10,7 @@ <position x="30" y="30" z="30"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Torus.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Torus.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Trap.xml b/examples/ClientTests/compact/Check_Shape_Trap.xml index 742746d124f5247e10c5ae43575593ccb27363b9..779779cfd5381f25378138ff9207cfa928cf1552 100644 --- a/examples/ClientTests/compact/Check_Shape_Trap.xml +++ b/examples/ClientTests/compact/Check_Shape_Trap.xml @@ -12,7 +12,7 @@ <position x="30*cm" y="30*cm" z="50*cm"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Trap.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trap.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Trapezoid.xml b/examples/ClientTests/compact/Check_Shape_Trapezoid.xml index c4fd280b05f56c2c233e51a27e5de9bf74ca30a6..e1c1595ecd990e3ed9873f75418f46b42c7c117c 100644 --- a/examples/ClientTests/compact/Check_Shape_Trapezoid.xml +++ b/examples/ClientTests/compact/Check_Shape_Trapezoid.xml @@ -10,7 +10,7 @@ <position x="30" y="30" z="50"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Trapezoid.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Trapezoid.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_TruncatedTube.xml b/examples/ClientTests/compact/Check_Shape_TruncatedTube.xml index e88a19bc60ab6b35208656f1ef463067c31cfeee..d7f3baa6ecdd8f3c5c59a159de47c70ce2793b30 100644 --- a/examples/ClientTests/compact/Check_Shape_TruncatedTube.xml +++ b/examples/ClientTests/compact/Check_Shape_TruncatedTube.xml @@ -54,7 +54,7 @@ </check> --> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_TruncatedTube.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_TruncatedTube.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/compact/Check_Shape_Tube.xml b/examples/ClientTests/compact/Check_Shape_Tube.xml index 998a697c2074512c3b290755df916d22265d7de7..25375097854c3bb2b3b65c1f611ca68f08b50a76 100644 --- a/examples/ClientTests/compact/Check_Shape_Tube.xml +++ b/examples/ClientTests/compact/Check_Shape_Tube.xml @@ -16,7 +16,7 @@ <position x="30" y="30" z="-50"/> <rotation x="0" y="0" z="0"/> </check> - <test type="DD4hep_Mesh_Verifier" ref="${DD4hepINSTALL}/examples/ClientTests/ref/Ref_Tube.txt" create="CheckShape_create"/> + <test type="DD4hep_Mesh_Verifier" ref="${DD4hepExamplesINSTALL}/examples/ClientTests/ref/Ref_Tube.txt" create="CheckShape_create"/> </detector> </detectors> </lccdd> diff --git a/examples/ClientTests/scripts/Assemblies.py b/examples/ClientTests/scripts/Assemblies.py index b69142e4d6a370d4a620f0c41bb8894b150a2446..ccc6050c2406af11087217dca7e94a2468a0d4d6 100644 --- a/examples/ClientTests/scripts/Assemblies.py +++ b/examples/ClientTests/scripts/Assemblies.py @@ -10,7 +10,7 @@ from SystemOfUnits import * """ def run(): kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] kernel.loadGeometry("file:"+install_dir+"/examples/ClientTests/compact/Assemblies.xml") # geant4 = DDG4.Geant4(kernel,tracker='Geant4TrackerCombineAction') diff --git a/examples/ClientTests/scripts/LheD_tracker.py b/examples/ClientTests/scripts/LheD_tracker.py index 1fafd3e633e895e627df7e3c09fe372871bf7324..85f7026d63db0eea9503556c96f8b2495d7dfcc6 100644 --- a/examples/ClientTests/scripts/LheD_tracker.py +++ b/examples/ClientTests/scripts/LheD_tracker.py @@ -17,7 +17,7 @@ def run(): kernel = DDG4.Kernel() description = kernel.detectorDescription() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] kernel.loadGeometry("file:"+install_dir+"/examples/ClientTests/compact/LheD_tracker.xml") DDG4.importConstants(description,debug=False) diff --git a/examples/ClientTests/scripts/MiniTelSetup.py b/examples/ClientTests/scripts/MiniTelSetup.py index 41d9c63f222617832c877175b332a08a928438e7..5957fea1a379f9fd78da8448dccc68d41d9f97ac 100644 --- a/examples/ClientTests/scripts/MiniTelSetup.py +++ b/examples/ClientTests/scripts/MiniTelSetup.py @@ -9,7 +9,7 @@ import os, time, DDG4TestSetup """ class Setup(DDG4TestSetup.Setup): def __init__(self): - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] DDG4TestSetup.Setup.__init__(self, "file:"+install_dir+"/examples/ClientTests/compact/MiniTel.xml") def configure(self): diff --git a/examples/ClientTests/scripts/MultiCollections.py b/examples/ClientTests/scripts/MultiCollections.py index 60abad01e7e791a42533dffeb6b7bb762e0cb66c..c6fd05f831dca625212bbf4b23186a4f2ff7bf1f 100644 --- a/examples/ClientTests/scripts/MultiCollections.py +++ b/examples/ClientTests/scripts/MultiCollections.py @@ -14,7 +14,7 @@ from SystemOfUnits import * def run(): batch = False kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] geometry = "file:"+install_dir+"/examples/ClientTests/compact/MultiCollections.xml" kernel.setOutputLevel('Geant4Converter',Output.DEBUG) kernel.setOutputLevel('Gun',Output.INFO) diff --git a/examples/ClientTests/scripts/MultiSegmentCollections.py b/examples/ClientTests/scripts/MultiSegmentCollections.py index 909022d32605891b7b6b02a962aceeb626b7b56d..ceb86b584c08bc41edaa369288757eccbb874ed1 100644 --- a/examples/ClientTests/scripts/MultiSegmentCollections.py +++ b/examples/ClientTests/scripts/MultiSegmentCollections.py @@ -14,7 +14,7 @@ from SystemOfUnits import * def run(): batch = False kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] geometry = "file:"+install_dir+"/examples/ClientTests/compact/MultiSegmentCollections.xml" kernel.setOutputLevel('Geant4Converter',Output.DEBUG) kernel.setOutputLevel('Gun',Output.INFO) diff --git a/examples/ClientTests/scripts/NestedDetectors.py b/examples/ClientTests/scripts/NestedDetectors.py index 8d76e368fe1f1230bc3f04911eb09973bef02a97..c2a3f66b0164c28807e018087d31daeb4006017b 100644 --- a/examples/ClientTests/scripts/NestedDetectors.py +++ b/examples/ClientTests/scripts/NestedDetectors.py @@ -13,7 +13,7 @@ from SystemOfUnits import * """ def run(): kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] kernel.setOutputLevel('Geant4Converter',Output.DEBUG) kernel.setOutputLevel('Gun',Output.INFO) kernel.loadGeometry("file:"+install_dir+"/examples/ClientTests/compact/NestedDetectors.xml") diff --git a/examples/ClientTests/scripts/SiliconBlock.py b/examples/ClientTests/scripts/SiliconBlock.py index 832e367aa870eb40d56a7648ee96e6525a092f5a..19eeb9885872e26595048716eb96da36a995b5f7 100644 --- a/examples/ClientTests/scripts/SiliconBlock.py +++ b/examples/ClientTests/scripts/SiliconBlock.py @@ -15,7 +15,7 @@ from SystemOfUnits import * """ def run(): kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] kernel.loadGeometry("file:"+install_dir+"/examples/ClientTests/compact/SiliconBlock.xml") DDG4.importConstants(kernel.detectorDescription(),debug=False) diff --git a/examples/ClientTests/scripts/TrackingRegion.py b/examples/ClientTests/scripts/TrackingRegion.py index 4ef8ed79a47846ef57fca1dfc84a9af67bcc5a6e..304f8ff4991452b07dfd6e2543eb176fe830ea0f 100644 --- a/examples/ClientTests/scripts/TrackingRegion.py +++ b/examples/ClientTests/scripts/TrackingRegion.py @@ -12,7 +12,7 @@ import os, sys, time, DDG4 """ def run(): kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] kernel.loadGeometry("file:"+install_dir+"/examples/ClientTests/compact/TrackingRegion.xml") geant4 = DDG4.Geant4(kernel,tracker='Geant4TrackerCombineAction') # Configure field diff --git a/examples/Conditions/CMakeLists.txt b/examples/Conditions/CMakeLists.txt index 4ebf36f206c399613fbf5c16207e45c768f33ad7..9bd9ff7711eb55e59522959922276ad05d315de2 100644 --- a/examples/Conditions/CMakeLists.txt +++ b/examples/Conditions/CMakeLists.txt @@ -29,8 +29,8 @@ dd4hep_configure_scripts ( Conditions DEFAULT_SETUP WITH_TESTS ) dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_pool COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -volmgr -destroy - -compact file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml - -plugin DD4hep_ConditionsXMLRepositoryParser file:${DD4hep_DIR}/examples/Conditions/data/repository.xml + -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml + -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml -plugin DD4hep_ConditionsDump REGEX_PASS "Data\\(Translation-Rotation-Pivot\\): \\[\\( 0 , 0 , 1 \\), \\{phi\\(Z angle\\): 3.14159 theta\\(Y angle\\): 0 psi\\(X angle\\): 0\\}, \\( 0 , 0 , 0 \\)\\]" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -40,8 +40,8 @@ dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_pool dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_detelement COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -volmgr -destroy - -compact file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml - -plugin DD4hep_ConditionsXMLRepositoryParser file:${DD4hep_DIR}/examples/Conditions/data/repository.xml + -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml + -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml -plugin DD4hep_DetElementConditionsDump REGEX_PASS "Path\\:/world/Telescope/module_9#alignment" REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -51,7 +51,7 @@ dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_detelement dd4hep_add_test_reg( Conditions_Telescope_populate COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_populate - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 5 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 5 REGEX_PASS "Accessed a total of 800 conditions \\(S: 500,L: 0,C: 300,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -60,7 +60,7 @@ dd4hep_add_test_reg( Conditions_Telescope_populate dd4hep_add_test_reg( Conditions_Telescope_stress COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_stress - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 10 -runs 20 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10 -runs 20 REGEX_PASS "\\+ Accessed a total of 3200 conditions \\(S: 2660,L: 0,C: 540,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -69,7 +69,7 @@ dd4hep_add_test_reg( Conditions_Telescope_stress dd4hep_add_test_reg( Conditions_Telescope_stress2 COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_stress2 - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 10 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10 REGEX_PASS "\\+ Accessed a total of 1600 conditions \\(S: 1000,L: 0,C: 600,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -78,7 +78,7 @@ dd4hep_add_test_reg( Conditions_Telescope_stress2 dd4hep_add_test_reg( Conditions_Telescope_MT_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -destroy -plugin DD4hep_ConditionExample_MT - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 30 -runs 10 -threads 1 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 30 -runs 10 -threads 1 REGEX_PASS "\\+ Accessed a total of 286400 conditions \\(S:268400,L: 0,C: 18000,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -87,7 +87,7 @@ dd4hep_add_test_reg( Conditions_Telescope_MT_LONGTEST dd4hep_add_test_reg( Conditions_Telescope_root_save COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_save - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml -iovs 30 + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 30 -conditions TelescopeConditions.root REGEX_PASS "\\+ Successfully saved 14400 condition to file." REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -97,7 +97,7 @@ dd4hep_add_test_reg( Conditions_Telescope_root_save dd4hep_add_test_reg( Conditions_Telescope_root_load_iov COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -conditions TelescopeConditions.root -iovs 30 -restore iovpool DEPENDS Conditions_Telescope_root_save REGEX_PASS "\\+ Accessed a total of 4800 conditions \\(S: 4800,L: 0,C: 0,M:0\\)" @@ -108,7 +108,7 @@ dd4hep_add_test_reg( Conditions_Telescope_root_load_iov dd4hep_add_test_reg( Conditions_Telescope_root_load_usr COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -conditions TelescopeConditions.root -iovs 30 -restore userpool DEPENDS Conditions_Telescope_root_save REGEX_PASS "\\+ Accessed a total of 4800 conditions \\(S: 4800,L: 0,C: 0,M:0\\)" @@ -119,7 +119,7 @@ dd4hep_add_test_reg( Conditions_Telescope_root_load_usr dd4hep_add_test_reg( Conditions_Telescope_root_load_pool COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" EXEC_ARGS geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load - -input file:${DD4hep_DIR}/examples/AlignDet/compact/Telescope.xml + -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -conditions TelescopeConditions.root -iovs 30 -restore condpool DEPENDS Conditions_Telescope_root_save REGEX_PASS "\\+ Accessed a total of 4800 conditions \\(S: 4800,L: 0,C: 0,M:0\\)" @@ -130,7 +130,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 10 -runs 100 + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 10 -runs 100 REGEX_PASS "\\+ Accessed a total of 28008800 conditions \\(S:26958470,L: 0,C:1050330,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -139,7 +139,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 20 + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 20 REGEX_PASS "\\+ Accessed a total of 5601760 conditions \\(S:3501100,L: 0,C:2100660,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -148,7 +148,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 3 -runs 2 -threads 1 + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 3 -runs 2 -threads 1 REGEX_PASS "\\+ Accessed a total of 9522992 conditions \\(S:8892794,L: 0,C:630198,M:0\\)" REGEX_FAIL " ERROR ;EXCEPTION;Exception" ) @@ -157,7 +157,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 3 + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 3 -conditions CLICSiDConditions.root REGEX_PASS "\\+ Successfully saved 2520792 condition to file." REGEX_FAIL " ERROR ;EXCEPTION;Exception" @@ -167,7 +167,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 3 -restore iovpool + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 3 -restore iovpool -conditions CLICSiDConditions.root DEPENDS Conditions_CLICSiD_root_save_LONGTEST REGEX_PASS "\\+ Accessed a total of 840264 conditions \\(S:840264,L: 0,C: 0,M:0\\)" @@ -178,7 +178,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 3 -restore userpool + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 3 -restore userpool -conditions CLICSiDConditions.root DEPENDS Conditions_CLICSiD_root_save_LONGTEST REGEX_PASS "\\+ Accessed a total of 840264 conditions \\(S:840264,L: 0,C: 0,M:0\\)" @@ -189,7 +189,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:${DD4hep_DIR}/examples/CLICSiD/compact/compact.xml -iovs 3 -restore condpool + -input file:${CMAKE_INSTALL_PREFIX}/examples/CLICSiD/compact/compact.xml -iovs 3 -restore condpool -conditions CLICSiDConditions.root DEPENDS Conditions_CLICSiD_root_save_LONGTEST REGEX_PASS "\\+ Accessed a total of 840264 conditions \\(S:840264,L: 0,C: 0,M:0\\)" diff --git a/examples/DDCodex/CMakeLists.txt b/examples/DDCodex/CMakeLists.txt index 4077e3866dd4e5344b6f21815de4db9495b06cbf..07f92ccc4408694a7f37b9cf9e043c358dd712b0 100644 --- a/examples/DDCodex/CMakeLists.txt +++ b/examples/DDCodex/CMakeLists.txt @@ -25,8 +25,8 @@ dd4hep_add_plugin(DDCodexPlugins ) # # -dd4hep_install_dir( compact python DESTINATION ${DD4hep_DIR}/examples/DDCodex ) -dd4hep_install_files(FILES Upgrade.root DESTINATION ${DD4hep_DIR}/examples/DDCodex ) +dd4hep_install_dir( compact python DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/DDCodex ) +dd4hep_install_files(FILES Upgrade.root DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/DDCodex ) #-------------------------------------------------------------------------- # dd4hep_configure_scripts ( DDCodex DEFAULT_SETUP WITH_TESTS ) diff --git a/examples/DDDB/scripts/extract_dddb.sh b/examples/DDDB/scripts/extract_dddb.sh index 62ee24fe17c0057590be226e1df1e148419f7976..c2d06b04d9d7865e9026e1253dfdcd6eeb14009e 100755 --- a/examples/DDDB/scripts/extract_dddb.sh +++ b/examples/DDDB/scripts/extract_dddb.sh @@ -1,5 +1,4 @@ #!/bin/bash -# $Id$ #========================================================================== # AIDA Detector description implementation #-------------------------------------------------------------------------- @@ -23,7 +22,7 @@ if test -n "$USER"; then else target=/tmp; fi; -source=${DD4hepINSTALL}/examples/DDDB/DDDB.tar.gz; +source=${DD4hepExamplesINSTALL}/examples/DDDB/DDDB.tar.gz; clean="NO"; # # Check for arguments: diff --git a/examples/DDG4/CMakeLists.txt b/examples/DDG4/CMakeLists.txt index 6555e6789b054fc372c555d08437f15af84a656b..7ca766b2440d19903834ec31c6abf16b6e4eea84 100644 --- a/examples/DDG4/CMakeLists.txt +++ b/examples/DDG4/CMakeLists.txt @@ -37,7 +37,7 @@ if (DD4HEP_USE_GEANT4) ) # # - dd4hep_install_dir(data DESTINATION ${DD4hep_DIR}/examples/DDG4 ) + dd4hep_install_dir(data DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/DDG4 ) # dd4hep_configure_scripts (DDG4 DEFAULT_SETUP WITH_TESTS) # @@ -45,7 +45,7 @@ if (DD4HEP_USE_GEANT4) dd4hep_add_test_reg( test_DDG4_HepMC_reader COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_DDG4.sh" EXEC_ARGS python ${DD4hep_DIR}/examples/DDG4/examples/readHEPMC.py - ${DD4hep_DIR}/examples/DDG4/data/hepmc_geant4.dat + ${CMAKE_INSTALL_PREFIX}/examples/DDG4/data/hepmc_geant4.dat REQUIRES DDG4 Geant4 REGEX_PASS "EventReaderHepMC::moveToEvent INFO Current event number: 9") endif() diff --git a/examples/LHeD/CMakeLists.txt b/examples/LHeD/CMakeLists.txt index 32901ecbe0a1ff37db3a981bf644362d1c48b26f..17a775f42320f8a7f067158e209c76e39006a0fd 100644 --- a/examples/LHeD/CMakeLists.txt +++ b/examples/LHeD/CMakeLists.txt @@ -17,7 +17,8 @@ dd4hep_package ( LHeD MAJOR 0 MINOR 0 PATCH 1 USES [ROOT REQUIRED COMPONENTS Geom GenVector MathCore] [DD4hep REQUIRED COMPONENTS DDRec DDCore DDCond DDAlign] ) -dd4hep_install_dir( src compact scripts sim DESTINATION ${DD4hep_DIR}/examples/LHeD ) +set(LHeDEx_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/LHeD) +dd4hep_install_dir( src compact scripts sim DESTINATION ${LHeDEx_INSTALL} ) #----------------------------------------------------------------------------------- set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) @@ -41,7 +42,7 @@ foreach ( typ description gdml vis ) dd4hep_add_test_reg ( "LHeD_converter_${typ}_LONGTEST" COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_LHeD.sh" EXEC_ARGS geoConverter -compact2${typ} - -input file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + -input file:${LHeDEx_INSTALL}/compact/compact.xml -output file:LHeD.${typ} REGEX_PASS " Handled [1-9][0-9][0-9]+ volumes" ) endforeach() @@ -50,7 +51,7 @@ endforeach() dd4hep_add_test_reg( LHeD_check_geometry_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_LHeD.sh" EXEC_ARGS python ${DD4hep_DIR}/python/checkGeometry.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + --compact=file:${LHeDEx_INSTALL}/compact/compact.xml # This takes too long --full=true --ntracks=10 --option=o --vx=0 --vy=0 --vz=0 REGEX_PASS " Execution finished..." ) # @@ -58,7 +59,7 @@ dd4hep_add_test_reg( LHeD_check_geometry_LONGTEST dd4hep_add_test_reg( LHeD_check_overlaps_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_LHeD.sh" EXEC_ARGS python ${DD4hep_DIR}/python/checkOverlaps.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + --compact=file:${LHeDEx_INSTALL}/compact/compact.xml --tolerance=0.1 REGEX_PASS " Execution finished..." ) # @@ -70,7 +71,7 @@ if (DD4HEP_USE_GEANT4) foreach(script LHeDMagField LHeDPhysics LHeDRandom LHeDScan) dd4hep_add_test_reg( LHeD_DDG4_${script}_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_LHeD.sh" - EXEC_ARGS python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/${script}.py + EXEC_ARGS python ${LHeDEx_INSTALL}/scripts/${script}.py REQUIRES DDG4 Geant4 REGEX_PASS "TEST_PASSED" REGEX_FAIL "Exception;EXCEPTION;ERROR" ) @@ -80,7 +81,7 @@ if (DD4HEP_USE_GEANT4) dd4hep_add_test_reg( LHeD_DDG4_g4material_scan_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_LHeD.sh" EXEC_ARGS python ${DD4hep_DIR}/python/g4MaterialScan.py - --compact=file:${CMAKE_CURRENT_SOURCE_DIR}/compact/compact.xml + --compact=file:${LHeDEx_INSTALL}/compact/compact.xml "--position=0,0,0" "--direction=0,1,0" REQUIRES DDG4 Geant4 REGEX_PASS " Terminate Geant4 and delete associated actions." ) @@ -91,7 +92,7 @@ if (DD4HEP_USE_GEANT4) # Build ACLick from the source file dd4hep_add_test_reg( LHeD_DDG4_${script}_as_ACLick_LONGTEST COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_LHeD.sh" - EXEC_ARGS root.exe -b -x -n -q -l "${CMAKE_CURRENT_SOURCE_DIR}/scripts/run.C(\"${DD4hep_DIR}/examples/LHeD/scripts/${script}\")" + EXEC_ARGS root.exe -b -x -n -q -l "${LHeDEx_INSTALL}/scripts/run.C(\"${LHeDEx_INSTALL}/scripts/${script}\")" REQUIRES DDG4 Geant4 REGEX_PASS "UserEvent_1 INFO Geant4TestEventAction> calling end.event_id=9" REGEX_FAIL "Exception;EXCEPTION;ERROR;Error" ) diff --git a/examples/LHeD/compact/compact_Lhe_dip_sol_ell.xml b/examples/LHeD/compact/compact_Lhe_dip_sol_ell.xml index 3481350deef9cc59406bd51eccda68503276eb83..84193b1f203e24d5dd69ded5a05b13c56cffa325 100644 --- a/examples/LHeD/compact/compact_Lhe_dip_sol_ell.xml +++ b/examples/LHeD/compact/compact_Lhe_dip_sol_ell.xml @@ -36,7 +36,7 @@ </includes> <define> - <constant name="Lhe_Detector_dir" value="${DD4hepINSTALL}/examples/LHeD/" type="string"/>; + <constant name="Lhe_Detector_dir" value="${DD4hepExamplesINSTALL}/examples/LHeD/" type="string"/>; <constant name="world_side" value="20.*m"/> <constant name="world_x" value="world_side"/> <constant name="world_y" value="world_side"/> diff --git a/examples/LHeD/scripts/LHeD.py b/examples/LHeD/scripts/LHeD.py index b1645b3083bc8ca389ab646b79b20c94686a3211..9873f57b19b67355031654e677838bbc3141f9c9 100644 --- a/examples/LHeD/scripts/LHeD.py +++ b/examples/LHeD/scripts/LHeD.py @@ -11,7 +11,7 @@ class LHeD: def loadGeometry(self): import os - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] self.kernel.loadGeometry("file:"+install_dir+"/examples/LHeD/compact/compact_Lhe_dip_sol_ell.xml") return self diff --git a/examples/LHeD/scripts/LHeDACLick.C b/examples/LHeD/scripts/LHeDACLick.C index c2de909b25983f439c8bae4c75b3d156bc4714e9..08f433c065054894ccf0e57efc520ab730cb3fc1 100644 --- a/examples/LHeD/scripts/LHeDACLick.C +++ b/examples/LHeD/scripts/LHeDACLick.C @@ -44,7 +44,7 @@ Geant4SensDetActionSequence* setupDetector(Geant4Kernel& kernel, const std::stri int setupG4_CINT(bool interactive) { Geant4Kernel& kernel = Geant4Kernel::instance(Detector::getInstance()); - string install_dir = getenv("DD4hepINSTALL"); + string install_dir = getenv("DD4hepExamplesINSTALL"); Phase p; kernel.loadGeometry(("file:"+install_dir+"/examples/LHeD/compact/compact.xml").c_str()); diff --git a/examples/LHeD/scripts/LHeDScan.py b/examples/LHeD/scripts/LHeDScan.py index 67ff46594c726a17da4bf92135c96ed0719fcecc..7b50c7dbd8f6ec6f52d9cd3a48ffb0beb40f864b 100644 --- a/examples/LHeD/scripts/LHeDScan.py +++ b/examples/LHeD/scripts/LHeDScan.py @@ -11,7 +11,7 @@ def run(): logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG) kernel = DDG4.Kernel() - install_dir = os.environ['DD4hepINSTALL'] + install_dir = os.environ['DD4hepExamplesINSTALL'] kernel.loadGeometry("file:"+install_dir+"/examples/LHeD/compact/compact.xml") DDG4.Core.setPrintFormat("%-32s %6s %s") geant4 = DDG4.Geant4(kernel) diff --git a/examples/LHeD/scripts/LHeDXML.C b/examples/LHeD/scripts/LHeDXML.C index 69d6775a94cec759b45cd903b62bfdc87b92b474..10b6b881eb1d4d2f471a374a533cc4c710cf8fe1 100644 --- a/examples/LHeD/scripts/LHeDXML.C +++ b/examples/LHeD/scripts/LHeDXML.C @@ -27,7 +27,7 @@ using namespace dd4hep::sim; using namespace dd4hep::sim::Setup; int setupG4_XML(bool interactive) { - string install_dir = getenv("DD4hepINSTALL"); + string install_dir = getenv("DD4hepExamplesINSTALL"); string prefix = "file:"+install_dir+"/examples/"; Kernel& kernel = Kernel::instance(dd4hep::Detector::getInstance()); kernel.loadGeometry((prefix+"LHeD/compact/compact.xml").c_str()); diff --git a/examples/LHeD/scripts/run.C b/examples/LHeD/scripts/run.C index 2e063b630ee62a946bdd0509f62b54fa573143b7..de0e22d52e24f85e58b38f1c37e6acb10e022a9c 100644 --- a/examples/LHeD/scripts/run.C +++ b/examples/LHeD/scripts/run.C @@ -9,7 +9,7 @@ void run(const char* macro) { int status; char cmd[1024]; - const char* dd4hep_install = getenv("DD4hepINSTALL"); + const char* dd4hep_install = getenv("DD4hepExamplesINSTALL"); const char* dd4hep = getenv("DD4hep"); if ( dd4hep_install ) { ::sprintf(cmd,".L %s/examples/LHeD/scripts/initAClick.C+",dd4hep_install); diff --git a/examples/SimpleDetector/CMakeLists.txt b/examples/SimpleDetector/CMakeLists.txt index a1f35438b5d4b333be112cb9bbfc6c4262549997..d1efb9cb3641d2f418dfaa25931d5dc8a3e968a0 100644 --- a/examples/SimpleDetector/CMakeLists.txt +++ b/examples/SimpleDetector/CMakeLists.txt @@ -21,7 +21,7 @@ dd4hep_package (SimpleDetector MAJOR 0 MINOR 0 PATCH 1 #----------------------------------------------------------------------------------- dd4hep_add_plugin(SimpleDetector SOURCES src/*.cpp) -dd4hep_install_dir(compact DESTINATION ${DD4hep_DIR}/examples/ClientTests) +dd4hep_install_dir(compact DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/ClientTests) #----------------------------------------------------------------------------------- dd4hep_configure_scripts(SimpleDetector DEFAULT_SETUP WITH_TESTS)