From 73f979fa7d783ff2c9f40e863367c846fd7ea3fd Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 11:31:19 +0200
Subject: [PATCH 1/7] AthExRunExamples+AthExRunHelloWorld: Delete empty
 packages

---
 .../AthExRunExamples/CMakeLists.txt              | 16 ----------------
 .../AthExRunHelloWorld/CMakeLists.txt            | 12 ------------
 2 files changed, 28 deletions(-)
 delete mode 100644 Control/AthenaExamples/AthExRunExamples/CMakeLists.txt
 delete mode 100644 Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt

diff --git a/Control/AthenaExamples/AthExRunExamples/CMakeLists.txt b/Control/AthenaExamples/AthExRunExamples/CMakeLists.txt
deleted file mode 100644
index ea0cc987cdf3..000000000000
--- a/Control/AthenaExamples/AthExRunExamples/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-################################################################################
-# Package: AthExRunExamples
-################################################################################
-
-# Declare the package name:
-atlas_subdir( AthExRunExamples )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaExamples/AthExFortranAlgorithm
-                          Control/AthenaExamples/AthExHelloWorld
-                          Control/AthenaExamples/AthExHistNtup
-                          Control/AthenaExamples/AthExStoreGateExample
-                          Control/AthenaExamples/ToyConversion
-                          Control/MinimalRunTime )
-
diff --git a/Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt
deleted file mode 100644
index 912845c46ffb..000000000000
--- a/Control/AthenaExamples/AthExRunHelloWorld/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-# Package: AthExRunHelloWorld
-################################################################################
-
-# Declare the package name:
-atlas_subdir( AthExRunHelloWorld )
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaExamples/AthExHelloWorld
-                          Control/MinimalRunTime )
-
-- 
GitLab


From e77bc592e555bc46ac979da039c8b15a688b8c1d Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 12:39:02 +0200
Subject: [PATCH 2/7] AthExThinning: cmake cleanup and remove CLHEP dependency

---
 .../AthExThinning/CMakeLists.txt              | 39 +++----------------
 .../AthExThinning/src_lib/CreateData.cxx      | 16 ++++----
 .../AthExThinning/src_lib/ReadThinnedData.cxx |  8 ++--
 .../src_lib/WriteThinnedData.cxx              | 14 +++----
 4 files changed, 22 insertions(+), 55 deletions(-)

diff --git a/Control/AthenaExamples/AthExThinning/CMakeLists.txt b/Control/AthenaExamples/AthExThinning/CMakeLists.txt
index d9772fad11e3..23b8c785e641 100644
--- a/Control/AthenaExamples/AthExThinning/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExThinning/CMakeLists.txt
@@ -1,29 +1,8 @@
-################################################################################
-# Package: AthExThinning
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExThinning )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/AthenaPython
-                          Control/AthenaServices
-                          Control/DataModelAthenaPool
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolCnvSvc )
-
-# External dependencies:
-find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( AthExThinningEvent
                    src_lib/AthExIParticle.cxx
@@ -38,31 +17,25 @@ atlas_add_library( AthExThinningEvent
                    src_lib/AthExParticles_p1.cxx
                    src_lib/AthExFatObject_p1.cxx
                    PUBLIC_HEADERS AthExThinning
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel DataModelAthenaPoolLib StoreGateLib SGtests AthenaPoolCnvSvcLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} )
+                   LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib GaudiKernel StoreGateLib )
 
 atlas_add_component( AthExThinningAlgs
                      src_lib/CreateData.cxx
                      src_lib/WriteThinnedData.cxx
                      src_lib/ReadThinnedData.cxx
                      src_lib/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib AthExThinningEvent )
+                     LINK_LIBRARIES AthExThinningEvent )
 
 atlas_add_poolcnv_library( AthExThinningPoolCnv
                            src/*.cxx
                            FILES AthExThinning/AthExParticles.h AthExThinning/AthExIParticles.h AthExThinning/AthExDecay.h AthExThinning/AthExElephantino.h AthExThinning/AthExFatObject.h
-                           INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib AthExThinningEvent )
+                           LINK_LIBRARIES AthExThinningEvent AthenaPoolCnvSvcLib )
 
 atlas_add_dictionary( AthExThinningEventDict
                       AthExThinning/AthExThinningEventDict.h
                       AthExThinning/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthContainers AthLinks AthenaBaseComps AthenaKernel DataModelAthenaPoolLib AthenaPoolUtilities GaudiKernel StoreGateLib SGtests AthenaPoolCnvSvcLib AthExThinningEvent
-                      ELEMENT_LINKS  AthExParticles AthExIParticles )
+                      LINK_LIBRARIES AthExThinningEvent
+                      ELEMENT_LINKS AthExParticles AthExIParticles )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py
diff --git a/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx b/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx
index ca46b7f5cb5b..dc888c9f957b 100644
--- a/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx
+++ b/Control/AthenaExamples/AthExThinning/src_lib/CreateData.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // CreateData.cxx 
@@ -14,9 +14,7 @@
 
 // FrameWork includes
 #include "GaudiKernel/Property.h"
-
-// CLHEP
-#include "CLHEP/Units/SystemOfUnits.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
 // StoreGate
 #include "StoreGate/StoreGateSvc.h"
@@ -133,10 +131,10 @@ StatusCode CreateData::makeData( const std::string& test )
   }
 
   for ( unsigned int i = 0; i != m_nbrParticles.value(); ++i ) {
-    AthExParticle * p = new AthExParticle( (i+1) * 10. * CLHEP::GeV,
-					   (i+1) * 10. * CLHEP::GeV,
-					   (i+1) * 10. * CLHEP::GeV,
-					   (i+2) * 10. * CLHEP::GeV );
+    AthExParticle * p = new AthExParticle( (i+1) * 10. * Gaudi::Units::GeV,
+					   (i+1) * 10. * Gaudi::Units::GeV,
+					   (i+1) * 10. * Gaudi::Units::GeV,
+					   (i+2) * 10. * Gaudi::Units::GeV );
     particles->push_back(p);
   }
 
@@ -174,7 +172,7 @@ StatusCode CreateData::makeData( const std::string& test )
 
   dcy->setDecay( p1, p2, l1, l2 );
 
-  const double igev = 1. / CLHEP::GeV;
+  const double igev = 1. / Gaudi::Units::GeV;
   ATH_MSG_INFO
     ("Created a Decay from :" << endmsg
      << " p1: px= " << dcy->p1()->px() * igev << endmsg
diff --git a/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx b/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx
index 2910d8f7045d..041cd35a1593 100644
--- a/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx
+++ b/Control/AthenaExamples/AthExThinning/src_lib/ReadThinnedData.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // ReadThinnedData.cxx 
@@ -15,13 +15,11 @@
 // FrameWork includes
 #include "GaudiKernel/MsgStream.h"
 #include "GaudiKernel/Property.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
 // StoreGate
 #include "StoreGate/StoreGateSvc.h"
 
-// CLHEP includes
-#include "CLHEP/Units/SystemOfUnits.h"
-
 // AthExThinning includes
 #include "AthExThinning/AthExParticles.h"
 #include "AthExThinning/AthExDecay.h"
@@ -150,7 +148,7 @@ StatusCode ReadThinnedData::checkTest( const std::string& testName )
     return StatusCode::RECOVERABLE;
   }
 
-  const double igev = 1. / CLHEP::GeV;
+  const double igev = 1. / Gaudi::Units::GeV;
   ATH_MSG_DEBUG 
     ("IN  particles: " <<  particles->size() << endmsg
      << "IN iparticles: " << iparticles->size() << endmsg
diff --git a/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx b/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx
index 4b87c15154e6..fd310189da9d 100644
--- a/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx
+++ b/Control/AthenaExamples/AthExThinning/src_lib/WriteThinnedData.cxx
@@ -1,7 +1,7 @@
 ///////////////////////// -*- C++ -*- /////////////////////////////
 
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
 // WriteThinnedData.cxx 
@@ -16,9 +16,7 @@
 
 // FrameWork includes
 #include "GaudiKernel/Property.h"
-
-// CLHEP
-#include "CLHEP/Units/SystemOfUnits.h"
+#include "GaudiKernel/SystemOfUnits.h"
 
 // StoreGate
 #include "StoreGate/StoreGateSvc.h"
@@ -160,7 +158,7 @@ StatusCode WriteThinnedData::test( const EventContext& ctx,
   // fetch Elephantino
   SG::ReadHandle<AthExElephantino> elephantino (m_elephantinoKeys[testNum], ctx);
 
-  const double igev = 1. / CLHEP::GeV;
+  const double igev = 1. / Gaudi::Units::GeV;
   ATH_MSG_DEBUG("IN particles: " << particles->size() << endmsg
 		<< "IN decay: " << endmsg
 		<< " p1: px= " << decay->p1()->px() * igev << endmsg
@@ -224,7 +222,7 @@ StatusCode WriteThinnedData::doThinningTest1( const EventContext& ctx,
   SG::ThinningHandle<AthExParticles> particles (particlesKey, ctx);
   std::vector<bool> filter = m_filter.value();
   
-  const double igev = 1. / CLHEP::GeV;
+  const double igev = 1. / Gaudi::Units::GeV;
   msg(MSG::INFO) << "Particles | filter :" << endmsg;
   for ( unsigned int i = 0; i != particles->size(); ++i ) {
     const std::string kr = filter[i] ? "keep" : "remove";
@@ -303,7 +301,7 @@ StatusCode WriteThinnedData::doThinningTest2( const EventContext& ctx,
   SG::ThinningHandle<AthExParticles> particles (particlesKey, ctx);
   std::vector<bool> filter = m_filter.value();
 
-  const double igev = 1. / CLHEP::GeV;
+  const double igev = 1. / Gaudi::Units::GeV;
   msg(MSG::INFO) << "Particles | filter :" << endmsg;
   for ( unsigned int i = 0; i != particles->size(); ++i ) {
     const std::string kr = filter[i] ? "keep" : "remove";
@@ -383,7 +381,7 @@ WriteThinnedData::doThinningTest3( const EventContext& ctx,
   SG::ThinningHandle<AthExIParticles> iparticles (iparticlesKey, ctx);
   std::vector<bool> filter = m_filter.value();
 
-  const double igev = 1. / CLHEP::GeV;
+  const double igev = 1. / Gaudi::Units::GeV;
   msg(MSG::INFO) << "IParticles | filter :" << endmsg;
   for ( unsigned int i = 0; i != iparticles->size(); ++i ) {
     const std::string kr = filter[i] ? "keep" : "remove";
-- 
GitLab


From 31ced4c00d4c7cdbd5aefb070e230a7c81a9c4e4 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 12:41:24 +0200
Subject: [PATCH 3/7] AthenaExamples: Remove atlas_depends_on_subdirs in cmake
 confiugation

---
 .../AthExHelloWorld/CMakeLists.txt            | 37 ++++++---------
 .../AthenaExamples/AthExHive/CMakeLists.txt   | 20 +++-----
 .../AthExJobOptions/CMakeLists.txt            | 18 +-------
 .../AthExMonitored/CMakeLists.txt             | 13 +-----
 .../AthExStoreGateExample/CMakeLists.txt      | 46 ++++---------------
 .../AthExUnittest/CMakeLists.txt              | 18 +-------
 .../ToyConversion/CMakeLists.txt              | 10 +---
 7 files changed, 35 insertions(+), 127 deletions(-)

diff --git a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt
index dbd0e1826a74..e5663de19125 100644
--- a/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExHelloWorld/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: AthExHelloWorld
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExHelloWorld )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-			                    Control/AthenaConfiguration )
-
 # Component(s) in the package:
 atlas_add_component( AthExHelloWorld
                      src/*.cxx
@@ -19,25 +10,25 @@ atlas_add_component( AthExHelloWorld
                      LINK_LIBRARIES GaudiKernel AthenaBaseComps )
 
 # Install files from the package:
-atlas_install_headers( AthExHelloWorld )
 atlas_install_joboptions( share/*.py )
 atlas_install_python_modules( python/HelloWorldConfig.py 
                               POST_BUILD_CMD ${ATLAS_FLAKE8} )
 
+# Test(s) in the package:
 atlas_add_test( AthExHelloWorld
-    ENVIRONMENT THREADS=0
-		SCRIPT test/test_AthExHelloWorld.sh
-		)
+   ENVIRONMENT THREADS=0
+   SCRIPT test/test_AthExHelloWorld.sh )
 
 atlas_add_test( AthExHelloWorldMT_1
-    ENVIRONMENT THREADS=1
-		SCRIPT test/test_AthExHelloWorld.sh
-		)
+   ENVIRONMENT THREADS=1
+   SCRIPT test/test_AthExHelloWorld.sh )
 
 atlas_add_test( AthExHelloWorldMT_2
-    ENVIRONMENT THREADS=2
-		SCRIPT test/test_AthExHelloWorld.sh
-    LOG_IGNORE_PATTERN "AthenaHiveEventLoopMgr.* processing event|^HelloWorld .*(INFO|WARNING A WARNING|ERROR An ERROR|FATAL A FATAL)|my message to the world" #processing order can change
-		)
-
-atlas_add_test( AthExHelloWorld_CfgTest    SCRIPT python -m AthExHelloWorld.HelloWorldConfig    POST_EXEC_SCRIPT nopost.sh )
+   ENVIRONMENT THREADS=2
+   SCRIPT test/test_AthExHelloWorld.sh
+   LOG_IGNORE_PATTERN "AthenaHiveEventLoopMgr.* processing event|^HelloWorld .*(INFO|WARNING A WARNING|ERROR An ERROR|FATAL A FATAL)|my message to the world" #processing order can change
+   )
+
+atlas_add_test( AthExHelloWorld_CfgTest
+   SCRIPT python -m AthExHelloWorld.HelloWorldConfig
+   POST_EXEC_SCRIPT nopost.sh )
diff --git a/Control/AthenaExamples/AthExHive/CMakeLists.txt b/Control/AthenaExamples/AthExHive/CMakeLists.txt
index 36e496654321..07fd1441b114 100644
--- a/Control/AthenaExamples/AthExHive/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExHive/CMakeLists.txt
@@ -1,38 +1,30 @@
-################################################################################
-# Package: AthExHive
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExHive )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/CxxUtils
-                          Control/StoreGate
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
+# External dependencies:
+find_package( Boost )
 
+# Component(s) in the package:
 atlas_add_library( AthExHiveLib
                    AthExHive/*.h
                    INTERFACE
                    PUBLIC_HEADERS AthExHive
                    LINK_LIBRARIES AthenaKernel GaudiKernel)
 
-# Component(s) in the package:
 atlas_add_component( AthExHive
                      src/*.cxx
                      src/condEx/*.cxx
                      src/loopTest/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaKernel AthenaBaseComps xAODEventInfo AthExHiveLib )
+                     LINK_LIBRARIES AthenaKernel AthenaBaseComps StoreGateLib xAODEventInfo AthExHiveLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
 atlas_install_runtime( share/condDb.txt )
 
+# Tests in the package:
 atlas_add_test ( AthExHive_test
    SCRIPT test/AthExHive_test.sh
    PROPERTIES TIMEOUT 300
diff --git a/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt b/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt
index c4c11a905809..18a1048dae4d 100644
--- a/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExJobOptions/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: AthExJobOptions
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExJobOptions )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/StoreGate
-                          Event/EventInfo )
-
 # Component(s) in the package:
 atlas_add_component( AthExJobOptions
                      src/*.cxx
@@ -22,9 +10,7 @@ atlas_add_component( AthExJobOptions
                      LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests EventInfo )
 
 # Install files from the package:
-atlas_install_headers( AthExJobOptions )
-atlas_install_python_modules( python/*.py 
-                              POST_BUILD_CMD ${ATLAS_FLAKE8} )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
 # Tests in this package:
diff --git a/Control/AthenaExamples/AthExMonitored/CMakeLists.txt b/Control/AthenaExamples/AthExMonitored/CMakeLists.txt
index 9e81614b6749..fdb8f84aee74 100644
--- a/Control/AthenaExamples/AthExMonitored/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExMonitored/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: AthExMonitored
-################################################################################
+# Copyright (C) 20022020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExMonitored )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaMonitoringKernel )
-
 # Component(s) in the package:
 atlas_add_component( AthExMonitored
                      src/*.cxx
@@ -20,4 +11,4 @@ atlas_add_component( AthExMonitored
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt b/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt
index 392daf9e3bb4..9cdec175534b 100644
--- a/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExStoreGateExample/CMakeLists.txt
@@ -1,63 +1,35 @@
-################################################################################
-# Package: AthExStoreGateExample
-################################################################################
+# Copyright (C) 20022020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExStoreGateExample )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Control/SGTools
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/AthenaBaseComps
-                          Control/CxxUtils
-                          Control/PileUpTools
-                          Control/StoreGate
-                          Event/EventInfo
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( SGTutorialLib
                    Tutorial/LinkObj.cxx
                    Tutorial/SGRead.cxx
                    Tutorial/SGWrite.cxx
                    PUBLIC_HEADERS AthExStoreGateExample
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaKernel SGTools PileUpToolsLib StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthContainers AthLinks AthenaBaseComps CxxUtils EventInfo xAODEventInfo GaudiKernel )
+                   LINK_LIBRARIES AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib
+                   PRIVATE_LINK_LIBRARIES AthLinks  )
 
-atlas_add_library( SGTutorial
-                   Tutorial/SGTutorial_entries.cxx
-                   PUBLIC_HEADERS AthExStoreGateExample
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaKernel SGTools PileUpToolsLib StoreGateLib SGtests SGTutorialLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthContainers AthLinks AthenaBaseComps CxxUtils EventInfo xAODEventInfo GaudiKernel )
+atlas_add_component( SGTutorial
+                     Tutorial/SGTutorial_entries.cxx
+                     LINK_LIBRARIES SGTutorialLib )
 
 atlas_add_component( AthExStoreGateExample
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES SGTutorialLib )
+                     LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps EventInfo PileUpToolsLib SGTools SGTutorialLib TestTools )
 
 atlas_add_component( AthExDFlow
                      src_dflow/*.cxx
                      src_dflow/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES SGTutorialLib )
+                     LINK_LIBRARIES AthenaBaseComps GaudiKernel SGTools StoreGateLib xAODEventInfo )
 
 atlas_add_dictionary( AthExStoreGateExampleDict
                       AthExStoreGateExample/AthExStoreGateExampleDict.h
                       AthExStoreGateExample/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel SGTools TestTools AthContainers AthLinks AthenaBaseComps CxxUtils PileUpToolsLib StoreGateLib SGtests EventInfo xAODEventInfo GaudiKernel SGTutorialLib SGTutorial )
+                      LINK_LIBRARIES SGTutorialLib )
 
 # Install files from the package:
 atlas_install_joboptions( share/StoreGateExample_Gen_jobOptions.txt share/StoreGateExample_Gen_jobOptions.py share/StoreGateExample_Del_jobOptions.py share/StoreGateExample_Reentrant_jobOptions.py share/dflow_jobo.py share/StoreGateHiveExample.py share/HandleTest_jobOptions.py )
diff --git a/Control/AthenaExamples/AthExUnittest/CMakeLists.txt b/Control/AthenaExamples/AthExUnittest/CMakeLists.txt
index 17e031707b63..f6961cf34b35 100644
--- a/Control/AthenaExamples/AthExUnittest/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExUnittest/CMakeLists.txt
@@ -1,22 +1,8 @@
-
-#
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-#
-
-################################################################################
-# Package: MyPackage
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExUnittest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-			  Control/AthenaBaseComps
-                          AtlasTest/GoogleTestTools )
-
 # The component lib:
 atlas_add_component( AthExUnittest
                      AthExUnittest/*.h src/*.cxx
@@ -28,5 +14,3 @@ atlas_add_component( AthExUnittest
 atlas_add_test( gt_AthExUnittest
   SOURCES test/gt_AthExUnittest.cxx
   LINK_LIBRARIES GaudiKernel GoogleTestTools AthenaBaseComps )
-
-
diff --git a/Control/AthenaExamples/ToyConversion/CMakeLists.txt b/Control/AthenaExamples/ToyConversion/CMakeLists.txt
index 328473afacd9..b77ed8aceabb 100644
--- a/Control/AthenaExamples/ToyConversion/CMakeLists.txt
+++ b/Control/AthenaExamples/ToyConversion/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: ToyConversion
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ToyConversion )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( ToyConversionLib
                    src/*.cxx
@@ -22,4 +15,3 @@ atlas_add_component( ToyConversion
 
 # Install files from the package:
 atlas_install_joboptions( share/ToyConversionOpts.txt share/ToyConversionOpts.py )
-
-- 
GitLab


From bdbf97c2c8ef03e7053974969b92cbb8882964d4 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 12:48:09 +0200
Subject: [PATCH 4/7] AthExFortranAlgorithm: Package cleanup

- move header to src directory
- delete obsolete files
- remove atlas_depends_on_sudirs cmake statement
---
 .../AthExFortranAlgorithm/config.h.in         |  1 -
 .../AthExFortranAlgorithm/CMakeLists.txt      | 14 +----
 .../share/FortranAlgorithmOptions.txt         | 57 -------------------
 .../src/FortranAlgorithm.cxx                  |  2 +-
 .../FortranAlgorithm.h                        |  0
 .../components/FortranAlgorithm_entries.cxx   |  2 +-
 6 files changed, 4 insertions(+), 72 deletions(-)
 delete mode 100755 Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in
 delete mode 100755 Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt
 rename Control/AthenaExamples/AthExFortranAlgorithm/{AthExFortranAlgorithm => src}/FortranAlgorithm.h (100%)
 mode change 100755 => 100644

diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in b/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in
deleted file mode 100755
index 61025bcef7b5..000000000000
--- a/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/config.h.in
+++ /dev/null
@@ -1 +0,0 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt b/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt
index 0f53e07a7a87..a613c492db04 100644
--- a/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExFortranAlgorithm/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: AthExFortranAlgorithm
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExFortranAlgorithm )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_component( AthExFortranAlgorithm
                      src/*.cxx
@@ -19,8 +11,6 @@ atlas_add_component( AthExFortranAlgorithm
                      LINK_LIBRARIES AthenaBaseComps GaudiKernel )
 
 # Install files from the package:
-atlas_install_headers( AthExFortranAlgorithm )
-atlas_install_joboptions( share/FortranAlgorithmOptions.txt share/FortranAlgorithmOptions.py )
+atlas_install_joboptions( share/FortranAlgorithmOptions.py )
 atlas_install_runtime( share/FortranAlgorithmInput.data )
 atlas_install_scripts( share/preFortAlgEx.sh )
-
diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt b/Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt
deleted file mode 100755
index 6d81dd2fa156..000000000000
--- a/Control/AthenaExamples/AthExFortranAlgorithm/share/FortranAlgorithmOptions.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//##############################################################
-//
-// Job options file
-//
-//==============================================================
-
-//no EventSelector
-ApplicationMgr.DLLs   += { "AthenaServices" };
-ApplicationMgr.EventLoop = "AthenaEventLoopMgr";
-//--------------------------------------------------------------
-// StoreGate services configuration
-//--------------------------------------------------------------
-#include "StoreGate/StoreGate_jobOptions.txt"
-
-ApplicationMgr.ExtSvc += { "EvtPersistencySvc/EventPersistencySvc",
-			   "HistogramSvc/HistogramDataSvc"
-			 };	
-//--------------------------------------------------------------
-// Private Application Configuration options
-//--------------------------------------------------------------
-
-//load relevant libraries
-ApplicationMgr.DLLs += { "AthExFortranAlgorithm" };
-
-//top algorithms to be run
-ApplicationMgr.TopAlg = { "FortranAlgorithm" };
-
-//--------------------------------------------------------------
-// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-//--------------------------------------------------------------
-
-MessageSvc.OutputLevel      = 2;
-MessageSvc.useColors        = true;
-
-//--------------------------------------------------------------
-// Event related parameters
-//--------------------------------------------------------------
-
-// dummy event loop
-ApplicationMgr.EvtSel = "NONE";
-// Number of events to be processed (default is 10)
-ApplicationMgr.EvtMax = 1;
-
-//--------------------------------------------------------------
-// Algorithms Private Options
-//--------------------------------------------------------------
-
-// For the FortranAlgorithm algorithm
-FortranAlgorithm.LUN = 42;
-FortranAlgorithm.fileName = "FortranAlgorithmInput.data";
-
-//==============================================================
-//
-// End of job options file
-//
-//##############################################################
-
diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx b/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx
index 70fe0e0cd6db..85584df4eceb 100755
--- a/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx
+++ b/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "AthExFortranAlgorithm/FortranAlgorithm.h"
+#include "FortranAlgorithm.h"
 
 extern "C" {
   void initialize_(const int& lun, const char*, int);
diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/FortranAlgorithm.h b/Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.h
old mode 100755
new mode 100644
similarity index 100%
rename from Control/AthenaExamples/AthExFortranAlgorithm/AthExFortranAlgorithm/FortranAlgorithm.h
rename to Control/AthenaExamples/AthExFortranAlgorithm/src/FortranAlgorithm.h
diff --git a/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx b/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx
index 79f2167acf60..46a80de068fc 100644
--- a/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx
+++ b/Control/AthenaExamples/AthExFortranAlgorithm/src/components/FortranAlgorithm_entries.cxx
@@ -1,4 +1,4 @@
-#include "AthExFortranAlgorithm/FortranAlgorithm.h"
+#include "../FortranAlgorithm.h"
 
 DECLARE_COMPONENT( FortranAlgorithm )
 
-- 
GitLab


From 5f673a43e4f8dadf6fe1a2317977cd7588b4f9af Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 12:51:56 +0200
Subject: [PATCH 5/7] MultiInputExample: Package cleanup

- move headers to src directory
- cleanup cmake configuration
---
 .../MultiInputExample/CMakeLists.txt           | 18 ++----------------
 .../MultiInputExample/src/MyAlg.cxx            |  2 +-
 .../{MultiInputExample => src}/MyAlg.h         |  0
 .../MultiInputExample/src/MyMultiInputAlg.cxx  |  2 +-
 .../MyMultiInputAlg.h                          |  0
 .../components/MultiInputExample_entries.cxx   |  2 +-
 6 files changed, 5 insertions(+), 19 deletions(-)
 rename Control/AthenaExamples/MultiInputExample/{MultiInputExample => src}/MyAlg.h (100%)
 rename Control/AthenaExamples/MultiInputExample/{MultiInputExample => src}/MyMultiInputAlg.h (100%)

diff --git a/Control/AthenaExamples/MultiInputExample/CMakeLists.txt b/Control/AthenaExamples/MultiInputExample/CMakeLists.txt
index b128b6b17519..e81a67699c01 100644
--- a/Control/AthenaExamples/MultiInputExample/CMakeLists.txt
+++ b/Control/AthenaExamples/MultiInputExample/CMakeLists.txt
@@ -1,27 +1,13 @@
-################################################################################
-# Package: MultiInputExample
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( MultiInputExample )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          GaudiKernel
-                          PRIVATE
-                          Control/PileUpTools
-                          Control/StoreGate
-                          Database/AthenaPOOL/AthenaPoolExample/AthenaPoolExampleData
-                          Event/EventInfo )
-
 # Component(s) in the package:
 atlas_add_component( MultiInputExample
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthenaBaseComps GaudiKernel PileUpToolsLib StoreGateLib SGtests AthenaPoolExampleData EventInfo )
+                     LINK_LIBRARIES AthenaBaseComps AthenaPoolExampleData EventInfo GaudiKernel PileUpToolsLib )
 
 # Install files from the package:
-atlas_install_headers( MultiInputExample )
 atlas_install_joboptions( share/MultiInputInit.py )
-
diff --git a/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx b/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx
index 157ff28157ea..08516518720e 100644
--- a/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx
+++ b/Control/AthenaExamples/MultiInputExample/src/MyAlg.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "MultiInputExample/MyAlg.h"
+#include "MyAlg.h"
 #include "GaudiKernel/MsgStream.h"
 #include "PileUpTools/PileUpMergeSvc.h"
 
diff --git a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h b/Control/AthenaExamples/MultiInputExample/src/MyAlg.h
similarity index 100%
rename from Control/AthenaExamples/MultiInputExample/MultiInputExample/MyAlg.h
rename to Control/AthenaExamples/MultiInputExample/src/MyAlg.h
diff --git a/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx b/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx
index 3d26b089e058..4d5a7ec94d29 100644
--- a/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx
+++ b/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.cxx
@@ -2,7 +2,7 @@
   Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
-#include "MultiInputExample/MyMultiInputAlg.h"
+#include "MyMultiInputAlg.h"
 #include "GaudiKernel/MsgStream.h"
 #include "PileUpTools/PileUpMergeSvc.h"
 
diff --git a/Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h b/Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.h
similarity index 100%
rename from Control/AthenaExamples/MultiInputExample/MultiInputExample/MyMultiInputAlg.h
rename to Control/AthenaExamples/MultiInputExample/src/MyMultiInputAlg.h
diff --git a/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx b/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx
index a5f5eecb3941..d6a5ea0486c1 100644
--- a/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx
+++ b/Control/AthenaExamples/MultiInputExample/src/components/MultiInputExample_entries.cxx
@@ -1,4 +1,4 @@
-#include "MultiInputExample/MyMultiInputAlg.h"
+#include "../MyMultiInputAlg.h"
 
 DECLARE_COMPONENT( MyMultiInputAlg )
 
-- 
GitLab


From a1bd2a93dd435fd36477b4ce527c0e7ffdfb79ee Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 13:03:14 +0200
Subject: [PATCH 6/7] AthAsgExUnittest: Package cleanup

- move private headers to src directory
- cleanup cmake configuration
- remove unused source files
---
 .../AthAsgExUnittest/MyPackageDict.h          | 10 -------
 .../AthAsgExUnittest/selection.xml            |  4 ---
 .../AthAsgExUnittest/CMakeLists.txt           | 26 +++----------------
 .../AthAsgExUnittest/Root/MyPackageTool.cxx   |  4 +--
 .../IMyPackageTool.h                          |  0
 .../AthAsgExUnittest/src/MyPackageAlg.h       |  2 +-
 .../{AthAsgExUnittest => src}/MyPackageTool.h |  4 +--
 .../components/AthAsgExUnittest_entries.cxx   |  2 +-
 .../test/gt_AthAsgExUnittest.cxx              |  4 +--
 .../test/gt_AthExUnittest.cxx                 |  2 +-
 10 files changed, 13 insertions(+), 45 deletions(-)
 delete mode 100644 Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h
 delete mode 100644 Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml
 rename Control/AthenaExamples/AthAsgExUnittest/{AthAsgExUnittest => src}/IMyPackageTool.h (100%)
 rename Control/AthenaExamples/AthAsgExUnittest/{AthAsgExUnittest => src}/MyPackageTool.h (86%)

diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h b/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h
deleted file mode 100644
index 8373e93bb0e1..000000000000
--- a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageDict.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef ATHASGEXUNITTEST_MYPACKAGEDICT_H
-#define ATHASGEXUNITTEST_MYPACKAGEDICT_H
-
-#include "AthAsgExUnittest/MyPackageTool.h"
-
-#endif
diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml b/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml
deleted file mode 100644
index 1afaa3919dd9..000000000000
--- a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/selection.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<lcgdict>
-   <class name="MyPackageTool" />
-   <class name="IMyPackageTool" />
-</lcgdict>
diff --git a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt
index 0a3ab24abf76..238619534964 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt
+++ b/Control/AthenaExamples/AthAsgExUnittest/CMakeLists.txt
@@ -1,34 +1,18 @@
-
-#
-#  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-#
-
-################################################################################
-# Package: MyPackage
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthAsgExUnittest )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-			  Control/AthenaBaseComps
-                          Control/AthAnalysisBaseComps
-                          Control/AthToolSupport/AsgTools
-                          Event/xAOD/xAODJet
-                          AtlasTest/GoogleTestTools )
-
 # Libraries in the package:
 atlas_add_library( AthAsgExUnittestLib
                    MyPackage/*.h src/*.cxx
                    Root/*.cxx
-                   PUBLIC_HEADERS AthAsgExUnittest
+                   NO_PUBLIC_HEADERS
                    LINK_LIBRARIES GaudiKernel AsgTools AthAnalysisBaseCompsLib )
+
 atlas_add_component( AthAsgExUnittest
                      src/components/*.cxx
-                     LINK_LIBRARIES GaudiKernel AsgTools AthAsgExUnittestLib )
+                     LINK_LIBRARIES AthAsgExUnittestLib )
 
 # Add tests:
 atlas_add_test( gt_AthAsgExUnittest
@@ -46,5 +30,3 @@ atlas_add_test( gt_MockxAODJet
 atlas_add_test( gt_xAODJet
   SOURCES test/gt_xAODJet.cxx
   LINK_LIBRARIES xAODJet GoogleTestTools )
-
-
diff --git a/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx b/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx
index f484eafff3e1..0350e0f3b4c1 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx
+++ b/Control/AthenaExamples/AthAsgExUnittest/Root/MyPackageTool.cxx
@@ -1,10 +1,10 @@
 
 //
-//  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+//  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 //
 
 // MyPackage includes
-#include "AthAsgExUnittest/MyPackageTool.h"
+#include "../src/MyPackageTool.h"
 
 MyPackageTool::MyPackageTool( const std::string& name ) : asg::AsgTool( name ) {
   //example property declarations with default values
diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/IMyPackageTool.h b/Control/AthenaExamples/AthAsgExUnittest/src/IMyPackageTool.h
similarity index 100%
rename from Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/IMyPackageTool.h
rename to Control/AthenaExamples/AthAsgExUnittest/src/IMyPackageTool.h
diff --git a/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h
index 0c03b35d6fa2..e8a9607eb7ed 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h
+++ b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageAlg.h
@@ -12,7 +12,7 @@
 #include "AsgTools/AnaToolHandle.h" //use asg::AnaToolHandle instead of regular ToolHandles for full dual-use experience!
 #endif
 
-#include "AthAsgExUnittest/IMyPackageTool.h"
+#include "IMyPackageTool.h"
 
 
 class MyPackageAlg: public ::AthAnalysisAlgorithm { 
diff --git a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageTool.h b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageTool.h
similarity index 86%
rename from Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageTool.h
rename to Control/AthenaExamples/AthAsgExUnittest/src/MyPackageTool.h
index 9d902a658e3f..ebc1bef9cbf1 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/AthAsgExUnittest/MyPackageTool.h
+++ b/Control/AthenaExamples/AthAsgExUnittest/src/MyPackageTool.h
@@ -1,12 +1,12 @@
 // -*- mode: c++ -*-
 //
-//  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+//  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 //
 #ifndef ATHASGEXUNITTEST_MYPACKAGETOOL_H
 #define ATHASGEXUNITTEST_MYPACKAGETOOL_H 1
 
 #include "AsgTools/AsgTool.h"
-#include "AthAsgExUnittest/IMyPackageTool.h"
+#include "IMyPackageTool.h"
 
 class MyPackageTool: public asg::AsgTool, public virtual IMyPackageTool { 
 public: 
diff --git a/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx b/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx
index 95117f80988f..ef5eb1e88d28 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx
+++ b/Control/AthenaExamples/AthAsgExUnittest/src/components/AthAsgExUnittest_entries.cxx
@@ -3,6 +3,6 @@
 DECLARE_COMPONENT( MyPackageAlg )
 
 
-#include "AthAsgExUnittest/MyPackageTool.h"
+#include "../MyPackageTool.h"
 DECLARE_COMPONENT( MyPackageTool )
 
diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx
index 7f01f18764d2..d0de4e2dff09 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx
+++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthAsgExUnittest.cxx
@@ -12,9 +12,9 @@
 #include "AsgTools/AnaToolHandle.h"
 #include "AthAnalysisBaseComps/AthAnalysisHelper.h"
 
-#include "../AthAsgExUnittest/IMyPackageTool.h"
+#include "../src/IMyPackageTool.h"
 
-#include "../AthAsgExUnittest/MyPackageTool.h"
+#include "../src/MyPackageTool.h"
 #include "../src/MyPackageAlg.h"
 
 #include <iostream>
diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx
index 142156a288de..37a3af4ee3f6 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx
+++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_AthExUnittest.cxx
@@ -12,7 +12,7 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "AthenaBaseComps/AthService.h"
 
-#include "../AthAsgExUnittest/IMyPackageTool.h"
+#include "../src/IMyPackageTool.h"
 
 #include <string>
 #include <iostream>
-- 
GitLab


From 403547c27dc05b08af5c69f6617bdcea127d1373 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Mon, 15 Jun 2020 13:07:34 +0200
Subject: [PATCH 7/7] AthExHistNtup: Package cleanup

---
 .../AthExHistNtup/CMakeLists.txt              | 13 +--
 .../AthExHistNtup/share/HistNtupOptions.txt   | 81 -------------------
 2 files changed, 2 insertions(+), 92 deletions(-)
 delete mode 100755 Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt

diff --git a/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt b/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt
index a36347ca4948..daf3ff1524b4 100644
--- a/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt
+++ b/Control/AthenaExamples/AthExHistNtup/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: AthExHistNtup
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AthExHistNtup )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Control/AthenaBaseComps
-                          Event/xAOD/xAODEventInfo
-                          GaudiKernel )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -22,5 +14,4 @@ atlas_add_component( AthExHistNtup
                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps xAODEventInfo GaudiKernel )
 
 # Install files from the package:
-atlas_install_joboptions( share/HistNtupOptions.txt share/HistNtupOptions.py )
-
+atlas_install_joboptions( share/HistNtupOptions.py )
diff --git a/Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt b/Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt
deleted file mode 100755
index b65951289491..000000000000
--- a/Control/AthenaExamples/AthExHistNtup/share/HistNtupOptions.txt
+++ /dev/null
@@ -1,81 +0,0 @@
-//##############################################################
-//
-// Job options file
-//
-//==============================================================
-
-#include "AthenaCommon/Atlas_ZebraTDR.UnixStandardJob.txt"
-
-// For  ddcnvsvc
-#include "IdDictDetDescrCnv/IdDictDetDescrCnv_joboptions.txt"
-#include"InDetMgrDetDescrCnv/InDetMgrDetDescrCnv_joboptions.txt"
-#include "LArDetMgrDetDescrCnv/LArDetMgrDetDescrCnv_joboptions.txt"
-//FIXME #include "TileDetMgrDetDescrCnv/TileDetMgrDetDescrCnv_joboptions.txt"
-#include "MuonDetMgrDetDescrCnv/MuonDetMgrDetDescrCnv_joboptions.txt"
-
-// Turn on the reading of the dictionary
-DetDescrCnvSvc.DecodeIdDict = true;
-
-//--------------------------------------------------------------
-// Private Application Configuration options
-//--------------------------------------------------------------
-//load relevant libraries
-ApplicationMgr.DLLs += { "AthExHistNtup" };      
-
-// Select the appropriate shared library
-ApplicationMgr.DLLs += { "HbookCnv" };
-////ApplicationMgr.DLLs += { "RootHistCnv" };
-
-// Select HBOOK or ROOT persistency (HBOOK is default)
-ApplicationMgr.HistogramPersistency = "HBOOK";
-
-ApplicationMgr.TopAlg = { "Hist" };
-ApplicationMgr.TopAlg += { "Ntup" };
-
-//--------------------------------------------------------------
-// For Zebra input: identify your input runs.
-//--------------------------------------------------------------
-
-// Provide a first/last range or a list
-//EventSelector.runs = {1, 100000};
-EventSelector.firstRun = 1;
-EventSelector.lastRun  = 100000;
-//--------------------------------------------------------------
-// Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
-//--------------------------------------------------------------
-
-Hist.OutputLevel = 2;
-Ntup.OutputLevel = 2;
-MessageSvc.useColors   = true;
-
-//--------------------------------------------------------------
-// Histogram output file 
-//--------------------------------------------------------------
-
-// Specify the appropriate output file type
-HistogramPersistencySvc.OutputFile  = "histo.hbook";
-//HistogramPersistencySvc.OutputFile  = "histo.rt";
-
-//--------------------------------------------------------------
-// Ntuples
-//--------------------------------------------------------------
-
-NTupleSvc.Output     = { "FILE1 DATAFILE='tuple1.hbook' OPT='NEW'" };
-
-//--------------------------------------------------------------
-// Event related parameters
-//--------------------------------------------------------------
-
-// Number of events to be processed (default is 10)
-ApplicationMgr.EvtMax = 10;
-
-//--------------------------------------------------------------
-// Algorithms Private Options
-//--------------------------------------------------------------
-
-//==============================================================
-//
-// End of job options file
-//
-//##############################################################
-
-- 
GitLab