Back to home page

EIC code displayed by LXR

 
 

    


Warning, /DD4hep/examples/Conditions/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 #==========================================================================
0002 #  AIDA Detector description implementation 
0003 #--------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 #
0010 #==========================================================================
0011 cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
0012 
0013 IF(NOT TARGET DD4hep::DDCore)
0014   find_package ( DD4hep REQUIRED )
0015   include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
0016   include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake )
0017   dd4hep_configure_output()
0018 ENDIF()
0019 
0020 dd4hep_set_compiler_flags()
0021 #==========================================================================
0022 
0023 if(TARGET XercesC::XercesC)
0024   SET(OPT_XERCESC XercesC::XercesC)
0025 endif()
0026   
0027 #-----------------------------------------------------------------------------------
0028 dd4hep_add_plugin(ConditionsExample SOURCES src/*.cpp
0029   USES  DD4hep::DDCore DD4hep::DDCond DD4hep::DDAlign
0030         ROOT::Core ROOT::Geom ROOT::GenVector
0031         ${OPT_XERCESC}
0032   )
0033 install(TARGETS ConditionsExample LIBRARY DESTINATION lib)
0034 dd4hep_install_dir( xml  DESTINATION examples/Conditions )
0035 dd4hep_install_dir( data DESTINATION examples/Conditions )
0036 dd4hep_configure_scripts ( Conditions DEFAULT_SETUP WITH_TESTS )
0037 #--------------------------------------------------------------------------
0038 #
0039 #---Testing: Load Telescope geometry and read conditions ------------------
0040 dd4hep_add_test_reg( Conditions_dynamic_payload
0041   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0042   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_Conditions_dynamic
0043   REGEX_PASS "Test PASSED"
0044   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0045   )
0046 #
0047 #---Testing: Load Telescope geometry and read conditions ------------------
0048 dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_pool
0049   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0050   EXEC_ARGS  geoPluginRun -volmgr -destroy 
0051   -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml 
0052   -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0053   -plugin DD4hep_ConditionsDump
0054   REGEX_PASS "Data\\(Translation-Rotation\\(Phi,Theta,Psi\\)-Pivot\\): \\[\\( 0 , 0 , 1 \\) \\[cm\\], \\( 3.14159265359 , 0 , 0 \\) \\[rad\\], \\( 0 , 0 , 0 \\) \\[cm\\]\\]"
0055   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0056   )
0057 #
0058 #---Testing: Load Telescope geometry and read conditions ------------------
0059 dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_detelement
0060   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0061   EXEC_ARGS  geoPluginRun -volmgr -destroy 
0062   -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml 
0063   -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0064   -plugin DD4hep_DetElementConditionsDump
0065   REGEX_PASS "Key\\:FA708B8A6E87AB8E Type\\:dd4hep\\:\\:Delta"
0066   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0067   )
0068 #
0069 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0070 dd4hep_add_test_reg( Conditions_Telescope_populate
0071   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0072   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_populate
0073       -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 5
0074   REGEX_PASS "Accessed a total of 1000 conditions \\(S:   600,L:     0,C:   400,M:0\\)"
0075   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0076   )
0077 #
0078 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0079 dd4hep_add_test_reg( Conditions_Telescope_stress
0080   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0081   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress 
0082     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10 -runs 20
0083   REGEX_PASS "\\+  Accessed a total of 4000 conditions \\(S:  3280,L:     0,C:   720,M:0\\)"
0084   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0085   )
0086 #
0087 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0088 dd4hep_add_test_reg( Conditions_Telescope_stress2
0089   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0090   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress2 
0091     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10
0092   REGEX_PASS "\\+  Accessed a total of 2000 conditions \\(S:  1200,L:     0,C:   800,M:0\\)"
0093   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0094   )
0095 #
0096 #---Testing: Multi-threading test: Load CLICSiD geometry and have multiple parallel runs on IOVs
0097 dd4hep_add_test_reg( Conditions_Telescope_MT_LONGTEST
0098   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0099   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_MT 
0100     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 30 -runs 10 -threads 1
0101   REGEX_PASS "\\+  Accessed a total of 358000 conditions \\(S:334000,L:     0,C: 24000,M:0\\)"
0102   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0103   )
0104 #
0105 #---Testing: Save conditions to ROOT file
0106 dd4hep_add_test_reg( Conditions_Telescope_root_save
0107   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0108   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_save
0109     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 30
0110     -conditions TelescopeConditions.root
0111   REGEX_PASS "\\+ Successfully saved 16200 condition to file."
0112   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0113   )
0114 #
0115 #---Testing: Save conditions to ROOT file
0116 dd4hep_add_test_reg( Conditions_Telescope_root_load_iov
0117   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0118   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0119     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml
0120     -conditions TelescopeConditions.root -iovs 30 -restore iovpool
0121   DEPENDS Conditions_Telescope_root_save
0122   REGEX_PASS "\\+  Accessed a total of 6000 conditions \\(S:  5400,L:     0,C:   600,M:0\\)"
0123   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0124   )
0125 #
0126 #---Testing: Save conditions to ROOT file
0127 dd4hep_add_test_reg( Conditions_Telescope_root_load_usr
0128   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0129   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0130     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml
0131     -conditions TelescopeConditions.root -iovs 30 -restore userpool
0132   DEPENDS Conditions_Telescope_root_save
0133   REGEX_PASS "\\+  Accessed a total of 6000 conditions \\(S:  5400,L:     0,C:   600,M:0\\)"
0134   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0135   )
0136 #
0137 #---Testing: Load conditions from ROOT file
0138 dd4hep_add_test_reg( Conditions_Telescope_root_load_pool
0139   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0140   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0141     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml
0142     -conditions TelescopeConditions.root -iovs 30 -restore condpool
0143   DEPENDS Conditions_Telescope_root_save
0144   REGEX_PASS "\\+  Accessed a total of 6000 conditions \\(S:  5400,L:     0,C:   600,M:0\\)"
0145   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0146   )
0147 #
0148 #---Testing: Attempt to build unresolved conditions object
0149 dd4hep_add_test_reg( Conditions_Telescope_unresolved
0150   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0151   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_populate
0152       -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 1 -extend 100
0153   REGEX_PASS "Condition: /world/Telescope/module_6#Unresolved_dependency dependent on missing condition"
0154   )
0155 #
0156 #---Testing: Simple stress: Load CLICSiD geometry and have multiple runs on IOVs
0157 dd4hep_add_test_reg( Conditions_CLICSiD_stress_LONGTEST
0158   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0159   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress 
0160     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100
0161   REGEX_PASS "\\+  Accessed a total of 35107000 conditions \\(S:33702720,L:     0,C:1404280,M:0\\)"
0162   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0163   )
0164 #
0165 #---Testing: Simple stress: Load CLICSiD geometry and have multiple runs on IOVs
0166 dd4hep_add_test_reg( Conditions_CLICSiD_stress2_LONGTEST
0167   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0168   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress2 
0169     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 20
0170   REGEX_PASS "\\+  Accessed a total of 7021400 conditions \\(S:4212840,L:     0,C:2808560,M:0\\)"
0171   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0172   )
0173 #
0174 #---Testing: Multi-threading test: Load CLICSiD geometry and have multiple parallel runs on IOVs
0175 dd4hep_add_test_reg( Conditions_CLICSiD_MT_LONGTEST
0176   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0177   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_MT 
0178     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -runs 2 -threads 1
0179   REGEX_PASS "\\+  Accessed a total of 11936380 conditions \\(S:11093812,L:     0,C:842568,M:0\\)"
0180   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0181   )
0182 #
0183 #---Testing: Save conditions to ROOT file
0184 dd4hep_add_test_reg( Conditions_CLICSiD_root_save_LONGTEST
0185   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0186   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_save
0187     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3
0188     -conditions CLICSiDConditions.root
0189   REGEX_PASS "\\+ Successfully saved 2843667 condition to file."
0190   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0191   )
0192 #
0193 #---Testing: Save conditions to ROOT file
0194 dd4hep_add_test_reg( Conditions_CLICSiD_root_load_iov_LONGTEST
0195   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0196   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0197     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore iovpool
0198     -conditions CLICSiDConditions.root
0199   DEPENDS Conditions_CLICSiD_root_save_LONGTEST
0200   REGEX_PASS "\\+  Accessed a total of 1053210 conditions \\(S:947889,L:     0,C:105321,M:0\\)"
0201   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0202   )
0203 #
0204 #---Testing: Save conditions to ROOT file
0205 dd4hep_add_test_reg( Conditions_CLICSiD_root_load_usr_LONGTEST
0206   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0207   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0208     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore userpool
0209     -conditions CLICSiDConditions.root
0210   DEPENDS Conditions_CLICSiD_root_save_LONGTEST
0211   REGEX_PASS "\\+  Accessed a total of 1053210 conditions \\(S:947889,L:     0,C:105321,M:0\\)"
0212   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0213   )
0214 #
0215 #---Testing: Save conditions to ROOT file
0216 dd4hep_add_test_reg( Conditions_CLICSiD_root_load_cond_LONGTEST
0217   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0218   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0219     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore condpool
0220     -conditions CLICSiDConditions.root
0221   DEPENDS Conditions_CLICSiD_root_save_LONGTEST
0222   REGEX_PASS "\\+  Accessed a total of 1053210 conditions \\(S:947889,L:     0,C:105321,M:0\\)"
0223   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0224   )
0225 #
0226 #---Testing: Basic test using std::any as conditions payload
0227 dd4hep_add_test_reg( Conditions_any_basic
0228   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0229   EXEC_ARGS  geoPluginRun -print INFO -destroy -plugin DD4hep_Conditions_any_basic
0230   REGEX_PASS "Test PASSED"
0231   REGEX_FAIL "Test FAILED"
0232   )
0233 #
0234 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0235 dd4hep_add_test_reg( Conditions_any_Telescope_populate
0236   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0237   EXEC_ARGS  geoPluginRun  -destroy -print WARNING -plugin DD4hep_ConditionAnyExample_populate
0238       -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 2 -extend 1
0239   REGEX_PASS "\\+ Analyzed 1360 any object/elements"
0240   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0241   )