diff --git a/cmake/MakeRootMap.cmake b/cmake/MakeRootMap.cmake index 731273eb56219cddaaf895c9583ac1ab9590ce44..452689a081ef2546f9791f662463a84a34011ae6 100644 --- a/cmake/MakeRootMap.cmake +++ b/cmake/MakeRootMap.cmake @@ -2,12 +2,13 @@ message(STATUS " *** ROOT_genmap[Root version: ${ROOT_VERSION_MAJOR}]: Generate if( ${ROOT_VERSION_MAJOR} GREATER 5 ) # # Running listcomponents from Gaudi - # + # FIND_PROGRAM( ROOT_genmap_CMD listcomponents PATHS ${genmap_install_dir}/../bin ${DD4hep_DIR}/bin ) ###MESSAGE( STATUS " *** MakeRootMap ${genmap_install_dir}/../bin $ENV{DD4hep_DIR}/bin ${DD4hep_DIR}" ) MESSAGE( STATUS " *** MakeRootMap[${ROOT_VERSION_MAJOR}].cmake run command : ${ROOT_genmap_CMD} -o ${rootmapfile} ${libname} WORKING_DIRECTORY ${genmap_install_dir} " - ) + ) + if(APPLE) SET ( ENV{DYLD_LIBRARY_PATH} ${genmap_install_dir}:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH} ) else() @@ -29,8 +30,7 @@ else() ) if(APPLE) - #MESSAGE( STATUS " set DYLD_LIBRARY_PATH to ./:$ENV{DYLD_LIBRARY_PATH} " ) - SET ( ENV{DYLD_LIBRARY_PATH} ./:$ENV{DYLD_LIBRARY_PATH}:$ENV{ROOTSYS}/lib:${genmap_install_dir} ) + SET ( ENV{DYLD_LIBRARY_PATH} ./:$ENV{DYLD_LIBRARY_PATH}:$ENV{DD4HEP_LIBRARY_PATH}:$ENV{ROOTSYS}/lib:${genmap_install_dir} ) else() SET ( ENV{LD_LIBRARY_PATH} ./:$ENV{LD_LIBRARY_PATH}:$ENV{ROOTSYS}/lib:${genmap_install_dir} ) endif() diff --git a/examples/AlignDet/CMakeLists.txt b/examples/AlignDet/CMakeLists.txt index d07c95a2631625a560db0b31743922e164e5401b..023deeec911fca4552c972afe7231ad3edf5733a 100644 --- a/examples/AlignDet/CMakeLists.txt +++ b/examples/AlignDet/CMakeLists.txt @@ -25,6 +25,14 @@ dd4hep_add_plugin( AlignDet SOURCES src/*.cpp ) dd4hep_install_dir( compact DESTINATION examples/AlignDet ) dd4hep_configure_scripts( AlignDet DEFAULT_SETUP WITH_TESTS) +# +#---Testing: Load Telescope geometry and read conditions ------------------ +dd4hep_add_test_reg( test_DetAlign_Telescope_dump_geometry + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh" + EXEC_ARGS geoPluginRun -volmgr -destroy + -compact file:${CMAKE_CURRENT_SOURCE_DIR}/../AlignDet/compact/Telescope.xml + -plugin DD4hepDetectorDump + REGEX_PASS "DetectorDump INFO 003 /world/Telescope/module_9 #Dau\\:0 VolID\\:00000903") # #---Testing: Load ALEPH TPC geometry -------------------------------------- dd4hep_add_test_reg( test_DetAlign_AlephTPC_load diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 1e9303b6d6e303d92efe2b2146a649eda42f60c6..c70d8454a4dcf4da69156a59fa9bb98abca1c0e3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -40,6 +40,7 @@ dd4hep_package ( DD4hepExample MAJOR 0 MINOR 15 PATCH 0 dd4hep_enable_tests (AlignDet CLICSiD ClientTests + Conditions DDDB DDG4 SimpleDetector) diff --git a/examples/Conditions/CMakeLists.txt b/examples/Conditions/CMakeLists.txt index 05bad5ed3767c96f5f94de7b79c03283efe3dc27..738308143d59fc329fb6de1dbc495cfc65e51e88 100644 --- a/examples/Conditions/CMakeLists.txt +++ b/examples/Conditions/CMakeLists.txt @@ -12,20 +12,31 @@ cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR) include ( ${DD4hep_DIR}/cmake/DD4hep.cmake ) -#----------------------------------------------------------------------------------- +#-------------------------------------------------------------------------- dd4hep_configure_output () dd4hep_package ( CLICSiD MAJOR 0 MINOR 0 PATCH 1 USES [ROOT REQUIRED COMPONENTS Geom] [DD4hep REQUIRED COMPONENTS DDCore] ) dd4hep_install_dir( xml DESTINATION ${DD4hep_DIR}/examples/Conditions ) +dd4hep_configure_scripts ( Conditions DEFAULT_SETUP WITH_TESTS ) #-------------------------------------------------------------------------- -#if (DD4HEP_USE_GEANT4) -# dd4hep_add_executable(CLICSiDXML SOURCES scripts/CLICSiDXML.C -# USES [DD4hep REQUIRED COMPONENTS DDG4] GEANT4 ) -# #-------------------------------------------------------------------------- -# dd4hep_add_executable(CLICSiDAClick SOURCES scripts/CLICSiDAClick.C -# USES [DD4hep REQUIRED COMPONENTS DDG4] GEANT4 ) -#endif() # -dd4hep_configure_scripts ( Conditions DEFAULT_SETUP WITH_TESTS ) +#---Testing: Load Telescope geometry and read conditions ------------------ +dd4hep_add_test_reg( test_Conditions_Telescope_cond_dump_by_pool + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" + EXEC_ARGS geoPluginRun -volmgr -destroy + -compact file:${CMAKE_CURRENT_SOURCE_DIR}/../AlignDet/compact/Telescope.xml + -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_CURRENT_SOURCE_DIR}/data/repository.xml + -plugin DD4hep_ConditionsDump + REGEX_PASS "Data:\\[\\(0,0,29\\), \\{phi\\(Z angle\\)\\: 0 theta\\(Y angle\\)\\: 1.5708 psi\\(X angle\\)\\: 0\\} , 0 0 0 \\]") +# +# +#---Testing: Load Telescope geometry and read conditions ------------------ +dd4hep_add_test_reg( test_Conditions_Telescope_cond_dump_by_detelement + COMMAND "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh" + EXEC_ARGS geoPluginRun -volmgr -destroy + -compact file:${CMAKE_CURRENT_SOURCE_DIR}/../AlignDet/compact/Telescope.xml + -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_CURRENT_SOURCE_DIR}/data/repository.xml + -plugin DD4hep_DetElementConditionsDump + REGEX_PASS "Path\\:/world/Telescope/module_9#alignment") diff --git a/examples/Conditions/data/Module1_run-1000...2000.xml b/examples/Conditions/data/Modules_run-1000...2000.xml similarity index 55% rename from examples/Conditions/data/Module1_run-1000...2000.xml rename to examples/Conditions/data/Modules_run-1000...2000.xml index e6628b25d9c60c8da6a065f26b1806f39a372139..cac8e81dfaa19360b42de01396dc8eef56665dfd 100644 --- a/examples/Conditions/data/Module1_run-1000...2000.xml +++ b/examples/Conditions/data/Modules_run-1000...2000.xml @@ -30,4 +30,32 @@ <detelement path="/world/Telescope/module_5" ref="default_module.xml"> </detelement> + <detelement path="/world/Telescope/module_6"> + <alignment> + <position x="0" y="0" z="290.0*mm"/> + <rotation x="0" y="pi/2" z="0"/> + </alignment> + </detelement> + + <detelement path="/world/Telescope/module_7"> + <alignment> + <position x="0" y="0" z="290.0*mm"/> + <rotation x="0" y="pi/2" z="0"/> + </alignment> + </detelement> + + <detelement path="/world/Telescope/module_8"> + <alignment> + <position x="0" y="0" z="290.0*mm"/> + <rotation x="0" y="pi/2" z="0"/> + </alignment> + </detelement> + + <detelement path="/world/Telescope/module_9"> + <alignment> + <position x="0" y="0" z="290.0*mm"/> + <rotation x="0" y="pi/2" z="0"/> + </alignment> + </detelement> + </conditions> diff --git a/examples/Conditions/data/repository.xml b/examples/Conditions/data/repository.xml index f914194b2b047f283b629b8121c77d4035ee847b..e476e80c0f067a1a216309b8988c6f362fe88ac3 100644 --- a/examples/Conditions/data/repository.xml +++ b/examples/Conditions/data/repository.xml @@ -17,9 +17,6 @@ </repository> <repository> - <iov validity="1000,2000#run" ref="Module1_run-1000...2000.xml"/> -<!-- - <iov type="run" start="1000" end="2000" ref="module2_run-1000...2000.xml"/> ---> + <iov validity="1000,2000#run" ref="Modules_run-1000...2000.xml"/> </repository> </conditions>