From 096ec2c5fc42180c0521c0a9a9937f8c260a0cdb Mon Sep 17 00:00:00 2001 From: Patrick Koppenburg <patrick.koppenburg@cern.ch> Date: Sat, 20 Feb 2021 11:55:55 +0000 Subject: [PATCH] Fixed formatting patch generated by https://gitlab.cern.ch/lhcb/DaVinci/-/jobs/12211447 --- .../tests/options/DVTestInitialise.py | 2 +- .../{DVTestReadDst.py => DVTestPrintDecay.py} | 51 ++++++++++--------- DaVinciTests/tests/options/DVTestWriteDst.py | 2 +- .../tests/options/DaVinci-1000events.py | 23 --------- .../tests/options/DisableLoKiCacheFunctors.py | 13 ----- .../options/DisableLoKiPythonFunctors.py | 13 ----- .../tests/options/EnableCaloReprocessing.py | 13 ----- .../tests/options/EnableFPEAuditor.py | 6 +-- .../PID/DaVinci-DST-ANNPID-Upgrade-Test.py | 14 ++--- .../DaVinci-DSTUnpacking-Upgrade-Test.py | 12 ++--- .../tests/options/SimpleMuSelection.py | 40 --------------- .../tests/options/Upgrade/DaVinci-Options.py | 2 +- .../tests/options/Upgrade/Input-DST.py | 2 +- .../tests/options/Upgrade/Input-MDST.py | 2 +- .../tests/options/Upgrade/Upgrade-DB-tags.py | 2 +- DaVinciTests/tests/options/check_mc_output.py | 49 ------------------ DaVinciTests/tests/options/db-global-2010.py | 22 -------- DaVinciTests/tests/options/db-latest-2010.py | 22 -------- DaVinciTests/tests/options/dimuon_testfile.py | 14 ----- .../tests/options/fsrs/davinci-merge.py | 20 -------- .../tests/options/fsrs/test-genfsr.py | 14 ++--- .../test_standardintermediate_reco14_init.qmt | 2 +- .../test_standardintermediate_reco14_run.qmt | 2 +- .../qmtest/davinci.qms/configure_dst.qmt | 2 +- .../qmtest/davinci.qms/configure_mdst.qmt | 2 +- .../qmtest/davinci.qms/gaudipython_algs.qmt | 2 +- .../qmtest/davinci.qms/test_print_decay.qmt | 35 +++++++++++++ .../tests/qmtest/dtfdict.qms/test_dtfdict.qmt | 2 +- .../tests/qmtest/fsrs.qms/test-genfsr.qmt | 2 +- .../tests/qmtest/io.qms/test_read_mc_digi.qmt | 2 +- .../tests/qmtest/io.qms/test_read_mc_ldst.qmt | 2 +- .../tests/qmtest/io.qms/test_read_mc_mdf.qmt | 2 +- .../qmtest/io.qms/test_read_mc_xdigi.qmt | 2 +- .../tests/qmtest/io.qms/test_write_dst.qmt | 2 +- .../packing.qms/test_dstunpacking_upgrade.qmt | 2 +- .../qmtest/pid.qms/test_dstannpid_upgrade.qmt | 2 +- 36 files changed, 106 insertions(+), 295 deletions(-) rename DaVinciTests/tests/options/{DVTestReadDst.py => DVTestPrintDecay.py} (52%) delete mode 100644 DaVinciTests/tests/options/DaVinci-1000events.py delete mode 100644 DaVinciTests/tests/options/DisableLoKiCacheFunctors.py delete mode 100644 DaVinciTests/tests/options/DisableLoKiPythonFunctors.py delete mode 100644 DaVinciTests/tests/options/EnableCaloReprocessing.py delete mode 100644 DaVinciTests/tests/options/SimpleMuSelection.py delete mode 100644 DaVinciTests/tests/options/check_mc_output.py delete mode 100644 DaVinciTests/tests/options/db-global-2010.py delete mode 100644 DaVinciTests/tests/options/db-latest-2010.py delete mode 100644 DaVinciTests/tests/options/dimuon_testfile.py delete mode 100644 DaVinciTests/tests/options/fsrs/davinci-merge.py create mode 100755 DaVinciTests/tests/qmtest/davinci.qms/test_print_decay.qmt diff --git a/DaVinciTests/tests/options/DVTestInitialise.py b/DaVinciTests/tests/options/DVTestInitialise.py index 665ea3d07..185c6ebd0 100755 --- a/DaVinciTests/tests/options/DVTestInitialise.py +++ b/DaVinciTests/tests/options/DVTestInitialise.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # diff --git a/DaVinciTests/tests/options/DVTestReadDst.py b/DaVinciTests/tests/options/DVTestPrintDecay.py similarity index 52% rename from DaVinciTests/tests/options/DVTestReadDst.py rename to DaVinciTests/tests/options/DVTestPrintDecay.py index 6cea2e567..55558a374 100755 --- a/DaVinciTests/tests/options/DVTestReadDst.py +++ b/DaVinciTests/tests/options/DVTestPrintDecay.py @@ -1,5 +1,6 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # + +# (c) Copyright 2000-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". # @@ -8,11 +9,14 @@ # granted to it by virtue of its status as an Intergovernmental Organization # # or submit itself to any jurisdiction. # ############################################################################### +######################################################################## # -# Options for a typical DaVinci job reading DSTs with saved candidates. +# DVTestPrintDecay.py +# +# Options for a typical DaVinci job reading DSTs # # @author Patrick Koppenburg -# @date 2009-02-04 +# @date 2021-02-18 # ######################################################################## from Gaudi.Configuration import * @@ -21,33 +25,32 @@ from Configurables import DaVinci # # Print the J/psis # -from Configurables import PrintDecayTree, PrintHeader, FilterDesktop -DaVinci().UserAlgorithms = [PrintHeader()] -MassRanges = [[3000, 3087], [3088, 3100], [3100, 4000]] -for i in MassRanges: - ln = str(i[0]) - hn = str(i[1]) - name = ln + "_" + hn - location = "/Event/SeqJpsi_" + name + "/Phys/SelJpsi_" + name - pJpsi = PrintDecayTree('PrintJpsi_' + name, Inputs=[location]) - DaVinci().UserAlgorithms += [pJpsi] - f = FilterDesktop( - 'Filter_' + name, Inputs=[location], Code="(MIPCHI2DV(PRIMARY) > 2)") - DaVinci().UserAlgorithms += [f] +from PhysSelPython.Wrappers import Selection, DataOnDemand, SelectionSequence + +location = 'Phys/StdLooseJpsi2MuMu/Particles' + +MyLooseJpsi = DataOnDemand(Location=location) + +from Configurables import PrintDecayTree, PrintHeader +DaVinci().UserAlgorithms = [ + PrintHeader(), PrintDecayTree('PrintJpsi', Input=location) +] ############################################################################## # # ############################################################################## -DaVinci().EvtMax = -1 +DaVinci().EvtMax = 100 DaVinci().PrintFreq = 1 -DaVinci().DataType = "2010" +DaVinci().DataType = "Upgrade" DaVinci().Simulation = True -DaVinci().Input = [ - "DATAFILE='PFN:$DAVINCITESTSROOT/tests/qmtest/Sel.SeqJpsi_3088_3100.dst' TYP='POOL_ROOTTREE' OPT='READ'", - "DATAFILE='PFN:$DAVINCITESTSROOT/tests/qmtest/Sel.SeqJpsi_3100_4000.dst' TYP='POOL_ROOTTREE' OPT='READ'", - "DATAFILE='PFN:$DAVINCITESTSROOT/tests/qmtest/Sel.SeqJpsi_3000_3087.dst' TYP='POOL_ROOTTREE' OPT='READ'" -] ######################################################################## -MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M" +MessageSvc().Format = "% F%40W%S%7W%R%T %0W%M" +#-- GAUDI jobOptions generated on Mon Jan 17 17:13:58 2011 +#-- Contains event types : +#-- 13144006 - 1 files - 10000 events - 4.13 GBytes +# MC 2010 Beam3500GeV-VeloClosed-MagDown-Nu3 +# bs->Jpsi, Phi +from PRConfig import TestFileDB +TestFileDB.test_file_db["Upgrade_Bd2KstarMuMu"].run() diff --git a/DaVinciTests/tests/options/DVTestWriteDst.py b/DaVinciTests/tests/options/DVTestWriteDst.py index d15089297..6dc8a24fe 100755 --- a/DaVinciTests/tests/options/DVTestWriteDst.py +++ b/DaVinciTests/tests/options/DVTestWriteDst.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # diff --git a/DaVinciTests/tests/options/DaVinci-1000events.py b/DaVinciTests/tests/options/DaVinci-1000events.py deleted file mode 100644 index ade4d5550..000000000 --- a/DaVinciTests/tests/options/DaVinci-1000events.py +++ /dev/null @@ -1,23 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -from Gaudi.Configuration import * -from Configurables import DaVinci - -# Number of events etc. -DaVinci().EvtMax = 1000 -DaVinci().PrintFreq = 10 - -#DaVinci().SkipEvents = 17100 - -# Temporary. Force a particular CondDB tag -#from Configurables import LHCbApp -#LHCbApp().DDDBtag="head-20120413" -#LHCbApp().CondDBtag="cond-20131028" diff --git a/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py b/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py deleted file mode 100644 index 29dfb9324..000000000 --- a/DaVinciTests/tests/options/DisableLoKiCacheFunctors.py +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### - -from Configurables import ApplicationMgr -ApplicationMgr().Environment['LOKI_DISABLE_CACHE'] = '1' diff --git a/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py b/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py deleted file mode 100644 index 14f8f50f4..000000000 --- a/DaVinciTests/tests/options/DisableLoKiPythonFunctors.py +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### - -from Configurables import ApplicationMgr -ApplicationMgr().Environment['LOKI_DISABLE_PYTHON'] = '1' diff --git a/DaVinciTests/tests/options/EnableCaloReprocessing.py b/DaVinciTests/tests/options/EnableCaloReprocessing.py deleted file mode 100644 index 3e97ad3d8..000000000 --- a/DaVinciTests/tests/options/EnableCaloReprocessing.py +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### - -from Configurables import PhysConf -PhysConf().CaloReProcessing = True diff --git a/DaVinciTests/tests/options/EnableFPEAuditor.py b/DaVinciTests/tests/options/EnableFPEAuditor.py index c278e1b37..b363dbe88 100644 --- a/DaVinciTests/tests/options/EnableFPEAuditor.py +++ b/DaVinciTests/tests/options/EnableFPEAuditor.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # @@ -10,8 +10,8 @@ ############################################################################### from Gaudi.Configuration import * -ApplicationMgr().ExtSvc + [ "AuditorSvc" ] -AuditorSvc().Auditors += [ "FPEAuditor" ] +ApplicationMgr().ExtSvc + ["AuditorSvc"] +AuditorSvc().Auditors += ["FPEAuditor"] #from Configurables import FPEAuditor #FPEAuditor().TrapOn = [ "DivByZero", "Overflow", "Underflow" ] #FPEAuditor().ActivateAt = ["Execute"] diff --git a/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py b/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py index e339fae64..bfe8e6952 100755 --- a/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py +++ b/DaVinciTests/tests/options/PID/DaVinci-DST-ANNPID-Upgrade-Test.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # @@ -16,13 +16,13 @@ from Configurables import DaVinci, PhysConf from Configurables import CondDB ######################################################################## -DaVinci().EvtMax = 100 # Number of events -DaVinci().PrintFreq = 10 # Events to skip -DaVinci().DataType = "Upgrade" # Must be given +DaVinci().EvtMax = 100 # Number of events +DaVinci().PrintFreq = 10 # Events to skip +DaVinci().DataType = "Upgrade" # Must be given DaVinci().Simulation = True DaVinci().InputType = 'LDST' DaVinci().Lumi = False -CondDB().Upgrade = True +CondDB().Upgrade = True DaVinci().CondDBtag = "sim-20171127-vc-md100" DaVinci().DDDBtag = "dddb-20171126" @@ -31,7 +31,9 @@ DaVinci().HistogramFile = "dst-annpid.root" ######################################################################## from Configurables import ANNGlobalPID__ChargedProtoANNPIDMoni -DaVinci().UserAlgorithms += [ ANNGlobalPID__ChargedProtoANNPIDMoni("ANNPIDMoni") ] +DaVinci().UserAlgorithms += [ + ANNGlobalPID__ChargedProtoANNPIDMoni("ANNPIDMoni") +] ######################################################################## diff --git a/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py b/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py index 310581868..f03ad7d9b 100755 --- a/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py +++ b/DaVinciTests/tests/options/Packing/DaVinci-DSTUnpacking-Upgrade-Test.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # @@ -16,13 +16,13 @@ from Configurables import DaVinci, PhysConf from Configurables import CondDB ######################################################################## -DaVinci().EvtMax = 100 # Number of events -DaVinci().PrintFreq = 10 # Events to skip -DaVinci().DataType = "Upgrade" # Must be given +DaVinci().EvtMax = 100 # Number of events +DaVinci().PrintFreq = 10 # Events to skip +DaVinci().DataType = "Upgrade" # Must be given DaVinci().Simulation = True DaVinci().InputType = 'LDST' DaVinci().Lumi = False -CondDB().Upgrade = True +CondDB().Upgrade = True DaVinci().CondDBtag = "sim-20171127-vc-md100" DaVinci().DDDBtag = "dddb-20171126" @@ -31,7 +31,7 @@ DaVinci().HistogramFile = "dst-unpacking.root" ######################################################################## from Configurables import TrackMonitor -DaVinci().UserAlgorithms += [ TrackMonitor() ] +DaVinci().UserAlgorithms += [TrackMonitor()] ######################################################################## diff --git a/DaVinciTests/tests/options/SimpleMuSelection.py b/DaVinciTests/tests/options/SimpleMuSelection.py deleted file mode 100644 index 4985d2a40..000000000 --- a/DaVinciTests/tests/options/SimpleMuSelection.py +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -""" - @ Created by R. LAmbert - @ date 2009-11-20 - Mu selection for tests - Long track muons with PT > 1 GeV -""" - -__author__ = 'R. Lambert' -__date__ = 'November 2009' - -import GaudiKernel.SystemOfUnits as Units -from Gaudi.Configuration import * -from Configurables import FilterDesktop, DaVinci -from PhysSelPython.Wrappers import Selection, DataOnDemand, SelectionSequence -from StandardParticles import StdLooseMuons as MyStdMuons - -MuForTests = FilterDesktop("_bachelorMu") -MuForTests.Code = "((ISLONG) & (PT > 250.*MeV))" - -SelMuForTests = Selection( - "BachelorMuForTests", - Algorithm=MuForTests, - RequiredSelections=[MyStdMuons]) -from Configurables import CheckPV -checkPV = CheckPV('TestCheckPV') -TestSequence = SelectionSequence( - "TestSeq", TopSelection=SelMuForTests, EventPreSelector=[checkPV]) - -dv = DaVinci() -DaVinci().UserAlgorithms = [TestSequence.sequence()] diff --git a/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py b/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py index d94e1186b..1dbb230bf 100644 --- a/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py +++ b/DaVinciTests/tests/options/Upgrade/DaVinci-Options.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # diff --git a/DaVinciTests/tests/options/Upgrade/Input-DST.py b/DaVinciTests/tests/options/Upgrade/Input-DST.py index c639d4029..1a440556c 100644 --- a/DaVinciTests/tests/options/Upgrade/Input-DST.py +++ b/DaVinciTests/tests/options/Upgrade/Input-DST.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # diff --git a/DaVinciTests/tests/options/Upgrade/Input-MDST.py b/DaVinciTests/tests/options/Upgrade/Input-MDST.py index 708990a43..db22fa7e0 100644 --- a/DaVinciTests/tests/options/Upgrade/Input-MDST.py +++ b/DaVinciTests/tests/options/Upgrade/Input-MDST.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # diff --git a/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py b/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py index 22f14be88..512fc4b19 100644 --- a/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py +++ b/DaVinciTests/tests/options/Upgrade/Upgrade-DB-tags.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # diff --git a/DaVinciTests/tests/options/check_mc_output.py b/DaVinciTests/tests/options/check_mc_output.py deleted file mode 100644 index 3c7f42416..000000000 --- a/DaVinciTests/tests/options/check_mc_output.py +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -"""Check ntuples made from Turbo MC input for correct truth-matching.""" -from __future__ import print_function -import sys - -import ROOT - -tree_branches = { - 'TupleDstToD0pi_D0ToKpi': (['Dst', 'D0'], ['D0_K', 'D0_pi', 'Dst_pi']), - 'TupleLcTopKpi': (['Lc'], ['Lc_p', 'Lc_K', 'Lc_pi']), - 'TupleScToLcpi_LcTopKpi': (['Sc', 'Lc'], ['Lc_p', 'Lc_K', 'Lc_pi', 'Sc_pi']) -} - -fname = sys.argv[-2] -tname = sys.argv[-1] -assert fname.endswith('.root'), 'Expected a ROOT file as input, got: ' + fname -assert tname in tree_branches, 'Cannot handle given tree, got: ' + tname -print('Looking at file {0!r}, tree {1!r}'.format(fname, tname)) - -composites, children = tree_branches[tname] - -f = ROOT.TFile(fname) -t = f.Get('{0}/DecayTree'.format(tname)) - -assert t.GetEntries() > 0, 'Expected non-zero number of entries' -print('Found {0} entries'.format(t.GetEntries())) - -# If the truth-matching fails, we'd see BKGCAT == 60 for all entries -for p in composites: - condition = '{0}_BKGCAT < 20'.format(p) - assert t.GetEntries(condition) > 0, \ - 'Expected non-zero number of entries with {0}'.format(condition) - print('OK: {0!r}'.format(condition)) -# If the truth-matching fails, we'd see TRUEID == 0 for all entries -for p in composites + children: - condition = '{0}_TRUEID != 0'.format(p) - assert t.GetEntries(condition) > 0, \ - 'Expected non-zero number of entries with {0}'.format(condition) - print('OK: {0!r}'.format(condition)) -f.Close() diff --git a/DaVinciTests/tests/options/db-global-2010.py b/DaVinciTests/tests/options/db-global-2010.py deleted file mode 100644 index 081e9305c..000000000 --- a/DaVinciTests/tests/options/db-global-2010.py +++ /dev/null @@ -1,22 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -from Gaudi.Configuration import * -from Configurables import LHCbApp, CondDB, DDDBConf - -dataType="2010" - -DDDBConf(DataType=dataType) -CondDB(IgnoreHeartBeat=True) - -if "UseLatestTags" in CondDB().__slots__: - CondDB().UseLatestTags=[dataType, True] -else: - CondDB().useLatestTags(DataType=dataType, OnlyGlobalTags=True) diff --git a/DaVinciTests/tests/options/db-latest-2010.py b/DaVinciTests/tests/options/db-latest-2010.py deleted file mode 100644 index 5ebb18ea8..000000000 --- a/DaVinciTests/tests/options/db-latest-2010.py +++ /dev/null @@ -1,22 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -from Gaudi.Configuration import * -from Configurables import LHCbApp, CondDB, DDDBConf - -dataType="2010" - -DDDBConf(DataType=dataType) -CondDB(IgnoreHeartBeat=True) - -if "UseLatestTags" in CondDB().__slots__: - CondDB().UseLatestTags=[dataType] -else: - CondDB().useLatestTags(DataType=dataType, OnlyGlobalTags=False) diff --git a/DaVinciTests/tests/options/dimuon_testfile.py b/DaVinciTests/tests/options/dimuon_testfile.py deleted file mode 100644 index 7618baf7d..000000000 --- a/DaVinciTests/tests/options/dimuon_testfile.py +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -from PRConfig import TestFileDB -from Configurables import DaVinci - -TestFileDB.test_file_db["2012_DaVinciTests.stripping.test_express_appconfig"].run(configurable=DaVinci()) diff --git a/DaVinciTests/tests/options/fsrs/davinci-merge.py b/DaVinciTests/tests/options/fsrs/davinci-merge.py deleted file mode 100644 index 6f78a868f..000000000 --- a/DaVinciTests/tests/options/fsrs/davinci-merge.py +++ /dev/null @@ -1,20 +0,0 @@ -############################################################################### -# (c) Copyright 2000-2018 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. # -############################################################################### -from Gaudi.Configuration import * -from Configurables import InputCopyStream - -InputCopyStream().Output = "DATAFILE='PFN:DaVinci-Merged-2010.dst' TYP='POOL_ROOTTREE' OPT='REC'" - -ApplicationMgr().EvtMax = -1 - -from Configurables import RecordStream -FileRecords = RecordStream("FileRecords") -FileRecords.Output = "DATAFILE='PFN:DaVinci-Merged-2010.dst' TYP='POOL_ROOTTREE' OPT='REC'" diff --git a/DaVinciTests/tests/options/fsrs/test-genfsr.py b/DaVinciTests/tests/options/fsrs/test-genfsr.py index 1690ae4a5..115a199d5 100644 --- a/DaVinciTests/tests/options/fsrs/test-genfsr.py +++ b/DaVinciTests/tests/options/fsrs/test-genfsr.py @@ -1,5 +1,5 @@ ############################################################################### -# (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration # +# (c) Copyright 2000-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". # @@ -12,19 +12,19 @@ from Gaudi.Configuration import * from Configurables import GaudiSequencer seqGenFSR = GaudiSequencer("GenFSRSeq") -seqGenFSR.Members += [ "GenFSRMerge" ] -seqGenFSR.Members += [ "GenFSRLog" ] +seqGenFSR.Members += ["GenFSRMerge"] +seqGenFSR.Members += ["GenFSRLog"] from Configurables import DaVinci -DaVinci().DataType = "Upgrade" -DaVinci().Simulation = True +DaVinci().DataType = "Upgrade" +DaVinci().Simulation = True DaVinci().InputType = "LDST" DaVinci().Lumi = False DaVinci().UserAlgorithms = [seqGenFSR] from Configurables import LHCbApp, CondDB -CondDB().Upgrade = True -LHCbApp().DDDBtag = "dddb-20171126" +CondDB().Upgrade = True +LHCbApp().DDDBtag = "dddb-20171126" LHCbApp().CondDBtag = "sim-20171127-vc-md100" from PRConfig import TestFileDB diff --git a/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_init.qmt b/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_init.qmt index 1ca5f63b2..feb745aae 100755 --- a/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_init.qmt +++ b/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_init.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_run.qmt b/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_run.qmt index 2ab4463e9..1dcaaf278 100755 --- a/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_run.qmt +++ b/DaVinciTests/tests/qmtest/commonparticles.qms/test_standardintermediate_reco14_run.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/davinci.qms/configure_dst.qmt b/DaVinciTests/tests/qmtest/davinci.qms/configure_dst.qmt index 645ccd0bf..d47fa4728 100644 --- a/DaVinciTests/tests/qmtest/davinci.qms/configure_dst.qmt +++ b/DaVinciTests/tests/qmtest/davinci.qms/configure_dst.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/davinci.qms/configure_mdst.qmt b/DaVinciTests/tests/qmtest/davinci.qms/configure_mdst.qmt index d91f4e090..72d536a33 100644 --- a/DaVinciTests/tests/qmtest/davinci.qms/configure_mdst.qmt +++ b/DaVinciTests/tests/qmtest/davinci.qms/configure_mdst.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/davinci.qms/gaudipython_algs.qmt b/DaVinciTests/tests/qmtest/davinci.qms/gaudipython_algs.qmt index 0c1598d84..7bef74023 100644 --- a/DaVinciTests/tests/qmtest/davinci.qms/gaudipython_algs.qmt +++ b/DaVinciTests/tests/qmtest/davinci.qms/gaudipython_algs.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/davinci.qms/test_print_decay.qmt b/DaVinciTests/tests/qmtest/davinci.qms/test_print_decay.qmt new file mode 100755 index 000000000..fe09acc82 --- /dev/null +++ b/DaVinciTests/tests/qmtest/davinci.qms/test_print_decay.qmt @@ -0,0 +1,35 @@ +<?xml version="1.0" ?> +<!-- + (c) Copyright 2000-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>../options/DVTestPrintDecay.py</text> +</set></argument> +<argument name="validator"><text> +findReferenceBlock(""" +PrintJpsi.PrintDecayTreeTool INFO Name E M P Pt phi Vz P(C/K) PP(C/K) +PrintJpsi.PrintDecayTreeTool INFO MeV MeV MeV MeV mrad mm +PrintJpsi.PrintDecayTreeTool INFO J/psi(1S) 15767.75 3071.71 15465.66 2094.67 2606.38 33.92 0/0 N/A +PrintJpsi.PrintDecayTreeTool INFO +-->mu+ 10327.51 105.66 10326.97 2823.87 2629.61 64.74 1/4 2/150 +PrintJpsi.PrintDecayTreeTool INFO +-->mu- 5440.94 105.66 5439.91 732.58 -443.98 -29.25 1/1 2/85 +PrintJpsi.PrintDecayTreeTool INFO +PrintJpsi.PrintDecayTreeTool INFO Used TES locations :- +PrintJpsi.PrintDecayTreeTool INFO 1 = '/Event/Phys/StdAllLooseMuons/Particles' +PrintJpsi.PrintDecayTreeTool INFO 0 = '/Event/Phys/StdLooseJpsi2MuMu/Particles' +PrintJpsi.PrintDecayTreeTool INFO 2 = '/Event/Rec/ProtoP/Charged' +PrintJpsi.PrintDecayTreeTool INFO +""", stdout, result, causes, signature_offset = 0) +countErrorLines({"FATAL":0}) +</text></argument> +</extension> diff --git a/DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt b/DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt index 20463233d..8a28edb4b 100644 --- a/DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt +++ b/DaVinciTests/tests/qmtest/dtfdict.qms/test_dtfdict.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt b/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt index 3aef9e871..b448e6723 100644 --- a/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt +++ b/DaVinciTests/tests/qmtest/fsrs.qms/test-genfsr.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?><!DOCTYPE extension PUBLIC '-//QM/2.3/Extension//EN' 'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt index c42954531..3ddc4116c 100644 --- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt +++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_digi.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt index 44d2d435c..67a8bf2af 100644 --- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt +++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_ldst.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt index 418b8ad9e..0ca3cbf99 100644 --- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt +++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_mdf.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt index c62446843..2d12fbbe4 100644 --- a/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt +++ b/DaVinciTests/tests/qmtest/io.qms/test_read_mc_xdigi.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/io.qms/test_write_dst.qmt b/DaVinciTests/tests/qmtest/io.qms/test_write_dst.qmt index 62541f17f..062beeef3 100755 --- a/DaVinciTests/tests/qmtest/io.qms/test_write_dst.qmt +++ b/DaVinciTests/tests/qmtest/io.qms/test_write_dst.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/packing.qms/test_dstunpacking_upgrade.qmt b/DaVinciTests/tests/qmtest/packing.qms/test_dstunpacking_upgrade.qmt index 6c26524c6..526f65fe5 100755 --- a/DaVinciTests/tests/qmtest/packing.qms/test_dstunpacking_upgrade.qmt +++ b/DaVinciTests/tests/qmtest/packing.qms/test_dstunpacking_upgrade.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". diff --git a/DaVinciTests/tests/qmtest/pid.qms/test_dstannpid_upgrade.qmt b/DaVinciTests/tests/qmtest/pid.qms/test_dstannpid_upgrade.qmt index 7bc57c919..8045e45b3 100755 --- a/DaVinciTests/tests/qmtest/pid.qms/test_dstannpid_upgrade.qmt +++ b/DaVinciTests/tests/qmtest/pid.qms/test_dstannpid_upgrade.qmt @@ -1,6 +1,6 @@ <?xml version="1.0" ?> <!-- - (c) Copyright 2000-2018 CERN for the benefit of the LHCb Collaboration + (c) Copyright 2000-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". -- GitLab