From 137d1b6768336fff3092b1bba0c30ca8489fa658 Mon Sep 17 00:00:00 2001
From: Tomasz Bold <tomasz.bold@gmail.com>
Date: Wed, 24 Oct 2018 10:09:51 +0200
Subject: [PATCH] adapttations after move of the serialiser tool

Former-commit-id: 95ccf2360dd4993c31ec75932cfa5b6deb8e38e2
---
 .../components/TrigOutputHandling_entries.cxx |  6 ++---
 .../TrigUpgradeTest/share/egamma.withViews.py | 23 +++++++++----------
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx b/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx
index c546e10ab5b..fb8e7791fef 100644
--- a/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx
+++ b/Trigger/TrigSteer/TrigOutputHandling/src/components/TrigOutputHandling_entries.cxx
@@ -1,14 +1,14 @@
-#include "../HLTResultCreatorByteStream.h"
 #include "../HLTEDMCreator.h"
 #include "../StreamTagMakerTool.h"
 #include "../HLTResultMTMakerAlg.h"
 #include "../DecisionSummaryMakerAlg.h"
 #include "../TriggerBitsMakerTool.h"
+#include "../TriggerEDMSerialiserTool.h"
+
 
-DECLARE_COMPONENT( HLTResultCreatorByteStream )
 DECLARE_COMPONENT( HLTEDMCreator )
 DECLARE_COMPONENT( HLTResultMTMakerAlg )
 DECLARE_COMPONENT( StreamTagMakerTool )
 DECLARE_COMPONENT( DecisionSummaryMakerAlg )
 DECLARE_COMPONENT( TriggerBitsMakerTool )
-
+DECLARE_COMPONENT( TriggerEDMSerialiserTool )
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
index 098d9c98bac..c8d979de6c3 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/egamma.withViews.py
@@ -246,7 +246,7 @@ summary = TriggerSummaryAlg( "TriggerSummaryAlg" )
 summary.InputDecision = "HLTChains"
 summary.FinalDecisions = [ "ElectronL2Decisions", "MuonL2Decisions" ]
 
-from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator, HLTResultCreatorByteStream
+from TrigOutputHandling.TrigOutputHandlingConf import HLTEDMCreator
 egammaViewsMerger = HLTEDMCreator("egammaViewsMerger")
 egammaViewsMerger.TrigCompositeContainer = [ "L2ElectronLinks", "filterCaloRoIsAlg", "EgammaCaloDecisions","ElectronL2Decisions", "MuonL2Decisions", "EMRoIDecisions", "METRoIDecisions", "MURoIDecisions", "HLTChainsResult", "JRoIDecisions", "MonitoringSummaryStep1", "RerunEMRoIDecisions", "RerunMURoIDecisions", "TAURoIDecisions", "L2CaloLinks", "FilteredEMRoIDecisions", "FilteredEgammaCaloDecisions" ]
 
@@ -267,16 +267,8 @@ egammaViewsMerger.OutputLevel = VERBOSE
 
 svcMgr.StoreGateSvc.OutputLevel = INFO
 
-streamingTool = HLTResultCreatorByteStream(OutputLevel=VERBOSE)
 
-
-
-streamingTool.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions",
-                                         "xAOD::TrigCompositeAuxContainer_v1#EgammaCaloDecisionsAux.",
-                                         "xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex",
-                                         "xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux."  ]
-
-summary.OutputTools = [ egammaViewsMerger, streamingTool ]
+summary.OutputTools = [ egammaViewsMerger ]
 
 
 summary.OutputLevel = DEBUG
@@ -343,7 +335,7 @@ StreamESD.ItemList += [ "ROIB::RoIBResult#*" ]
 print "ESD file content " 
 print StreamESD.ItemList
 
-from TrigOutputHandling.TrigOutputHandlingConf import DecisionSummaryMakerAlg, HLTResultMTMakerAlg, StreamTagMakerTool, TriggerBitsMakerTool
+from TrigOutputHandling.TrigOutputHandlingConf import DecisionSummaryMakerAlg, HLTResultMTMakerAlg, StreamTagMakerTool, TriggerBitsMakerTool, TriggerEDMSerialiserTool
 summMaker = DecisionSummaryMakerAlg()
 summMaker.FinalDecisionKeys = [ theElectronHypo.HypoOutputDecisions ]
 summMaker.FinalStepDecisions =  dict( [ ( tool.getName(), theElectronHypo.HypoOutputDecisions ) for tool in theElectronHypo.HypoTools ] )
@@ -353,6 +345,13 @@ print summMaker
 ################################################################################
 # test online HLT Result maker
 
+serialiser = TriggerEDMSerialiserTool(OutputLevel=VERBOSE)
+
+serialiser.CollectionsToSerialize = [ "xAOD::TrigCompositeContainer_v1#EgammaCaloDecisions",
+                                      "xAOD::TrigCompositeAuxContainer_v1#EgammaCaloDecisionsAux.",
+                                      "xAOD::TrigElectronContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFex",
+                                      "xAOD::TrigElectronAuxContainer_v1#HLT_xAOD__TrigElectronContainer_L2ElectronFexAux."  ]
+
 stmaker = StreamTagMakerTool()
 stmaker.OutputLevel = DEBUG
 stmaker.ChainDecisions = "HLTFinalDecisions"
@@ -364,7 +363,7 @@ bitsmaker.ChainToBit = dict( [ (chain, 10*num) for num,chain in enumerate(testCh
 bitsmaker.OutputLevel = DEBUG
 
 hltResultMaker =  HLTResultMTMakerAlg()
-hltResultMaker.MakerTools = [ stmaker, bitsmaker ]
+hltResultMaker.MakerTools = [ stmaker, bitsmaker, serialiser ]
 hltResultMaker.OutputLevel = DEBUG
 
 from AthenaMonitoring.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
-- 
GitLab