From 76f3c148e14a106c7646cd90216beb3d61548f62 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <krasznaa@cern.ch>
Date: Tue, 11 Oct 2016 17:17:44 +0200
Subject: [PATCH] Fixed the standalone build of the package with CMake
 (GoodRunsLists-00-01-34)

	* Fixed the standalone build configuration of the package.
	  By making it use AsgAnalysisInterfaces correctly.
	* Tagging as GoodRunsLists-00-01-34

2016-09-06 Will Buttinger <will@cern.ch>
        * Moved interface class for AsgTool to AsgAnalysisInterfaces package
        * Tagging as GoodRunsLists-00-01-33
---
 DataQuality/GoodRunsLists/CMakeLists.txt      |  6 +-
 .../GoodRunsLists/GoodRunsListSelectionTool.h |  2 +-
 .../GoodRunsLists/GoodRunsListsDict.h         |  3 +
 .../IGoodRunsListSelectionTool.h              | 61 +------------------
 .../GoodRunsLists/GoodRunsLists/selection.xml |  2 -
 .../GoodRunsLists/cmt/Makefile.RootCore       |  3 +-
 DataQuality/GoodRunsLists/cmt/requirements    |  2 +
 .../GoodRunsLists/src/GRLSelectorAlg.h        |  2 +-
 8 files changed, 14 insertions(+), 67 deletions(-)

diff --git a/DataQuality/GoodRunsLists/CMakeLists.txt b/DataQuality/GoodRunsLists/CMakeLists.txt
index 94a69aea4a7..975b9680523 100644
--- a/DataQuality/GoodRunsLists/CMakeLists.txt
+++ b/DataQuality/GoodRunsLists/CMakeLists.txt
@@ -1,4 +1,4 @@
-# $Id: CMakeLists.txt 754313 2016-06-12 10:28:19Z will $
+# $Id: CMakeLists.txt 777875 2016-10-11 17:17:13Z krasznaa $
 ################################################################################
 # Package: GoodRunsLists
 ################################################################################
@@ -12,6 +12,7 @@ if( XAOD_STANDALONE )
       PUBLIC
       Control/AthToolSupport/AsgTools
       Event/xAOD/xAODEventInfo
+      PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
       PRIVATE
       Tools/PathResolver )
 else()
@@ -21,6 +22,7 @@ else()
       Control/AthenaBaseComps
       Control/AthenaKernel
       Event/xAOD/xAODEventInfo
+      PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces
       GaudiKernel
       PRIVATE
       Control/StoreGate
@@ -47,7 +49,7 @@ atlas_add_library( GoodRunsListsLib
    PUBLIC_HEADERS GoodRunsLists
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
    PRIVATE_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODEventInfo
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODEventInfo AsgAnalysisInterfaces
    PRIVATE_LINK_LIBRARIES ${LIBXML2_LIBRARIES} PathResolver )
 
 if( NOT XAOD_STANDALONE )
diff --git a/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListSelectionTool.h b/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListSelectionTool.h
index 4feb41b3b18..a732e8bec0a 100644
--- a/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListSelectionTool.h
+++ b/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListSelectionTool.h
@@ -15,7 +15,7 @@
 #include "AsgTools/AsgTool.h"
 
 // Local include(s):
-#include "GoodRunsLists/IGoodRunsListSelectionTool.h"
+#include "AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h"
 #include "GoodRunsLists/TGRLCollection.h"
 
 /// Tool implementing the GRL selection
diff --git a/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListsDict.h b/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListsDict.h
index 9c1d8896962..cd881202c9d 100644
--- a/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListsDict.h
+++ b/DataQuality/GoodRunsLists/GoodRunsLists/GoodRunsListsDict.h
@@ -8,10 +8,13 @@
 
 #include "GoodRunsLists/GoodRunsListSelectionTool.h"
 
+/* removed for now ... maybe move to AsgAnalysisInterfaces if need a dictionary for specific ToolHandle
 #include "AsgTools/ToolHandle.h"
 
+
 struct dummyStruct {
   ToolHandle<IGoodRunsListSelectionTool> dummy1;
 };
+*/
 
 #endif
diff --git a/DataQuality/GoodRunsLists/GoodRunsLists/IGoodRunsListSelectionTool.h b/DataQuality/GoodRunsLists/GoodRunsLists/IGoodRunsListSelectionTool.h
index 52b81aba0d2..0d633051e42 100644
--- a/DataQuality/GoodRunsLists/GoodRunsLists/IGoodRunsListSelectionTool.h
+++ b/DataQuality/GoodRunsLists/GoodRunsLists/IGoodRunsListSelectionTool.h
@@ -1,67 +1,10 @@
-// Dear emacs, this is -*- c++ -*-
-
 /*
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id$
-#ifndef GoodRunsLists_IGoodRunsListSelectionTool_H
-#define GoodRunsLists_IGoodRunsListSelectionTool_H
-
-// System include(s):
-#include <vector>
-#include <string>
-
-// Framework include(s):
-#include "AsgTools/IAsgTool.h"
-
-// EDM include(s):
-#include "xAODEventInfo/EventInfo.h"
-
-// Forward declaration(s):
-namespace Root {
-   class TGRLCollection;
-}
-
-/// Interface to the dual-use GRL tool
-///
-/// This interface should be used inside an analysis to make use of the
-/// GRL tool.
-///
-/// $Revision$
-/// $Date$
-///
-class IGoodRunsListSelectionTool : virtual public asg::IAsgTool {
-
-   ASG_TOOL_INTERFACE( IGoodRunsListSelectionTool )
-
-public:
-   /// Check if the current event passes the selection
-   virtual bool passRunLB( const std::vector< std::string >& grlnameVec =
-                              std::vector< std::string >(),
-                           const std::vector< std::string >& brlnameVec =
-                              std::vector< std::string >() ) const = 0;
-
-   /// Check if the event specified passes the selection
-   virtual bool passRunLB( const xAOD::EventInfo& event,
-                           const std::vector< std::string >& grlnameVec =
-                              std::vector< std::string >(),
-                           const std::vector< std::string >& brlnameVec =
-                              std::vector< std::string >() ) const = 0;
-
-   /// Check if the event specified passes the selection
-   virtual bool passRunLB( int runNumber, int lumiBlockNr,
-                           const std::vector< std::string >& grlnameVec =
-                              std::vector< std::string >(),
-                           const std::vector< std::string >& brlnameVec =
-                              std::vector< std::string >() ) const = 0;
 
-   /// Get the good runs list used by the tool
-   virtual const Root::TGRLCollection& getGRLCollection() const = 0;
 
-   /// Get the bad runs list used by the tool
-   virtual const Root::TGRLCollection& getBRLCollection() const = 0;
 
-}; // class IGoodRunsListSelectionTool
+#warning Please use AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h
 
-#endif // GoodRunsLists_IGoodRunsListSelectionTool_H
+#include "AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h"
diff --git a/DataQuality/GoodRunsLists/GoodRunsLists/selection.xml b/DataQuality/GoodRunsLists/GoodRunsLists/selection.xml
index 0f95c225fbc..5ed3d8b5608 100644
--- a/DataQuality/GoodRunsLists/GoodRunsLists/selection.xml
+++ b/DataQuality/GoodRunsLists/GoodRunsLists/selection.xml
@@ -2,8 +2,6 @@
 
   <!-- GoodRunsListSelectionTool -->
   <class name="GoodRunsListSelectionTool" />
-  <class name="ToolHandle<IGoodRunsListSelectionTool>" />
-  <class name="IGoodRunsListSelectionTool" />
   
 
   <exclusion>
diff --git a/DataQuality/GoodRunsLists/cmt/Makefile.RootCore b/DataQuality/GoodRunsLists/cmt/Makefile.RootCore
index 69136cbe110..87251dcb88a 100644
--- a/DataQuality/GoodRunsLists/cmt/Makefile.RootCore
+++ b/DataQuality/GoodRunsLists/cmt/Makefile.RootCore
@@ -1,9 +1,8 @@
 # Author: Max Baak (mbaak@cern.ch)
-# GoodRunsLists root stand-alone makefile
 
 PACKAGE          = GoodRunsLists
 PACKAGE_PRELOAD  = Tree TreePlayer XMLParser XMLIO
-PACKAGE_TRYDEP   = AsgTools xAODEventInfo PathResolver
+PACKAGE_TRYDEP   = AsgTools xAODEventInfo PathResolver AsgAnalysisInterfaces
 PACKAGE_CXXFLAGS = -I/usr/include/libxml2
 PACKAGE_BINFLAGS = -lxml2
 PACKAGE_PEDANTIC = 1
diff --git a/DataQuality/GoodRunsLists/cmt/requirements b/DataQuality/GoodRunsLists/cmt/requirements
index b076b38e83c..3057bd3974f 100644
--- a/DataQuality/GoodRunsLists/cmt/requirements
+++ b/DataQuality/GoodRunsLists/cmt/requirements
@@ -12,6 +12,8 @@ use  GaudiInterface             GaudiInterface-*                External
 use  xAODEventInfo               xAODEventInfo-*                 Event/xAOD
 use  AsgTools                   AsgTools-*                      Control/AthToolSupport
 
+use AsgAnalysisInterfaces      AsgAnalysisInterfaces-*          PhysicsAnalysis/Interfaces
+
 private
 use  DetectorStatus             DetectorStatus-*                DetectorDescription/DetDescrCond
 use  EventInfo                  EventInfo-*                     Event
diff --git a/DataQuality/GoodRunsLists/src/GRLSelectorAlg.h b/DataQuality/GoodRunsLists/src/GRLSelectorAlg.h
index 9a9e0fe16ea..0ef736fde75 100644
--- a/DataQuality/GoodRunsLists/src/GRLSelectorAlg.h
+++ b/DataQuality/GoodRunsLists/src/GRLSelectorAlg.h
@@ -8,7 +8,7 @@
 #include "AthenaBaseComps/AthAlgorithm.h"
 #include "GaudiKernel/ToolHandle.h" //included under assumption you'll want to use some tools! Remove if you don't!
 
-#include "GoodRunsLists/IGoodRunsListSelectionTool.h"
+#include "AsgAnalysisInterfaces/IGoodRunsListSelectionTool.h"
 
 ///Author: will buttinger
 ///To use this alg in your joboptions:
-- 
GitLab