From 1ca77e62d957eb4fc819e83c536ceebe8f87c246 Mon Sep 17 00:00:00 2001
From: Dave Casper <dcasper@uci.edu>
Date: Fri, 12 Jan 2024 21:23:30 -0800
Subject: [PATCH] Round 2 of migration

---
 .../src/FaserByteStreamInputSvc.cxx           |  2 ++
 Simulation/G4Faser/G4FaserAlg/CMakeLists.txt  |  4 +--
 Simulation/G4Sim/FaserMCTruth/CMakeLists.txt  |  2 +-
 .../ISF_Core/FaserISF_Event/CMakeLists.txt    |  9 +++---
 .../FaserISF_Event/FaserParticleHelper.h      |  8 ++---
 .../src/FaserParticleHelper.cxx               |  2 +-
 .../ISF_Core/FaserISF_Services/CMakeLists.txt |  2 --
 .../FaserISF_Geant4Event/CMakeLists.txt       |  4 +--
 .../FaserISF_HepMC_Tools/CMakeLists.txt       | 16 +++++-----
 .../src/FaserTriggerDecoderTool.cxx           |  1 +
 .../src/FaserTriggerDecoderTool.h             |  1 +
 package_filters.txt                           | 30 +++++++++++++++----
 .../Root/FaserTruthParticle.cxx               |  2 +-
 13 files changed, 52 insertions(+), 31 deletions(-)

diff --git a/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx b/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx
index e2bb49c3..4e134200 100644
--- a/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx
+++ b/Event/FaserByteStreamCnvSvc/src/FaserByteStreamInputSvc.cxx
@@ -18,6 +18,8 @@
 #include "xAODEventInfo/EventInfo.h"
 #include "xAODEventInfo/EventAuxInfo.h"
 
+// std::ostream& operator<<(std::ostream&, const DAQFormats::EventFull&);
+// std::ostream& operator<<(std::ostream&, const DAQFormats::EventFragment&);
 #include "EventFormats/DAQFormats.hpp"
 
 // Don't know what these do, comment for now
diff --git a/Simulation/G4Faser/G4FaserAlg/CMakeLists.txt b/Simulation/G4Faser/G4FaserAlg/CMakeLists.txt
index ec2babac..bc2a131d 100644
--- a/Simulation/G4Faser/G4FaserAlg/CMakeLists.txt
+++ b/Simulation/G4Faser/G4FaserAlg/CMakeLists.txt
@@ -16,14 +16,14 @@ find_package( Eigen )
 atlas_add_library( G4FaserAlgLib
                      src/*.cxx
                      NO_PUBLIC_HEADERS
-                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                      LINK_LIBRARIES ${GEANT4_LIBRARIES} ${EIGEN_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib G4AtlasAlgLib AthenaBaseComps AthenaKernel GaudiKernel G4AtlasInterfaces SGTools StoreGateLib SGtests EventInfo GeneratorObjects GeoModelInterfaces FaserISF_InterfacesLib FaserMCTruthBaseLib )
 
 # Component(s) in the package:
 atlas_add_component( G4FaserAlg
                      src/components/*.cxx
                      NO_PUBLIC_HEADERS
-                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                      LINK_LIBRARIES ${GEANT4_LIBRARIES} ${EIGEN_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaBaseComps AthenaKernel GaudiKernel G4AtlasInterfaces G4FaserAlgLib G4AtlasAlgLib SGTools StoreGateLib SGtests EventInfo GeneratorObjects FaserMCTruthBaseLib )
 
 atlas_add_test( G4FaserAlgConfig_TestFaser
diff --git a/Simulation/G4Sim/FaserMCTruth/CMakeLists.txt b/Simulation/G4Sim/FaserMCTruth/CMakeLists.txt
index 86d88a5d..1ef15e63 100644
--- a/Simulation/G4Sim/FaserMCTruth/CMakeLists.txt
+++ b/Simulation/G4Sim/FaserMCTruth/CMakeLists.txt
@@ -14,7 +14,7 @@ find_package( XercesC )
 atlas_add_library( FaserMCTruth
                    src/*.cxx
                    PUBLIC_HEADERS FaserMCTruth
-                   INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} 
                    DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AtlasHepMCLib AthenaKernel GeneratorObjects
                    PRIVATE_LINK_LIBRARIES ISF_Event FaserISF_Event SimHelpers )
diff --git a/Simulation/ISF/ISF_Core/FaserISF_Event/CMakeLists.txt b/Simulation/ISF/ISF_Core/FaserISF_Event/CMakeLists.txt
index 63a566c7..96c113ce 100644
--- a/Simulation/ISF/ISF_Core/FaserISF_Event/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Core/FaserISF_Event/CMakeLists.txt
@@ -8,19 +8,18 @@ atlas_subdir( FaserISF_Event )
 # External dependencies:
 find_package( CLHEP )
 find_package( Eigen )
-find_package( HepMC )
 
 # Component(s) in the package:
 atlas_add_library( FaserISF_Event
                    src/*.cxx
                    PUBLIC_HEADERS FaserISF_Event
-                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} ISF_Event TestTools AthenaBaseComps FaserDetDescr GeoPrimitives GeneratorObjects GaudiKernel )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ISF_Event TestTools AthenaBaseComps FaserDetDescr GeoPrimitives GeneratorObjects GaudiKernel )
 
 #atlas_add_test( FaserISFParticle_test
 #                SOURCES
 #                test/ISFParticle_test.cxx
-#                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
-#                LINK_LIBRARIES ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} ISF_Event TestTools AthenaBaseComps FaserDetDescr GeoPrimitives GeneratorObjects GaudiKernel FaserISF_Event 
+#                INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+#                LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ISF_Event TestTools AthenaBaseComps FaserDetDescr GeoPrimitives GeneratorObjects GaudiKernel FaserISF_Event 
 #                WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
diff --git a/Simulation/ISF/ISF_Core/FaserISF_Event/FaserISF_Event/FaserParticleHelper.h b/Simulation/ISF/ISF_Core/FaserISF_Event/FaserISF_Event/FaserParticleHelper.h
index dcaec8f4..5764a836 100644
--- a/Simulation/ISF/ISF_Core/FaserISF_Event/FaserISF_Event/FaserParticleHelper.h
+++ b/Simulation/ISF/ISF_Core/FaserISF_Event/FaserISF_Event/FaserParticleHelper.h
@@ -10,9 +10,9 @@
 #define FASERISF_EVENT_FASERPARTICLEHELPER_H 1
 
 // forward declarations
-namespace HepMC {
-  class GenParticle;
-}
+// namespace HepMC {
+//   class GenParticle;
+// }
 
 namespace ISF {
 
@@ -37,7 +37,7 @@ namespace ISF {
         ~FaserParticleHelper() {} ;
 
         /** convert the given particle to HepMC format */
-        static HepMC::GenParticle *convert( const ISF::FaserISFParticle &p);
+        static HEPMC3::GenParticle *convert( const ISF::FaserISFParticle &p);
         
     private :
   };
diff --git a/Simulation/ISF/ISF_Core/FaserISF_Event/src/FaserParticleHelper.cxx b/Simulation/ISF/ISF_Core/FaserISF_Event/src/FaserParticleHelper.cxx
index a6ae7d43..74b6d9ff 100644
--- a/Simulation/ISF/ISF_Core/FaserISF_Event/src/FaserParticleHelper.cxx
+++ b/Simulation/ISF/ISF_Core/FaserISF_Event/src/FaserParticleHelper.cxx
@@ -17,7 +17,7 @@
 // ISF includes
 #include "FaserISF_Event/FaserISFParticle.h"
 
-HepMC::GenParticle* ISF::FaserParticleHelper::convert( const ISF::FaserISFParticle &particle) {
+HEPMC3::GenParticle* ISF::FaserParticleHelper::convert( const ISF::FaserISFParticle &particle) {
 
   const Amg::Vector3D &mom = particle.momentum();
   double mass = particle.mass();
diff --git a/Simulation/ISF/ISF_Core/FaserISF_Services/CMakeLists.txt b/Simulation/ISF/ISF_Core/FaserISF_Services/CMakeLists.txt
index 278b3f28..59c2c07a 100644
--- a/Simulation/ISF/ISF_Core/FaserISF_Services/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Core/FaserISF_Services/CMakeLists.txt
@@ -31,7 +31,6 @@ atlas_add_component( FaserISF_Services
 #                  ${GMOCK_INCLUDE_DIRS}
 #                  ${ROOT_INCLUDE_DIRS}
 #                  ${GEANT4_INCLUDE_DIRS}
-#                  ${HEPMC_INCLUDE_DIRS}
 #                  ${CLHEP_INCLUDE_DIRS}
 #                  ${HEPPDT_INCLUDE_DIRS}
 #                LINK_LIBRARIES
@@ -39,7 +38,6 @@ atlas_add_component( FaserISF_Services
 #                  ${GMOCK_LIBRARIES}
 #                  ${ROOT_LIBRARIES}
 #                  ${GEANT4_LIBRARIES}
-#                  ${HEPMC_LIBRARIES}
 #                  ${CLHEP_LIBRARIES}
 #                  ${HEPPDT_LIBRARIES}
 #                  GaudiKernel
diff --git a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/CMakeLists.txt b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/CMakeLists.txt
index d2a2aece..8159ad5f 100644
--- a/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/CMakeLists.txt
+++ b/Simulation/ISF/ISF_Geant4/FaserISF_Geant4Event/CMakeLists.txt
@@ -27,8 +27,8 @@ atlas_add_library( FaserISF_Geant4Event
 
 #atlas_add_test(SOURCES
 #               INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-#              ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+#              ${EIGEN_INCLUDE_DIRS}
 #               LINK_LIBRARIES
-#              ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES}
+#              ${CLHEP_LIBRARIES} 
 #               ${EIGEN_LIBRARIES} ISF_Event SimHelpers GeoPrimitives
 #               BarcodeEvent MCTruth)
diff --git a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/CMakeLists.txt b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/CMakeLists.txt
index 26ed2984..c25c2b17 100644
--- a/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/CMakeLists.txt
+++ b/Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Tools/CMakeLists.txt
@@ -16,26 +16,26 @@ find_package( GMock )
 atlas_add_component( FaserISF_HepMC_Tools
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${HEPMC_LIBRARIES} GaudiKernel FaserDetDescr AthenaBaseComps TruthUtils FaserISF_Event FaserISF_HepMC_Interfaces ISF_HepMC_Interfaces FaserISF_InterfacesLib PathResolver )
+                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel FaserDetDescr AthenaBaseComps TruthUtils FaserISF_Event FaserISF_HepMC_Interfaces ISF_HepMC_Interfaces FaserISF_InterfacesLib PathResolver )
 
 # Tests
 #atlas_add_test( GenParticleGenericFilter_test
 #                SOURCES test/GenParticleGenericFilter_test.cxx src/GenParticleGenericFilter.cxx
-#                INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-#                LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps )
+#                INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} 
+#                LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} AthenaBaseComps )
 
 # Tests
 #atlas_add_test( GenParticleInteractingFilter_test
 #                SOURCES test/GenParticleInteractingFilter_test.cxx src/GenParticleInteractingFilter.cxx
-#                INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-#                LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps TruthUtils )
+#                INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} 
+#                LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} AthenaBaseComps TruthUtils )
 
 # Tests
 #atlas_add_test( GenParticleLifetimeFilter_test
 #                SOURCES test/GenParticleLifetimeFilter_test.cxx src/GenParticleLifetimeFilter.cxx
-#                INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS}
-#                LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} ${HEPMC_LIBRARIES} AthenaBaseComps TruthUtils )
+#                INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS} 
+#                LINK_LIBRARIES ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES} AthenaBaseComps TruthUtils )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.cxx b/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.cxx
index af639a5b..148b2931 100644
--- a/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.cxx
+++ b/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.cxx
@@ -10,6 +10,7 @@
 
 #include "EventFormats/TLBDataFragment.hpp"
 
+
 static const InterfaceID IID_IFaserTriggerDecoderTool("FaserTriggerDecoderTool", 1, 0);
 
 const InterfaceID& FaserTriggerDecoderTool::interfaceID() {
diff --git a/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.h b/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.h
index 346941d4..424a6e19 100644
--- a/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.h
+++ b/Trigger/FaserTrigEventCnv/FaserTriggerByteStream/src/FaserTriggerDecoderTool.h
@@ -11,6 +11,7 @@
 #include "GaudiKernel/ToolHandle.h"
 
 #include "EventFormats/DAQFormats.hpp"
+
 #include "xAODFaserTrigger/FaserTriggerData.h"
 
 // This class provides conversion between bytestream and xAOD trigger objects
diff --git a/package_filters.txt b/package_filters.txt
index f77c2958..c75cfa2c 100644
--- a/package_filters.txt
+++ b/package_filters.txt
@@ -1,51 +1,71 @@
 
++Calorimeter/CaloDetDescr/FaserCaloIdentifier
 +Calorimeter/CaloRecTools
 -Calorimeter/.*
 +Control/CalypsoExample/GenEventExample
++Control/CalypsoExample/TriggerDataAccessExample
++Control/CalypsoExample/WaveformAnalysisExample
 -Control/.*
 +Database/ConnectionManagement/FaserAuthentication
 #+Derivation/DerivationAlgs
-#+Derivation/DerivationTools
++Derivation/DerivationTools
 -Derivation/.*
 +DetectorDescription/DetDescrCnvSvc
 +DetectorDescription/FaserDetDescr
++DetectorDescription/GeoModel/GeoModelFaserUtilities
 +DetectorDescription/GeoModel/GeoModelInterfaces
 -DetectorDescription/.*
 +Event/FaserByteStreamCnvSvcBase
-#+Event/FaserByteStreamCnvSvc
++Event/FaserByteStreamCnvSvc
 +Event/FaserEventStorage
 -Event/.*
 -FaserGeometryCommon/.*
 -Generators/.*
++LHCData/LHCDataAlgs
 +LHCData/LHCDataTools
--LHCData/.*
+#-LHCData/.*
 +MagneticField/MagFieldElements
++MagneticField/MagFieldConditions
 -MagneticField/.*
 -Monitoring
++Neutrino/NeutrinoDetDescr/NeutrinoIdentifier
 -Neutrino/.*
 -PhysicsAnalysis/.*
++Scintillator/ScintDetDescr/ScintIdentifier
 -Scintillator/.*
 #+Simulation/G4Extensions/Pythia8Decayer
 #+Simulation/G4Faser/G4FaserAlg
 #+Simulation/G4Utilities/Geo2G4
-+Simulation/ISF/ISF_Core/FaserISF_Interfaces
+#+Simulation/ISF/ISF_Core/FaserISF_Event
+#+Simulation/ISF/ISF_Core/FaserISF_Interfaces
 +Simulation/ISF/ISF_HepMC/FaserISF_HepMC_Interfaces
 -Simulation/.*
 #+Tracker/TrackerAlignTools/TrackerAlignGenTools
 +Tracker/TrackerConditions/FaserSCT_ConditionsData
 #+Tracker/TrackerConditions/FaserSiPropertiesTool
++Tracker/TrackerDetDescr/TrackerIdentifier
 +Tracker/TrackerRawEvent/TrackerSimData
 #+Tracker/TrackerRecTools/FaserSiClusterizationTool
 -Tracker/.*
++Tracking/TrkEventCnv/TrkEventCnvTools
 -Tracking/.*
--Trigger/.*
++Trigger/FaserTrigEventCnv/FaserTriggerByteStream
+#-Trigger/.*
 #+Waveform/WaveDigiTools
 #+Waveform/WaveRecTools
 -Waveform/.*
++faser-common/EventFormats
++faser-common/Exceptions
++faser-common/Logging
+#-faser-common/.*
++graphics/VTI12/VTI12Algs
 +graphics/VTI12/VTI12Gui
 -graphics/.*
 +xAOD/xAODFaserBase
++xAOD/xAODFaserCalorimeter
 +xAOD/xAODFaserLHC
+#+xAOD/xAODFaserTracking
 +xAOD/xAODFaserTrigger
+-xAOD/xAODFaserTruth
 +xAOD/xAODFaserWaveform
 -xAOD/.*
diff --git a/xAOD/xAODFaserTruth/Root/FaserTruthParticle.cxx b/xAOD/xAODFaserTruth/Root/FaserTruthParticle.cxx
index 4f1fd7d7..a41aaf67 100644
--- a/xAOD/xAODFaserTruth/Root/FaserTruthParticle.cxx
+++ b/xAOD/xAODFaserTruth/Root/FaserTruthParticle.cxx
@@ -12,7 +12,7 @@
 #include <stdexcept>
 
 // Utility include(s):
-#include "TruthUtils/PIDHelpers.h"
+// #include "TruthUtils/PIDHelpers.h"
 
 // xAOD include(s):
 #include "xAODCore/AuxStoreAccessorMacros.h"
-- 
GitLab