Skip to content
Snippets Groups Projects
Commit 03411d17 authored by Patrick Koppenburg's avatar Patrick Koppenburg :leaves:
Browse files

Merge branch 'erodrigu-davinciexamples' into 'master'

Creation of a new DaVinciExamples package

See merge request !510
parents 05bd0b91 60a654d1
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!510Creation of a new DaVinciExamples package
Pipeline #2377233 passed
###############################################################################
# (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. #
###############################################################################
gaudi_subdir(DaVinciExamples)
gaudi_depends_on_subdirs(GaudiConf)
gaudi_install_python_modules()
gaudi_add_test(QMTest QMTEST)
###############################################################################
# (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. #
###############################################################################
##############################################################################
# (c) Copyright 2020-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. #
###############################################################################
"""
Example of a DaVinci job printing run and event numbers on every read event.
"""
__author__ = "Eduardo Rodrigues"
__date__ = "2021-02-25"
from PyConf.application import configure, configure_input
from PyConf.application import default_raw_event, make_odin
from PyConf.control_flow import CompositeNode
from PyConf.Algorithms import PrintHeader
from DaVinci import options
options.set_input_and_conds_from_testfiledb('Upgrade_Bd2KstarMuMu')
options.evt_max = 7
options.input_raw_format = 4.3
with default_raw_event.bind(raw_event_format=options.input_raw_format):
ph = PrintHeader(ODINLocation=make_odin())
node = CompositeNode("PHNode", children=[ph])
config = configure_input(options)
config.update(configure(options, node))
<?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.
-->
<!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>$DAVINCIEXAMPLESROOT/python/DaVinciExamples/debugging/example-PrintHeader.py</text>
</set></argument>
<argument name="validator"><text>
findReferenceBlock("""
PrintHeader INFO Number of counters : 1
| Counter | # | sum | mean/eff^* | rms/err^* | min | max |
| "EventCount" | 7 |
ApplicationMgr INFO Application Manager Stopped successfully
""", stdout, result, causes, signature_offset = 0)
countErrorLines({"FATAL":0})
</text></argument>
</extension>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment