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 dd4hep_install_dir( xml  DESTINATION examples/Conditions )
0034 dd4hep_install_dir( data DESTINATION examples/Conditions )
0035 dd4hep_configure_scripts ( Conditions DEFAULT_SETUP WITH_TESTS )
0036 #--------------------------------------------------------------------------
0037 #
0038 #---Testing: Load Telescope geometry and read conditions ------------------
0039 dd4hep_add_test_reg( Conditions_dynamic_payload
0040   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0041   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_Conditions_dynamic
0042   REGEX_PASS "Test PASSED"
0043   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0044   )
0045 #
0046 #---Testing: Load Telescope geometry and read conditions ------------------
0047 dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_pool
0048   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0049   EXEC_ARGS  geoPluginRun -volmgr -destroy 
0050   -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml 
0051   -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0052   -plugin DD4hep_ConditionsDump
0053   REGEX_PASS "Data\\(Translation-Rotation\\(Phi,Theta,Psi\\)-Pivot\\): \\[\\( 0 , 0 , 1 \\) \\[cm\\], \\( 3.14159265359 , 0 , 0 \\) \\[rad\\], \\( 0 , 0 , 0 \\) \\[cm\\]\\]"
0054   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0055   )
0056 #
0057 #---Testing: Load Telescope geometry and read conditions ------------------
0058 dd4hep_add_test_reg( Conditions_Telescope_cond_dump_by_detelement
0059   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0060   EXEC_ARGS  geoPluginRun -volmgr -destroy 
0061   -compact file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml 
0062   -plugin DD4hep_ConditionsXMLRepositoryParser file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0063   -plugin DD4hep_DetElementConditionsDump
0064   REGEX_PASS "Key\\:FA708B8A6E87AB8E Type\\:dd4hep\\:\\:Delta"
0065   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0066   )
0067 #
0068 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0069 dd4hep_add_test_reg( Conditions_Telescope_populate
0070   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0071   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_populate
0072       -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 5
0073   REGEX_PASS "Accessed a total of 1000 conditions \\(S:   600,L:     0,C:   400,M:0\\)"
0074   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0075   )
0076 #
0077 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0078 dd4hep_add_test_reg( Conditions_Telescope_stress
0079   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0080   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress 
0081     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10 -runs 20
0082   REGEX_PASS "\\+  Accessed a total of 4000 conditions \\(S:  3280,L:     0,C:   720,M:0\\)"
0083   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0084   )
0085 #
0086 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0087 dd4hep_add_test_reg( Conditions_Telescope_stress2
0088   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0089   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress2 
0090     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 10
0091   REGEX_PASS "\\+  Accessed a total of 2000 conditions \\(S:  1200,L:     0,C:   800,M:0\\)"
0092   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0093   )
0094 #
0095 #---Testing: Multi-threading test: Load CLICSiD geometry and have multiple parallel runs on IOVs
0096 dd4hep_add_test_reg( Conditions_Telescope_MT_LONGTEST
0097   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0098   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_MT 
0099     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 30 -runs 10 -threads 1
0100   REGEX_PASS "\\+  Accessed a total of 358000 conditions \\(S:334000,L:     0,C: 24000,M:0\\)"
0101   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0102   )
0103 #
0104 #---Testing: Save conditions to ROOT file
0105 dd4hep_add_test_reg( Conditions_Telescope_root_save
0106   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0107   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_save
0108     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 30
0109     -conditions TelescopeConditions.root
0110   REGEX_PASS "\\+ Successfully saved 16200 condition to file."
0111   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0112   )
0113 #
0114 #---Testing: Save conditions to ROOT file
0115 dd4hep_add_test_reg( Conditions_Telescope_root_load_iov
0116   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0117   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0118     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml
0119     -conditions TelescopeConditions.root -iovs 30 -restore iovpool
0120   DEPENDS Conditions_Telescope_root_save
0121   REGEX_PASS "\\+  Accessed a total of 6000 conditions \\(S:  5400,L:     0,C:   600,M:0\\)"
0122   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0123   )
0124 #
0125 #---Testing: Save conditions to ROOT file
0126 dd4hep_add_test_reg( Conditions_Telescope_root_load_usr
0127   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0128   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0129     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml
0130     -conditions TelescopeConditions.root -iovs 30 -restore userpool
0131   DEPENDS Conditions_Telescope_root_save
0132   REGEX_PASS "\\+  Accessed a total of 6000 conditions \\(S:  5400,L:     0,C:   600,M:0\\)"
0133   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0134   )
0135 #
0136 #---Testing: Load conditions from ROOT file
0137 dd4hep_add_test_reg( Conditions_Telescope_root_load_pool
0138   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0139   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0140     -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml
0141     -conditions TelescopeConditions.root -iovs 30 -restore condpool
0142   DEPENDS Conditions_Telescope_root_save
0143   REGEX_PASS "\\+  Accessed a total of 6000 conditions \\(S:  5400,L:     0,C:   600,M:0\\)"
0144   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0145   )
0146 #
0147 #---Testing: Attempt to build unresolved conditions object
0148 dd4hep_add_test_reg( Conditions_Telescope_unresolved
0149   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0150   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_populate
0151       -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 1 -extend 100
0152   REGEX_PASS "Condition: /world/Telescope/module_6#Unresolved_dependency dependent on missing condition"
0153   )
0154 #
0155 #---Testing: Simple stress: Load CLICSiD geometry and have multiple runs on IOVs
0156 dd4hep_add_test_reg( Conditions_CLICSiD_stress_LONGTEST
0157   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0158   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress 
0159     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100
0160   REGEX_PASS "\\+  Accessed a total of 35107000 conditions \\(S:33702720,L:     0,C:1404280,M:0\\)"
0161   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0162   )
0163 #
0164 #---Testing: Simple stress: Load CLICSiD geometry and have multiple runs on IOVs
0165 dd4hep_add_test_reg( Conditions_CLICSiD_stress2_LONGTEST
0166   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0167   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_stress2 
0168     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 20
0169   REGEX_PASS "\\+  Accessed a total of 7021400 conditions \\(S:4212840,L:     0,C:2808560,M:0\\)"
0170   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0171   )
0172 #
0173 #---Testing: Multi-threading test: Load CLICSiD geometry and have multiple parallel runs on IOVs
0174 dd4hep_add_test_reg( Conditions_CLICSiD_MT_LONGTEST
0175   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0176   EXEC_ARGS  geoPluginRun  -destroy -plugin DD4hep_ConditionExample_MT 
0177     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -runs 2 -threads 1
0178   REGEX_PASS "\\+  Accessed a total of 11936380 conditions \\(S:11093812,L:     0,C:842568,M:0\\)"
0179   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0180   )
0181 #
0182 #---Testing: Save conditions to ROOT file
0183 dd4hep_add_test_reg( Conditions_CLICSiD_root_save_LONGTEST
0184   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0185   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_save
0186     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3
0187     -conditions CLICSiDConditions.root
0188   REGEX_PASS "\\+ Successfully saved 2843667 condition to file."
0189   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0190   )
0191 #
0192 #---Testing: Save conditions to ROOT file
0193 dd4hep_add_test_reg( Conditions_CLICSiD_root_load_iov_LONGTEST
0194   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0195   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0196     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore iovpool
0197     -conditions CLICSiDConditions.root
0198   DEPENDS Conditions_CLICSiD_root_save_LONGTEST
0199   REGEX_PASS "\\+  Accessed a total of 1053210 conditions \\(S:947889,L:     0,C:105321,M:0\\)"
0200   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0201   )
0202 #
0203 #---Testing: Save conditions to ROOT file
0204 dd4hep_add_test_reg( Conditions_CLICSiD_root_load_usr_LONGTEST
0205   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0206   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0207     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore userpool
0208     -conditions CLICSiDConditions.root
0209   DEPENDS Conditions_CLICSiD_root_save_LONGTEST
0210   REGEX_PASS "\\+  Accessed a total of 1053210 conditions \\(S:947889,L:     0,C:105321,M:0\\)"
0211   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0212   )
0213 #
0214 #---Testing: Save conditions to ROOT file
0215 dd4hep_add_test_reg( Conditions_CLICSiD_root_load_cond_LONGTEST
0216   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0217   EXEC_ARGS  geoPluginRun -print WARNING -destroy -plugin DD4hep_ConditionExample_load
0218     -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 3 -restore condpool
0219     -conditions CLICSiDConditions.root
0220   DEPENDS Conditions_CLICSiD_root_save_LONGTEST
0221   REGEX_PASS "\\+  Accessed a total of 1053210 conditions \\(S:947889,L:     0,C:105321,M:0\\)"
0222   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0223   )
0224 #
0225 #---Testing: Basic test using std::any as conditions payload
0226 dd4hep_add_test_reg( Conditions_any_basic
0227   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0228   EXEC_ARGS  geoPluginRun -print INFO -destroy -plugin DD4hep_Conditions_any_basic
0229   REGEX_PASS "Test PASSED"
0230   REGEX_FAIL "Test FAILED"
0231   )
0232 #
0233 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0234 dd4hep_add_test_reg( Conditions_any_Telescope_populate
0235   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_Conditions.sh"
0236   EXEC_ARGS  geoPluginRun  -destroy -print WARNING -plugin DD4hep_ConditionAnyExample_populate
0237       -input file:${CMAKE_INSTALL_PREFIX}/examples/AlignDet/compact/Telescope.xml -iovs 2 -extend 1
0238   REGEX_PASS "\\+ Analyzed 1360 any object/elements"
0239   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0240   )