From 42f3b3b662e7ad17af8a6d310330128d9799d706 Mon Sep 17 00:00:00 2001
From: Alex Pearce <alex.pearce@cern.ch>
Date: Wed, 30 Aug 2017 12:38:59 +0200
Subject: [PATCH] Update Tesla tests to account for recent changes.

The major differences are:

* Turbo processing generally requires `DaVinci().Turbo = True`;
* The packers now require the locations of packed containers that should
always be created to be explicitly specified, and emit a warning if
these are not specified.
---
 Phys/Tesla/tests/options/DV_2015_CaloCheck.py          |  1 +
 Phys/Tesla/tests/options/DV_2015_SharedContainers.py   |  1 +
 Phys/Tesla/tests/options/DaVinciCheckDiMuon.py         |  1 +
 Phys/Tesla/tests/options/DaVinciCheckDstp_PR.py        |  1 +
 Phys/Tesla/tests/options/TeslaStep.py                  |  1 -
 Phys/Tesla/tests/options/TupleStep.py                  | 10 +---------
 Phys/Tesla/tests/options/TupleStepOneLine.py           |  2 +-
 Phys/Tesla/tests/options/TupleStepStreams.py           |  1 +
 Phys/Tesla/tests/qmtest/tesla.qms/a_lumiGen.qmt        |  2 +-
 Phys/Tesla/tests/qmtest/tesla.qms/default.qmt          |  3 ++-
 Phys/Tesla/tests/qmtest/tesla.qms/default_2015.qmt     |  2 +-
 .../tests/qmtest/tesla.qms/lineChecker_failure.qmt     |  5 +++++
 12 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/Phys/Tesla/tests/options/DV_2015_CaloCheck.py b/Phys/Tesla/tests/options/DV_2015_CaloCheck.py
index ab683bea8..eed8c67e9 100644
--- a/Phys/Tesla/tests/options/DV_2015_CaloCheck.py
+++ b/Phys/Tesla/tests/options/DV_2015_CaloCheck.py
@@ -10,6 +10,7 @@ DstConf().Turbo=True
 DaVinci()
 DaVinci().EvtMax=-1
 DaVinci().DataType="2015"
+DaVinci().Turbo=True
 
 from GaudiConf import IOHelper
 IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True ) 
diff --git a/Phys/Tesla/tests/options/DV_2015_SharedContainers.py b/Phys/Tesla/tests/options/DV_2015_SharedContainers.py
index bce278719..be470648d 100644
--- a/Phys/Tesla/tests/options/DV_2015_SharedContainers.py
+++ b/Phys/Tesla/tests/options/DV_2015_SharedContainers.py
@@ -10,6 +10,7 @@ DstConf().Turbo=True
 DaVinci()
 DaVinci().EvtMax=-1
 DaVinci().DataType="2015"
+DaVinci().Turbo=True
 
 from GaudiConf import IOHelper
 IOHelper().inputFiles( ["tesla_2015_TCK.dst"] , clear=True ) 
diff --git a/Phys/Tesla/tests/options/DaVinciCheckDiMuon.py b/Phys/Tesla/tests/options/DaVinciCheckDiMuon.py
index eef664a07..f82147108 100644
--- a/Phys/Tesla/tests/options/DaVinciCheckDiMuon.py
+++ b/Phys/Tesla/tests/options/DaVinciCheckDiMuon.py
@@ -8,6 +8,7 @@ DaVinci()
 DaVinci().EvtMax=-1
 DaVinci().Lumi=True
 DaVinci().DataType="2016"
+DaVinci().Turbo=True
 
 from GaudiConf import IOHelper
 IOHelper().inputFiles( ["DiMuon.dst"] , clear=True ) 
diff --git a/Phys/Tesla/tests/options/DaVinciCheckDstp_PR.py b/Phys/Tesla/tests/options/DaVinciCheckDstp_PR.py
index 4d695b416..957dc7d17 100644
--- a/Phys/Tesla/tests/options/DaVinciCheckDstp_PR.py
+++ b/Phys/Tesla/tests/options/DaVinciCheckDstp_PR.py
@@ -8,6 +8,7 @@ DaVinci()
 DaVinci().EvtMax=-1
 DaVinci().Lumi=True
 DaVinci().DataType="2016"
+DaVinci().Turbo=True
 
 from GaudiConf import IOHelper
 IOHelper().inputFiles( ["Dstp_PR.dst"] , clear=True ) 
diff --git a/Phys/Tesla/tests/options/TeslaStep.py b/Phys/Tesla/tests/options/TeslaStep.py
index 5d86e0a60..431c35d3a 100644
--- a/Phys/Tesla/tests/options/TeslaStep.py
+++ b/Phys/Tesla/tests/options/TeslaStep.py
@@ -4,7 +4,6 @@ Tesla().InputType = "RAW"
 Tesla().DataType = '2016'
 Tesla().Simulation = False
 Tesla().Mode = 'Online'
-Tesla().RawFormatVersion = 0.2
 Tesla().VertRepLoc = 'Hlt2'
 Tesla().KillInputHlt2Reps = True
 
diff --git a/Phys/Tesla/tests/options/TupleStep.py b/Phys/Tesla/tests/options/TupleStep.py
index 3287738e9..1da06b269 100644
--- a/Phys/Tesla/tests/options/TupleStep.py
+++ b/Phys/Tesla/tests/options/TupleStep.py
@@ -1,18 +1,10 @@
 from Configurables import DaVinci
 from Configurables import DecayTreeTuple
 
-from Configurables import DstConf
-DstConf().Turbo=True
-
 Tuple = DecayTreeTuple("psi")
 Tuple.Decay = "J/psi(1S) -> mu+ mu-"
 Tuple.Inputs = [ '/Event/Turbo/Hlt2DiMuonJPsiTurbo/Particles']
 
-from Configurables import DstConf, TurboConf
-DstConf().Turbo = True
-TurboConf().PersistReco = True
-from StandardParticles import StdAllNoPIDsPions
-
 # Necessary DaVinci parameters #################
 DaVinci().Simulation   = False
 DaVinci().SkipEvents = 0
@@ -24,4 +16,4 @@ DaVinci().DataType      = '2016'
 DaVinci().UserAlgorithms = [] 
 DaVinci().UserAlgorithms += [Tuple]
 DaVinci().InputType = 'MDST'
-
+DaVinci().Turbo = True
diff --git a/Phys/Tesla/tests/options/TupleStepOneLine.py b/Phys/Tesla/tests/options/TupleStepOneLine.py
index 80d825849..21d75bb84 100644
--- a/Phys/Tesla/tests/options/TupleStepOneLine.py
+++ b/Phys/Tesla/tests/options/TupleStepOneLine.py
@@ -2,4 +2,4 @@ from GaudiConf import IOHelper
 IOHelper().inputFiles(['PFN:Tesla.dst'])
 from Configurables import DaVinci
 DaVinci().TupleFile = 'TupleStepOneLine.root'
-
+DaVinci().RootInTES = '/Event/Turbo'
diff --git a/Phys/Tesla/tests/options/TupleStepStreams.py b/Phys/Tesla/tests/options/TupleStepStreams.py
index e5c272338..fab7702a6 100644
--- a/Phys/Tesla/tests/options/TupleStepStreams.py
+++ b/Phys/Tesla/tests/options/TupleStepStreams.py
@@ -2,3 +2,4 @@ from GaudiConf import IOHelper
 IOHelper().inputFiles(['PFN:DiMuon.dst'])
 from Configurables import DaVinci
 DaVinci().TupleFile = 'TupleStepStreams.root'
+DaVinci().RootInTES = '/Event/DiMuon/Turbo'
diff --git a/Phys/Tesla/tests/qmtest/tesla.qms/a_lumiGen.qmt b/Phys/Tesla/tests/qmtest/tesla.qms/a_lumiGen.qmt
index 2a3185cb1..966e3ae7b 100644
--- a/Phys/Tesla/tests/qmtest/tesla.qms/a_lumiGen.qmt
+++ b/Phys/Tesla/tests/qmtest/tesla.qms/a_lumiGen.qmt
@@ -20,7 +20,7 @@
     <text>../options/TeslaRawReprocess.py</text>
   </set></argument>
   <argument name="validator"><text>
-countErrorLines({"FATAL":0, "ERROR":1595, "WARNING" :0})
+countErrorLines({"FATAL":0, "ERROR":1595, "WARNING" :1})
   </text></argument>
 </extension>
 
diff --git a/Phys/Tesla/tests/qmtest/tesla.qms/default.qmt b/Phys/Tesla/tests/qmtest/tesla.qms/default.qmt
index c7fee8aed..cb42dd7f5 100644
--- a/Phys/Tesla/tests/qmtest/tesla.qms/default.qmt
+++ b/Phys/Tesla/tests/qmtest/tesla.qms/default.qmt
@@ -19,8 +19,9 @@
   <argument name="args"><set>
     <text>../options/default.py</text>
   </set></argument>
+  <!-- TODO: we see 161 more errors than we should -->
   <argument name="validator"><text>
-countErrorLines({"FATAL":0, "ERROR":5561, "WARNING" :161})
+countErrorLines({"FATAL":0, "ERROR":5561, "WARNING" :162})
 #findReferenceBlock("""
 #Hlt2SelReportsD...  ERROR HltSelReportsDecoder::  Did not find string key for trigger selection in storage
 #""", id = "AllowResp" )
diff --git a/Phys/Tesla/tests/qmtest/tesla.qms/default_2015.qmt b/Phys/Tesla/tests/qmtest/tesla.qms/default_2015.qmt
index 774042ecc..d94eb9f01 100644
--- a/Phys/Tesla/tests/qmtest/tesla.qms/default_2015.qmt
+++ b/Phys/Tesla/tests/qmtest/tesla.qms/default_2015.qmt
@@ -20,7 +20,7 @@
     <text>../options/TCK_2015RP.py</text>
   </set></argument>
   <argument name="validator"><text>
-countErrorLines({"FATAL":0, "ERROR":0, "WARNING" :0})
+countErrorLines({"FATAL":0, "ERROR":0, "WARNING" :1})
 </text></argument>
 </extension>
 
diff --git a/Phys/Tesla/tests/qmtest/tesla.qms/lineChecker_failure.qmt b/Phys/Tesla/tests/qmtest/tesla.qms/lineChecker_failure.qmt
index 54941792c..a7f5f1cf5 100644
--- a/Phys/Tesla/tests/qmtest/tesla.qms/lineChecker_failure.qmt
+++ b/Phys/Tesla/tests/qmtest/tesla.qms/lineChecker_failure.qmt
@@ -31,6 +31,11 @@ TeslaLineChecker    ERROR Affected run : 179348
 TeslaLineChecker    ERROR Affected TCK : 0x21361609
 TeslaLineChecker    ERROR FIX!
 TeslaLineChecker    ERROR In case you are testing, set Tesla().EnableLineChecker = False to skip this check.
+TeslaLineChecker    ERROR Maximum number of errors ( 'ErrorMax':1) reached.
+DaVinciUserSequ...  ERROR Maximum number of errors ( 'ErrorMax':1) reached.
+DaVinciAnalysisSeq  ERROR Maximum number of errors ( 'ErrorMax':1) reached.
+FilteredEventSeq    ERROR Maximum number of errors ( 'ErrorMax':1) reached.
+DaVinciEventSeq     ERROR Maximum number of errors ( 'ErrorMax':1) reached.
 EventLoopMgr      WARNING Execution of algorithm DaVinciEventSeq failed
 EventLoopMgr        ERROR Error processing event loop.
 EventLoopMgr        ERROR Terminating event processing loop due to errors
-- 
GitLab