From c427e80e997c93ece403faef7888665c7d8ef863 Mon Sep 17 00:00:00 2001
From: Charles Leggett <charles.g.leggett@gmail.com>
Date: Wed, 26 Apr 2017 19:33:34 +0000
Subject: [PATCH] update Gaudi to v28r2

---
 .../CaloHiveEx/share/CaloHiveExOpts.py        |   7 +-
 .../CaloHiveEx/share/CaloHiveExOpts_alt.py    |   8 +-
 Control/AthViews/share/GraphViews.py          |  10 +-
 Control/AthenaCommon/python/AlgScheduler.py   | 138 ++++++++++++++++++
 .../AthenaCommon/python/AtlasThreadedJob.py   |  28 ++--
 .../AthExHive/share/AthExHiveOpts.py          |  20 +--
 .../AthExHive/share/CircDataDep.py            |  20 +--
 .../AthExHive/share/CondAlgsOpts.py           |  30 +---
 .../AthExHive/share/DataLoopTest.py           |  24 +--
 .../share/StoreGateHiveExample.py             |  18 +--
 ...oreGateHiveExample_Reentrant_jobOptions.py |  16 +-
 .../GenericMonitoringToolTest_jobOptions.py   |  15 +-
 .../AthenaPython/AthenaPython/PyProperty.h    |   2 +-
 .../StoreGate/VarHandleKeyArrayProperty.h     |   2 +-
 .../StoreGate/VarHandleKeyProperty.h          |   2 +-
 .../src/ByteStreamEmonInputSvc.cxx            |   1 -
 .../InDetRecExample/share/InDetHivePreExec.py |   9 +-
 .../share/MuonRec_myTopOptions_MT.py          |   6 +-
 Projects/Athena/externals.txt                 |   2 +-
 .../G4Sim/G4HiveEx/share/G4HiveExOpts.py      |  11 +-
 .../TrigT2CaloEgamma/share/FFL2CaloEgamma.py  |  11 +-
 .../TrigFTKSim/src/FTKTrackFitterAlgo.cxx     |   4 +-
 Trigger/TrigSteer/L1Decoder/share/decodeBS.py |  11 +-
 Trigger/TrigSteer/L1Decoder/share/graphRun.py |  15 +-
 .../share/BasicMTTrackingTrigger.py           |  11 +-
 .../share/ID_RawDataMT_Trigger.py             |  11 +-
 .../ViewAlgsTest/share/InDetTrigPreExec.py    |  13 +-
 .../ViewAlgsTest/share/menuViewRun.py         |   9 +-
 28 files changed, 279 insertions(+), 175 deletions(-)
 create mode 100644 Control/AthenaCommon/python/AlgScheduler.py

diff --git a/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts.py b/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts.py
index fead313ff69..259f6b53561 100644
--- a/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts.py
+++ b/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts.py
@@ -13,9 +13,10 @@ nThreads = jp.ConcurrencyFlags.NumThreads()
 nProc = jp.ConcurrencyFlags.NumProcs()
 
 if nThreads >=1 :
-   from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-   svcMgr += ForwardSchedulerSvc()
-   svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+   from AthenaCommon.AlgScheduler import AlgScheduler
+   AlgScheduler.OutputLevel( INFO )
+   AlgScheduler.ShowControlFlow( True )
+   AlgScheduler.ShowDataDependencies( True )
 
    # Support for the MT-MP hybrid mode
    if (nProc > 0) :
diff --git a/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts_alt.py b/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts_alt.py
index de895cec8bc..ae0d8b300df 100644
--- a/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts_alt.py
+++ b/Calorimeter/CaloExample/CaloHiveEx/share/CaloHiveExOpts_alt.py
@@ -33,10 +33,10 @@ if (nThreads < 1) :
 # from GaudiHive.GaudiHiveConf import AlgResourcePool
 # svcMgr += AlgResourcePool( OutputLevel = INFO );
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-# svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.OutputLevel( INFO )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
 
 from RecExConfig.RecFlags import rec
 rec.doTruth.set_Value_and_Lock(False)
diff --git a/Control/AthViews/share/GraphViews.py b/Control/AthViews/share/GraphViews.py
index b88bc9f6f12..9fa9401983a 100644
--- a/Control/AthViews/share/GraphViews.py
+++ b/Control/AthViews/share/GraphViews.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 ###############################################################
 #
 # Job options file
@@ -11,9 +15,9 @@
 #--------------------------------------------------------------
 
 # Configure the scheduler
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
 
 # Make a separate alg pool for the view algs
 from GaudiHive.GaudiHiveConf import AlgResourcePool
diff --git a/Control/AthenaCommon/python/AlgScheduler.py b/Control/AthenaCommon/python/AlgScheduler.py
new file mode 100644
index 00000000000..440df7d574f
--- /dev/null
+++ b/Control/AthenaCommon/python/AlgScheduler.py
@@ -0,0 +1,138 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
+# Configuration for the Hive Algorithm Scheduler.
+#
+# Allows easy low level replacement of the specific Scheduler, without
+# requiring clients to know which one is in use.
+#
+# the AlgScheduler will be setup with the same number of threads
+# as are specified on the command line with the "--threads=N" parameter
+#
+# usage:
+#  from AthenaCommon.AlgScheduler import AlgScheduler
+# clients can then configure runtime printouts, threadpool, etc:
+#  AlgScheduler.ShowDataDependencies( True )
+#  AlgScheduler.ShowControlFlow( True )
+#  AlgScheduler.ShowDataFlow( True )
+#  AlgScheduler.setThreadPoolSize( 7 )
+#
+# if a specific scheduler lacks that option, a warning message is printed
+# clients can also replace the default scheduler with another one
+#  from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
+#  myScheduler = ForwardSchedulerSvc()
+#  AlgScheduler.SetScheduler( myScheduler )
+#  AlgScheduler.setThreadPoolSize( 7 )
+#
+# if this is done, the HiveEventLoopMgr also needs to know about it
+#    from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr
+#    svcMgr.AthenaHiveEventLoopMgr.SchedulerSvc = AlgScheduler.getScheduler().getName()
+#
+
+
+class AlgScheduler:
+    def __init__(self,theSched=None):
+        """Setup Algorithm Scheduler"""
+
+        from AppMgr import ServiceMgr as svcMgr
+        from Constants import VERBOSE, DEBUG, INFO, ERROR
+
+        from ConcurrencyFlags import jobproperties as jps
+        from AthenaCommon.Logging import logging
+
+        self.log = logging.getLogger( 'AlgScheduler' )
+
+        if (theSched == None) :
+            from GaudiHive.GaudiHiveConf import AvalancheSchedulerSvc
+            svcMgr += AvalancheSchedulerSvc()
+            self.SchedulerSvc = svcMgr.AvalancheSchedulerSvc
+        else :
+            svcMgr += theSched
+            self.SchedulerSvc = theSched
+            
+        self.SchedulerSvc.OutputLevel = INFO
+        self.SchedulerSvc.CheckDependencies = True
+        self.SchedulerSvc.ThreadPoolSize = jps.ConcurrencyFlags.NumThreads()
+
+        self.log.info("setting up " + self.SchedulerSvc.getFullName() + " with " + str(jps.ConcurrencyFlags.NumThreads()) + " threads")
+
+
+#
+## exchange the current scheduler for another one
+    def SetScheduler(self,theSched):
+        """setup a different Scheduler"""
+
+        if (self.SchedulerSvc.getFullName() != theSched.getFullName()) :
+            self.log.info("replacing " + self.SchedulerSvc.getFullName() 
+                          + " with " + theSched.getFullName())
+            from AppMgr import ServiceMgr as svcMgr
+            svcMgr.remove(self.SchedulerSvc)
+            svcMgr += theSched
+            self.SchedulerSvc = theSched
+
+#
+## change the output level
+    def OutputLevel(self,level) :
+        self.SchedulerSvc.OutputLevel = level
+        
+#
+## control checking of data deps at beginning of job for unmet input deps
+    def CheckDependencies(self,check=True):
+        if ( 'CheckDependencies' in self.SchedulerSvc.properties() ):
+            self.SchedulerSvc.CheckDependencies = check
+        else :
+            self.log.warning( self.SchedulerSvc.getFullName() + " has no property \"CheckDependencies\"")
+
+#
+## control printout of control flow at beginning of job
+    def ShowControlFlow(self,show=True):
+        if ( 'ShowControlFlow' in self.SchedulerSvc.properties() ):
+            self.SchedulerSvc.ShowControlFlow = show
+        else :
+            self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"ShowControlFlow\"")
+
+#
+## control printout of data flow at beginning of job
+    def ShowDataFlow(self,show=True):
+        if ( 'ShowDataFlow' in self.SchedulerSvc.properties() ):
+            self.SchedulerSvc.ShowDataFlow = show
+        else :
+            self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"ShowDataFlow\"")
+
+#
+## control printout of data dependencies at beginning of job
+    def ShowDataDependencies(self,show=True):
+        if ( 'ShowDataDependencies' in self.SchedulerSvc.properties() ):
+            self.SchedulerSvc.ShowDataDependencies = show
+        else :
+            self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"ShowDataDependencies\"")
+
+
+#
+## set the DataLoader Algorithm to handle unmet input data deps
+    def setDataLoaderAlg(self,dataLoadAlg):
+        if ( 'DataLoaderAlg' in self.SchedulerSvc.properties() ):
+            self.SchedulerSvc.DataLoaderAlg = dataLoadAlg
+        else :
+            self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"DataLoaderAlg\"")
+
+#
+## enable condition handling
+    def EnableConditions(self,enable=True):
+        if ( 'EnableConditions' in self.SchedulerSvc.properties() ):
+            self.SchedulerSvc.EnableConditions = enable
+        else :
+            self.log.warning(self.SchedulerSvc.getFullName() + " has no property \"EnableConditions\"")
+
+
+#
+## explicitly set the thread pool size
+    def setThreadPoolSize(self,tps) :
+        self.SchedulerSvc.ThreadPoolSize = tps
+
+#
+## get the currently configured scheduler
+    def getScheduler(self):
+        """Get the Scheduler"""
+        return self.SchedulerSvc
+
+AlgScheduler = AlgScheduler()
diff --git a/Control/AthenaCommon/python/AtlasThreadedJob.py b/Control/AthenaCommon/python/AtlasThreadedJob.py
index f150006d1b6..d56a9314920 100644
--- a/Control/AthenaCommon/python/AtlasThreadedJob.py
+++ b/Control/AthenaCommon/python/AtlasThreadedJob.py
@@ -26,14 +26,6 @@ def _setupAtlasThreadedJob():
 
     theApp.StatusCodeCheck = False
 
-    from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr
-
-    svcMgr += AthenaHiveEventLoopMgr()
-    svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc"
-#    svcMgr.AthenaHiveEventLoopMgr.OutputLevel = INFO
-
-    theApp.EventLoop = "AthenaHiveEventLoopMgr"
-
     svcMgr.StatusCodeSvc.AbortOnError = False
 
     nThreads = jps.ConcurrencyFlags.NumThreads()
@@ -44,7 +36,6 @@ def _setupAtlasThreadedJob():
     from StoreGate.StoreGateConf import SG__HiveMgrSvc
     svcMgr += SG__HiveMgrSvc("EventDataSvc")
     svcMgr.EventDataSvc.NSlots = numStores
-#    svcMgr.EventDataSvc.OutputLevel = INFO
 
     import StoreGate.StoreGateConf as StoreGateConf
     svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
@@ -55,14 +46,17 @@ def _setupAtlasThreadedJob():
     arp.TopAlg=["AthMasterSeq"] #this should enable control flow
     svcMgr += arp
 
-    from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-    svcMgr += ForwardSchedulerSvc()
-    svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
-    svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-    svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = numAlgsInFlight
-    svcMgr.ForwardSchedulerSvc.ThreadPoolSize = numThreads
-    svcMgr.ForwardSchedulerSvc.useGraphFlowManagement = True
-    svcMgr.ForwardSchedulerSvc.DataFlowManagerNext = True
+    from AlgScheduler import AlgScheduler
+    AlgScheduler.ShowDataDependencies(False)
+    AlgScheduler.ShowControlFlow(False)
+
+    from AthenaServices.AthenaServicesConf import AthenaHiveEventLoopMgr
+
+    svcMgr += AthenaHiveEventLoopMgr()
+    svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc"
+    svcMgr.AthenaHiveEventLoopMgr.SchedulerSvc = AlgScheduler.getScheduler().getName()
+
+    theApp.EventLoop = "AthenaHiveEventLoopMgr"
 
     # enable timeline recording
     from GaudiHive.GaudiHiveConf import TimelineSvc
diff --git a/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py b/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py
index f8c9afacdc6..0cba895b81b 100644
--- a/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py
+++ b/Control/AthenaExamples/AthExHive/share/AthExHiveOpts.py
@@ -27,22 +27,10 @@ from StoreGate.StoreGateConf import SG__HiveMgrSvc
 from GaudiHive.GaudiHiveConf import AlgResourcePool
 # svcMgr += AlgResourcePool( OutputLevel = INFO );
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-
-#
-## Override defaults for numStores and numAlgsInFlight 
-##   Otherwise these are BOTH EQUAL to the number of threads set with the 
-##   command line opt --threads=N
-#
-
-# numStores = 1
-# numAlgsInFlight = 1
-
-# svcMgr.EventDataSvc.NSlots = numStores
-# svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-# svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = numAlgsInFlight
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.OutputLevel( INFO )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
 
 # ThreadPoolService thread local initialization
 from GaudiHive.GaudiHiveConf import ThreadPoolSvc
diff --git a/Control/AthenaExamples/AthExHive/share/CircDataDep.py b/Control/AthenaExamples/AthExHive/share/CircDataDep.py
index 74405b12079..4c7e1411988 100644
--- a/Control/AthenaExamples/AthExHive/share/CircDataDep.py
+++ b/Control/AthenaExamples/AthExHive/share/CircDataDep.py
@@ -26,22 +26,10 @@ from StoreGate.StoreGateConf import SG__HiveMgrSvc
 from GaudiHive.GaudiHiveConf import AlgResourcePool
 # svcMgr += AlgResourcePool( OutputLevel = INFO );
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-
-#
-## Override defaults for numStores and numAlgsInFlight 
-##   Otherwise these are BOTH EQUAL to the number of threads set with the 
-##   command line opt --threads=N
-#
-
-# numStores = 1
-# numAlgsInFlight = 1
-
-# svcMgr.ForwardSchedulerSvc.DataLoaderAlg = "SGInputLoader"
-svcMgr.ForwardSchedulerSvc.ShowConfiguration = True
-svcMgr.ForwardSchedulerSvc.ShowDataFlow = True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.OutputLevel( INFO )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
 
 #------------------------------------------------------------------------------#
 #
diff --git a/Control/AthenaExamples/AthExHive/share/CondAlgsOpts.py b/Control/AthenaExamples/AthExHive/share/CondAlgsOpts.py
index e3b2472b03b..5f8860b2c32 100644
--- a/Control/AthenaExamples/AthExHive/share/CondAlgsOpts.py
+++ b/Control/AthenaExamples/AthExHive/share/CondAlgsOpts.py
@@ -35,29 +35,11 @@ from StoreGate.StoreGateConf import SG__HiveMgrSvc
 from GaudiHive.GaudiHiveConf import AlgResourcePool
 # svcMgr += AlgResourcePool( OutputLevel = INFO );
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-svcMgr.ForwardSchedulerSvc.EnableConditions = True
-
-#
-## Override defaults for numStores and numAlgsInFlight 
-##   Otherwise these are BOTH EQUAL to the number of threads set with the 
-##   command line opt --threads=N
-#
-
-# numStores = 1
-# numAlgsInFlight = 1
-
-# svcMgr.EventDataSvc.NSlots = numStores
-# svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-# svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = numAlgsInFlight
-
-# ThreadPoolService thread local initialization
-# from GaudiHive.GaudiHiveConf import ThreadPoolSvc
-# svcMgr += ThreadPoolSvc("ThreadPoolSvc")
-# svcMgr.ThreadPoolSvc.ThreadInitTools = ["ThreadInitTool"]
-
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.OutputLevel( INFO )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
+AlgScheduler.EnableConditions( True )
 
 from IOVSvc.IOVSvcConf import CondSvc
 svcMgr += CondSvc( OutputLevel=DEBUG )
@@ -85,7 +67,7 @@ from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 
 from SGComps.SGCompsConf import SGInputLoader
-topSequence+=SGInputLoader(OutputLevel=INFO, ShowEventDump=False)
+topSequence+=SGInputLoader(OutputLevel=DEBUG, ShowEventDump=False)
 topSequence.SGInputLoader.Load = [ ('EventInfo','McEventInfo') ]
 
 from AthExHive.AthExHiveConf import *
diff --git a/Control/AthenaExamples/AthExHive/share/DataLoopTest.py b/Control/AthenaExamples/AthExHive/share/DataLoopTest.py
index c6d2af245e9..4c611a9e00f 100644
--- a/Control/AthenaExamples/AthExHive/share/DataLoopTest.py
+++ b/Control/AthenaExamples/AthExHive/share/DataLoopTest.py
@@ -27,23 +27,11 @@ from StoreGate.StoreGateConf import SG__HiveMgrSvc
 from GaudiHive.GaudiHiveConf import AlgResourcePool
 # svcMgr += AlgResourcePool( OutputLevel = INFO );
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr.ForwardSchedulerSvc.OutputLevel = INFO
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-svcMgr.ForwardSchedulerSvc.useGraphFlowManagement = True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.OutputLevel( INFO )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
 
-#
-## Override defaults for numStores and numAlgsInFlight 
-##   Otherwise these are BOTH EQUAL to the number of threads set with the 
-##   command line opt --threads=N
-#
-
-# numStores = 1
-# numAlgsInFlight = 1
-
-# svcMgr.EventDataSvc.NSlots = numStores
-# svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-# svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = numAlgsInFlight
 
 # ThreadPoolService thread local initialization
 from GaudiHive.GaudiHiveConf import ThreadPoolSvc
@@ -95,8 +83,8 @@ HL3 = HiveAlgL3("AlgL3",OutputLevel=DEBUG,Key_U1=loopKey,Time=120)
 HM = HiveAlgM("AlgM",OutputLevel=DEBUG,Key_R2=loopKey,Offset=3,Time=30)
 
 alp += HL1
-alp += HL2
-alp += HL3
+# alp += HL2
+# alp += HL3
 alp += HM
 topSequence += alp
 
diff --git a/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample.py b/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample.py
index 89fcc3cda56..e7c2dedc513 100755
--- a/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample.py
+++ b/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 ###############################################################
 #
 # AthExStoreGateExample Job options file reading Generated events
@@ -26,15 +30,11 @@ from StoreGate.StoreGateConf import SG__HiveMgrSvc
 svcMgr += SG__HiveMgrSvc("EventDataSvc")
 svcMgr.EventDataSvc.NSlots = numStores
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.OutputLevel = DEBUG
-svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = 1
-svcMgr.ForwardSchedulerSvc.ThreadPoolSize = 1
-
-svcMgr.ForwardSchedulerSvc.AlgosDependencies = [[],['8000/WriteData'],[],[]]
-
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.OutputLevel( DEBUG )
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
+AlgScheduler.setThreadPoolSize( 1 )
 
 svcMgr += AthenaHiveEventLoopMgr()
 svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc"
diff --git a/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample_Reentrant_jobOptions.py b/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample_Reentrant_jobOptions.py
index 182a64a856b..ad71ca0eb38 100755
--- a/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample_Reentrant_jobOptions.py
+++ b/Control/AthenaExamples/AthExStoreGateExample/share/StoreGateHiveExample_Reentrant_jobOptions.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 ###############################################################
 #
 # AthExStoreGateExample Job options file reading Generated events
@@ -26,19 +30,15 @@ from StoreGate.StoreGateConf import SG__HiveMgrSvc
 svcMgr += SG__HiveMgrSvc("EventDataSvc")
 svcMgr.EventDataSvc.NSlots = numStores
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.OutputLevel = DEBUG
-svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = 1
-svcMgr.ForwardSchedulerSvc.ThreadPoolSize = 1
-
-svcMgr.ForwardSchedulerSvc.AlgosDependencies = [[],['8000/WriteData'],[],[]]
+#svcMgr.ForwardSchedulerSvc.AlgosDependencies = [[],['8000/WriteData'],[],[]]
 
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.setThreadPoolSize( 1 )
 
 svcMgr += AthenaHiveEventLoopMgr()
 svcMgr.AthenaHiveEventLoopMgr.WhiteboardSvc = "EventDataSvc"
 svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG
+svcMgr.AthenaHiveEventLoopMgr.SchedulerSvc = AlgScheduler.getScheduler().getName()
 
 from StoreGate.StoreGateConf import SG__HiveMgrSvc
 svcMgr += SG__HiveMgrSvc("EventDataSvc")
diff --git a/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py b/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py
index 1eb9e3c3938..721249e74f0 100755
--- a/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py
+++ b/Control/AthenaMonitoring/share/GenericMonitoringToolTest_jobOptions.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 ## basic job configuration
 import AthenaCommon.AtlasUnixStandardJob
 
@@ -64,13 +68,10 @@ print svcMgr
 
 theApp.EvtMax = 1
 
-
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = 1
-svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = 1
-svcMgr.ForwardSchedulerSvc.ThreadPoolSize = 1
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataDependencies( True )
+AlgScheduler.setThreadPoolSize( 1 )
 
 
 print "topSequence dump:", topSequence
diff --git a/Control/AthenaPython/AthenaPython/PyProperty.h b/Control/AthenaPython/AthenaPython/PyProperty.h
index 0f28e13a7e6..199c5ad7bb3 100644
--- a/Control/AthenaPython/AthenaPython/PyProperty.h
+++ b/Control/AthenaPython/AthenaPython/PyProperty.h
@@ -26,7 +26,7 @@ typedef _object PyObject;
 
 
 class PyProperty
-  : public PropertyWithHandlers
+  : public PropertyWithHandlers<>
 { 
 
   /////////////////////////////////////////////////////////////////// 
diff --git a/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h b/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h
index 6d2b09892a7..cfdceea3bb4 100644
--- a/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h
+++ b/Control/StoreGate/StoreGate/VarHandleKeyArrayProperty.h
@@ -33,7 +33,7 @@ namespace Gaudi {
 namespace SG {
 
   class GAUDI_API VarHandleKeyArrayProperty
-    : public ::PropertyWithHandlers 
+    : public ::PropertyWithHandlers <>
   {
   public:
  
diff --git a/Control/StoreGate/StoreGate/VarHandleKeyProperty.h b/Control/StoreGate/StoreGate/VarHandleKeyProperty.h
index 267ecae8dbb..d58b947bebd 100644
--- a/Control/StoreGate/StoreGate/VarHandleKeyProperty.h
+++ b/Control/StoreGate/StoreGate/VarHandleKeyProperty.h
@@ -76,7 +76,7 @@ namespace SG {
  * The Property object refers to an instance of @c SG::VarHandleKey
  * (the value object) and provides generic methods for manipulating it.
  */
-class GAUDI_API VarHandleKeyProperty : public PropertyWithHandlers 
+  class GAUDI_API VarHandleKeyProperty : public PropertyWithHandlers <>
 {
 public:
 
diff --git a/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx b/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx
index e56f1b650f6..44074f08cf5 100644
--- a/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx
+++ b/HLT/Event/ByteStreamEmonSvc/src/ByteStreamEmonInputSvc.cxx
@@ -432,7 +432,6 @@ const RawEvent* ByteStreamEmonInputSvc::nextEvent()
             try {
                 m_re->check_tree();
                 log << MSG::INFO << "nextEvent: Got valid fragment of size:" << event.size() << endmsg;
-                log << MSG::INFO << "nextEvent: Got valid fragment of size:" << event.size() << endreq;
                 m_robProvider->setNextEvent(m_re);
                 m_robProvider->setEventStatus(0);
             } catch (ers::Issue& ex) {
diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetHivePreExec.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetHivePreExec.py
index fa9c3168aff..fcc34dd7472 100644
--- a/InnerDetector/InDetExample/InDetRecExample/share/InDetHivePreExec.py
+++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetHivePreExec.py
@@ -1,7 +1,10 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #Early failure warning
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.CheckDependencies( True )
 
 ## get a handle on the ServiceManager
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
diff --git a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py
index 23f7fe382bd..22d1e6e1c75 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py
+++ b/MuonSpectrometer/MuonReconstruction/MuonRecExample/share/MuonRec_myTopOptions_MT.py
@@ -80,9 +80,9 @@ try:
     include("MuonRecExample/MuonRec_topOptions.py")
    
     from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-    from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-    svcMgr += ForwardSchedulerSvc()
-    svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+    from AthenaCommon.AlgScheduler import AlgScheduler
+    AlgScheduler.CheckDependencies( True )
+
     from SGComps.SGCompsConf import SGInputLoader
     topSequence += SGInputLoader( OutputLevel=INFO, ShowEventDump=False )
     topSequence.SGInputLoader.Load = [ ('MdtCsmContainer','MDTCSM'), ('RpcPadContainer','RPCPAD'), ('TgcRdoContainer','TGCRDO'), ('CscRawDataContainer','CSCRDO')]
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 8dec02d3e4c..1d2bc5ffbde 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 AthenaExternalsVersion = 6491b6ae
-GaudiVersion = v28r1.conditions.010
+GaudiVersion = v28r2.001
diff --git a/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py b/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py
index f2f118cdea7..77d76eb2ba4 100644
--- a/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py
+++ b/Simulation/G4Sim/G4HiveEx/share/G4HiveExOpts.py
@@ -24,7 +24,6 @@ svcMgr.MessageSvc.Format = msgFmt
 # svcMgr.MessageSvc.useColors = True
 
 # svcMgr.AthenaHiveEventLoopMgr.OutputLevel = DEBUG
-# svcMgr.ForwardSchedulerSvc.OutputLevel = DEBUG
 
 #
 ## Override defaults. otherwise these are ALL EQUAL to the number of threads
@@ -32,11 +31,13 @@ svcMgr.MessageSvc.Format = msgFmt
 #
 
 # numStores = 1
-# numAlgsInFlight = 1
-
 # svcMgr.EventDataSvc.NSlots = numStores
-# svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = numStores
-# svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = numAlgsInFlight
+
+# from AthenaCommon.AlgScheduler import AlgScheduler
+# AlgScheduler.OutputLevel( DEBUG )
+# AlgScheduler.ShowControlFlow( True )
+# AlgScheduler.ShowDataDependencies( True )
+# AlgScheduler.setThreadPoolSize( nThreads )
 
 # Thread pool service and initialization
 from GaudiHive.GaudiHiveConf import ThreadPoolSvc
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py
index d4fcf15431f..0fcfd7ed28e 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloEgamma/share/FFL2CaloEgamma.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #
 # get_files LVL1config_Physics_pp_v7.xml
 # 
@@ -66,10 +70,9 @@ nThreads = jp.ConcurrencyFlags.NumThreads()
 print ' nThreads : ',nThreads
 
 if nThreads >= 1:
-  ## get a handle on the ForwardScheduler
-  from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-  svcMgr += ForwardSchedulerSvc()
-  svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+  ## get a handle on the Scheduler
+  from AthenaCommon.AlgScheduler import AlgScheduler
+  AlgScheduler.CheckDependencies( True )
 
 # Use McEventSelector so we can run with AthenaMP
 #import AthenaCommon.AtlasUnixGeneratorJob
diff --git a/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx b/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx
index 130c1b421df..f11c2ab0bb5 100644
--- a/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx
+++ b/Trigger/TrigFTK/TrigFTKSim/src/FTKTrackFitterAlgo.cxx
@@ -467,7 +467,7 @@ StatusCode FTKTrackFitterAlgo::initialize(){
 
       if(m_PrintSSBConstants){
 
-	log << MSG::INFO << "*** Printing EXP and TF constants in a txt file ****" << endreq;
+	log << MSG::INFO << "*** Printing EXP and TF constants in a txt file ****" << endmsg;
 
 	ofstream myfile;
 	myfile.open (Form("EXPConstants_reg%d.txt",ir));
@@ -480,7 +480,7 @@ StatusCode FTKTrackFitterAlgo::initialize(){
 	vecOfMapSecID.clear();
 	vecOfMapNconn.clear();
 
-	log << MSG::INFO << "*** Reading the connection file and mapping 8L -> 12L " << endreq;
+	log << MSG::INFO << "*** Reading the connection file and mapping 8L -> 12L " << endmsg;
 	vector<vector<int>> moduleIDvec;
 	moduleIDvec.clear();
 
diff --git a/Trigger/TrigSteer/L1Decoder/share/decodeBS.py b/Trigger/TrigSteer/L1Decoder/share/decodeBS.py
index 4f20a4653dd..d279b2cf02f 100755
--- a/Trigger/TrigSteer/L1Decoder/share/decodeBS.py
+++ b/Trigger/TrigSteer/L1Decoder/share/decodeBS.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #
 # get_files LVL1config_Physics_pp_v5.xml
 # ln -s /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1 input.data
@@ -28,10 +32,9 @@ from AthenaCommon.ConcurrencyFlags import jobproperties as jp
 nThreads = jp.ConcurrencyFlags.NumThreads()
 
 if nThreads >= 1:
-  ## get a handle on the ForwardScheduler
-  from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-  svcMgr += ForwardSchedulerSvc()
-  svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+  ## get a handle on the Scheduler
+  from AthenaCommon.AlgScheduler import AlgScheduler
+  AlgScheduler.CheckDependencies( True )
 
 # Use McEventSelector so we can run with AthenaMP
 #import AthenaCommon.AtlasUnixGeneratorJob
diff --git a/Trigger/TrigSteer/L1Decoder/share/graphRun.py b/Trigger/TrigSteer/L1Decoder/share/graphRun.py
index 8f4eb6c9877..60bc82aa437 100755
--- a/Trigger/TrigSteer/L1Decoder/share/graphRun.py
+++ b/Trigger/TrigSteer/L1Decoder/share/graphRun.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #
 # get_files -xmls LVL1config_Physics_pp_v5.xml
 # ln -s /afs/cern.ch/atlas/project/trigger/pesa-sw/validation/atn-test/data15_13TeV.00266904.physics_EnhancedBias.merge.RAW._lb0452._SFO-1._0001.1 input.data
@@ -87,13 +91,10 @@ print svcMgr
 theApp.EvtMax = 1
 
 
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.MaxEventsInFlight = 1
-svcMgr.ForwardSchedulerSvc.MaxAlgosInFlight = 1
-svcMgr.ForwardSchedulerSvc.ThreadPoolSize = 1
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.setThreadPoolSize( 1 )
+AlgScheduler.CheckDependencies( True )
+svcMgr.EventDataSvc.NSlots = 1
 
 print "topSequence dump:", topSequence
 #
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py b/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py
index 310dd2b1019..2448befab3c 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/BasicMTTrackingTrigger.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 # an example of minimal jO based on RecExCommon configuration running the FastTrackFinder 
 # to find tracks in predefined RoIs
 # 20/2/2017 Jiri.Masik@manchester.ac.uk
@@ -13,11 +17,10 @@
 # source/Trigger/TrigAlgorithms/TrigFastTrackFinder
 # with the mods to the configuration of the TrigOnlineSpacePointTool
  
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-# svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
-svcMgr.ForwardSchedulerSvc.OutputLevel=VERBOSE
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.CheckDependencies( True )
+AlgScheduler.OutputLevel( VERBOSE )
 
 ## get a handle on the ServiceManager
 from AthenaCommon.AlgSequence import AlgSequence
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py b/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py
index 0dc3b7d9894..8e59c08c885 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/ID_RawDataMT_Trigger.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #inputfile="MemGrowEvents.data"
 
 
@@ -99,10 +103,9 @@ from AthenaCommon.ConcurrencyFlags import jobproperties as jp
 nThreads = jp.ConcurrencyFlags.NumThreads()
 
 if nThreads >= 1:
-  ## get a handle on the ForwardScheduler
-  from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-  svcMgr += ForwardSchedulerSvc()
-  svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+  ## get a handle on the Scheduler
+  from AthenaCommon.AlgScheduler import AlgScheduler
+  AlgScheduler.CheckDependencies( True )
 
 import MagFieldServices.SetupField
 
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/InDetTrigPreExec.py b/Trigger/TrigSteer/ViewAlgsTest/share/InDetTrigPreExec.py
index afe3beb78d3..c3cecb0093b 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/InDetTrigPreExec.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/InDetTrigPreExec.py
@@ -1,13 +1,14 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #Early failure warning
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
 ## get a handle on the ServiceManager
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.CheckDataDependencies( True )
 
-## get a handle on the ServiceManager
-from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaCommon.AlgSequence import AlgSequence
 topSequence = AlgSequence()
 from SGComps.SGCompsConf import SGInputLoader
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/menuViewRun.py b/Trigger/TrigSteer/ViewAlgsTest/share/menuViewRun.py
index d40a1ce0d29..c74d19a8f5e 100755
--- a/Trigger/TrigSteer/ViewAlgsTest/share/menuViewRun.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/menuViewRun.py
@@ -1,3 +1,7 @@
+#
+#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+#
+
 #
 # get_files -xmls LVL1config_Physics_pp_v5.xml
 # 
@@ -24,9 +28,8 @@ from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 
 
 #
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.CheckDependencies = True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.CheckDependencies( True )
 
 # Use McEventSelector so we can run with AthenaMP
 import AthenaCommon.AtlasUnixGeneratorJob
-- 
GitLab