diff --git a/Control/AthenaMonitoring/CMakeLists.txt b/Control/AthenaMonitoring/CMakeLists.txt index 0e9cbe51b16841b4ffd25e4c4b733130e07b7322..0ba48dbf69dcfe14f2b1645c261f09087225fdac 100644 --- a/Control/AthenaMonitoring/CMakeLists.txt +++ b/Control/AthenaMonitoring/CMakeLists.txt @@ -80,8 +80,9 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_install_joboptions( share/*.py ) atlas_install_scripts( share/Run3DQTestingDriver.py share/hist_file_dump.py share/hist_diff.sh ) +atlas_install_runtime( share/test_unit_ExampleMonitorAlgorithm.ref ) # Example monitor algorithm test atlas_add_test( ExampleMonitorAlgorithm_test - SCRIPT python -m AthenaMonitoring.ExampleMonitorAlgorithm + SCRIPT test/test_unit_ExampleMonitorAlgorithm.sh ) diff --git a/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py b/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py index 14150102bef8ebe7b28b3d621caaefaaee8b52df..2f3f2ca3451594c11cb17cf479c8de6d04b38d97 100644 --- a/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py +++ b/Control/AthenaMonitoring/python/ExampleMonitorAlgorithm.py @@ -138,6 +138,9 @@ def ExampleMonitoringConfig(inputFlags): array1D.defineHistogram('c;c_alternate', title='Layer', path='Keys/{0}', xmax=3.) array2D.defineHistogram('c', title='Cluster {1}, Layer {0}', path='Keys/{1}', xmax=3.) + # Making a histogram only for certain elements of the array + array2D.defineHistogram('c;c_restricted', path='Keys', pattern=[('layer1', 'clusterB'), ('layer2', 'clusterX')]) + ### STEP 6 ### # Finalize. The return value should be a tuple of the ComponentAccumulator # and the sequence containing the created algorithms. If we haven't called diff --git a/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref b/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref new file mode 100644 index 0000000000000000000000000000000000000000..83ea1ea17cfb6fa1742aeb6277c8bdee27dbbd3f --- /dev/null +++ b/Control/AthenaMonitoring/share/test_unit_ExampleMonitorAlgorithm.ref @@ -0,0 +1,58 @@ +TH1F /run_311321/top/run: 4000554 uncompressed, 17768 on file (hash -1637422341) +TEfficiency /run_311321/OneRing/AndInTheDarkness/random_vs_pT_vs_pT_passed: 21034 uncompressed, 1551 on file (hash -1415546040) +TTree /run_311321/OneRing/BindThem/testtree: 2979 uncompressed, 860 on file (hash -1367424522) +TEfficiency /run_311321/OneRing/AndInTheDarkness/pT_vs_pT_passed: 2965 uncompressed, 684 on file (hash -94247922) +TH2F /run_311321/OneRing/ToBringThemAll/pT_vs_random: 909 uncompressed, 426 on file (hash 151299293) +TH1F /run_311321/OneRing/ToFindThem/lb: 12574 uncompressed, 387 on file (hash -1115607720) +TH1F /run_311321/OneRing/AndInTheDarkness/pT_with_cut: 759 uncompressed, 356 on file (hash 1766687537) +TH1F /run_311321/OneRing/ToBringThemAll/random: 667 uncompressed, 322 on file (hash -1985709482) +TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID_merge: 748 uncompressed, 304 on file (hash 1780646662) +TH1F /run_311321/OneRing/ToRuleThemAll/lumiPerBCID: 742 uncompressed, 297 on file (hash 1977778327) +TH1F /run_311321/top/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 356947890) +TH1F /run_311321/top/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 297768880) +TH1F /run_311321/top/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash -953182330) +TH1F /run_311321/top/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash -1012361340) +TH1F /run_311321/OneRing/Keys/clusterX/c_layer2_clusterX: 979 uncompressed, 254 on file (hash 356947890) +TH1F /run_311321/OneRing/Keys/clusterX/c_layer1_clusterX: 979 uncompressed, 254 on file (hash 297768880) +TH1F /run_311321/OneRing/Keys/clusterB/c_layer2_clusterB: 979 uncompressed, 254 on file (hash -953182330) +TH1F /run_311321/OneRing/Keys/clusterB/c_layer1_clusterB: 979 uncompressed, 254 on file (hash -1012361340) +TH1F /run_311321/top/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash -9069961) +TH1F /run_311321/top/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 1652922953) +TH1F /run_311321/OneRing/Keys/c_restricted_layer2_clusterX: 989 uncompressed, 252 on file (hash -9069961) +TH1F /run_311321/OneRing/Keys/c_restricted_layer1_clusterB: 989 uncompressed, 252 on file (hash 1652922953) +TH1F /run_311321/top/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1644728065) +TH1F /run_311321/top/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1598131968) +TH1F /run_311321/OneRing/Keys/layer2/c_alternate_layer2: 955 uncompressed, 243 on file (hash 1644728065) +TH1F /run_311321/OneRing/Keys/layer1/c_alternate_layer1: 955 uncompressed, 243 on file (hash 1598131968) +TH1F /run_311321/top/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash -1351655145) +TH1F /run_311321/top/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 1925406977) +TH1F /run_311321/top/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash -1398513386) +TH1F /run_311321/top/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 1878548736) +TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterX: 590 uncompressed, 237 on file (hash -1351655145) +TH1F /run_311321/OneRing/LayerCluster/c_layer2_clusterB: 590 uncompressed, 237 on file (hash 1925406977) +TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterX: 590 uncompressed, 237 on file (hash -1398513386) +TH1F /run_311321/OneRing/LayerCluster/c_layer1_clusterB: 590 uncompressed, 237 on file (hash 1878548736) +TH1F /run_311321/top/Keys/c_layer2: 952 uncompressed, 236 on file (hash -1735029423) +TH1F /run_311321/top/Keys/c_layer1: 952 uncompressed, 236 on file (hash -1792438961) +TH1F /run_311321/OneRing/Keys/c_layer2: 952 uncompressed, 236 on file (hash -1735029423) +TH1F /run_311321/OneRing/Keys/c_layer1: 952 uncompressed, 236 on file (hash -1792438961) +TH2F /run_311321/top/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1811263699) +TH2F /run_311321/top/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1762701522) +TH2F /run_311321/OneRing/Eta/b_vs_a_1: 1148 uncompressed, 231 on file (hash 1811263699) +TH2F /run_311321/OneRing/Eta/b_vs_a_0: 1148 uncompressed, 231 on file (hash 1762701522) +TH1F /run_311321/top/Layer/c_layer2: 581 uncompressed, 228 on file (hash 1180196190) +TH1F /run_311321/top/Layer/c_layer1: 581 uncompressed, 228 on file (hash 1133927773) +TH1F /run_311321/OneRing/Layer/c_layer2: 581 uncompressed, 228 on file (hash 1180196190) +TH1F /run_311321/OneRing/Layer/c_layer1: 581 uncompressed, 228 on file (hash 1133927773) +TH1F /run_311321/top/Eta/c_1: 576 uncompressed, 222 on file (hash 2129681261) +TH1F /run_311321/top/Eta/c_0: 576 uncompressed, 222 on file (hash 2083412844) +TH1F /run_311321/OneRing/Eta/c_1: 576 uncompressed, 222 on file (hash 2129681261) +TH1F /run_311321/OneRing/Eta/c_0: 576 uncompressed, 222 on file (hash 2083412844) +TH1F /run_311321/top/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1174035080) +TH1F /run_311321/top/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1127766663) +TH1F /run_311321/top/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1127635591) +TH1F /run_311321/top/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1081367174) +TH1F /run_311321/OneRing/EtaPhi/a_1_1: 578 uncompressed, 218 on file (hash 1174035080) +TH1F /run_311321/OneRing/EtaPhi/a_1_0: 578 uncompressed, 218 on file (hash 1127766663) +TH1F /run_311321/OneRing/EtaPhi/a_0_1: 578 uncompressed, 218 on file (hash 1127635591) +TH1F /run_311321/OneRing/EtaPhi/a_0_0: 578 uncompressed, 218 on file (hash 1081367174) diff --git a/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh b/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh new file mode 100755 index 0000000000000000000000000000000000000000..35ba7c07809c05d3743ea3d9a9cb1330d00e7c70 --- /dev/null +++ b/Control/AthenaMonitoring/test/test_unit_ExampleMonitorAlgorithm.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo $PWD +python -m AthenaMonitoring.ExampleMonitorAlgorithm +# Grep to avoid RooFit lines +hist_file_dump.py --hash ExampleMonitorOutput.root | grep '^T' | tee hist-content +get_files -symlink test_unit_ExampleMonitorAlgorithm.ref +diff hist-content test_unit_ExampleMonitorAlgorithm.ref +exit $? \ No newline at end of file