diff --git a/DaVinciTests/tests/options/DVTestReadMooreOutput.py b/DaVinciTests/tests/options/DVTestReadMooreOutput.py new file mode 100644 index 0000000000000000000000000000000000000000..6306038b977ebe691d18575dd89e38ea60132c75 --- /dev/null +++ b/DaVinciTests/tests/options/DVTestReadMooreOutput.py @@ -0,0 +1,45 @@ +############################################################################### +# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +""" +Test of a DST produced by HLT2 (Moore). +""" + +__author__ = "Patrick Koppenburg" +__date__ = "2021-03-22" + +from PyConf.application import configure, configure_input +from PyConf.control_flow import CompositeNode, NodeLogic +from PyConf.Algorithms import PrintDecayTree + +from DaVinci import options +from DaVinci.reco_objects import upfront_reconstruction_from_file as upfront_reconstruction +from DaVinci.common_particles import make_std_loose_d2kk + +options.evt_max = -1 +options.print_freq = 1 +options.msg_svc_format = "% F%60W%S%7W%R%T %0W%M" + +d0s = make_std_loose_d2kk() + +pdt = PrintDecayTree(name="PrintD0s", Input=d0s) + +# the "upfront_reconstruction" is what unpacks reconstruction objects, particles and primary vertices +# from file and creates protoparticles. +algs = upfront_reconstruction() + [d0s, pdt] + +node = CompositeNode( + "PrintD0Node", children=algs, combine_logic=NodeLogic.NONLAZY_AND) + +# File from Moore test +options.set_input_and_conds_from_testfiledb("Moore-Output-DST") + +config = configure_input(options) +config.update(configure(options, node)) diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt new file mode 100755 index 0000000000000000000000000000000000000000..3a424d383fb43631647821c53f6c6ae377d01301 --- /dev/null +++ b/DaVinciTests/tests/qmtest/io.qms/test_read_moore_dst.qmt @@ -0,0 +1,35 @@ +<?xml version="1.0" ?> +<!-- + (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration + + This software is distributed under the terms of the GNU General Public + Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". + + In applying this licence, CERN does not waive the privileges and immunities + granted to it by virtue of its status as an Intergovernmental Organization + or submit itself to any jurisdiction. + + @author P. Koppenburg 2021-03-26 +--> +<!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> +<extension class="GaudiTest.GaudiExeTest" kind="test"> +<argument name="program"><text>gaudirun.py</text></argument> +<argument name="timeout"><integer>3600</integer></argument> +<argument name="args"><set> + <text>../options/DVTestReadMooreOutput.py</text> +</set></argument> +<argument name="validator"><text> +findReferenceBlock("""StdLooseD02KK INFO Number of counters : 9 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# D0 -> K+ K- " | 21 | 8 | 0.38095 | 0.48562 | 0.0000 | 1.0000 | + | "# K+" | 21 | 54 | 2.5714 | 2.2376 | 0.0000 | 8.0000 | + | "# K-" | 21 | 55 | 2.6190 | 1.8892 | 0.0000 | 7.0000 | + | "# StdLooseKaons/Particles" | 21 | 109 | 5.1905 | 3.0334 | 1.0000 | 12.000 | + | "# input particles" | 21 | 109 | 5.1905 | 3.0334 | 1.0000 | 12.000 | + | "# selected" | 21 | 8 | 0.38095 | + |*"#accept" | 21 | 8 |( 38.09524 +- 10.59712)% | + | "#pass combcut" | 148 | 8 | 0.054054 | + | "#pass mother cut" | 8 | 8 | 1.0000 | +""", stdout, result, causes, signature_offset = 0, id = "Stream3") +</text></argument> +</extension>