Skip to content
Snippets Groups Projects
Commit ec19e9a9 authored by Benjamin Morgan's avatar Benjamin Morgan
Browse files

Support building with Geant4 10.6

From version 10.6, Geant4 no longer exports G4MULTITHREADED in the
compiler flags as "-DG4MULTITHREADED". This symbol must be the same
between a build of Geant4 and any client application, so is instead
exported into configuration header included in the commonn G4Types.hh
header.

Update components of Athena that rely on this symbol so that they
explicitly #include G4Types.hh before using it.

InnerDetector has a private dependency on Geant4 headers added so
that it picks up the needed header path.
parent c93c2d6c
No related branches found
No related tags found
No related merge requests found
Showing
with 14 additions and 2 deletions
......@@ -11,6 +11,7 @@
#include <map>
#include <thread>
#include "G4Types.hh"
#ifdef G4MULTITHREADED
# include "tbb/concurrent_unordered_map.h"
#endif
......
......@@ -19,6 +19,7 @@ atlas_depends_on_subdirs( PUBLIC
# External dependencies:
find_package( CLHEP )
find_package( Geant4 )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
# Component(s) in the package:
......@@ -26,7 +27,7 @@ atlas_add_library( InDetSimEvent
src/*.cxx
PUBLIC_HEADERS InDetSimEvent
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS}
DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthAllocators AthenaKernel CxxUtils GeneratorObjects HitManagement StoreGateLib SGtests
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} InDetIdentifier )
......@@ -34,6 +35,6 @@ atlas_add_library( InDetSimEvent
atlas_add_dictionary( InDetSimEventDict
InDetSimEvent/InDetSimEventDict.h
InDetSimEvent/selection.xml
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthAllocators CxxUtils GeneratorObjects HitManagement StoreGateLib SGtests InDetIdentifier InDetSimEvent )
......@@ -9,6 +9,7 @@
#include "StoreGate/StoreGate.h"
#include "InDetIdentifier/PixelID.h"
#include "G4Types.hh"
#ifdef G4MULTITHREADED
# include "GaudiKernel/ContextSpecificPtr.h"
#endif
......
......@@ -6,6 +6,7 @@
#define G4ATLASALG_G4ATLASMTRUNMANAGER_H
// Hide multi-threading classes from builds without G4MT
#include "G4Types.hh"
#ifdef G4MULTITHREADED
// Geant4 includes
......
......@@ -6,6 +6,7 @@
#define G4ATLASALG_G4ATLASUSERWORKERTHREADINITIALIZATION_H
// Hide multi-threading classes from builds without G4MT
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4UserWorkerThreadInitialization.hh"
......
......@@ -6,6 +6,7 @@
#define G4ATLASALG_G4ATLASWORKERRUNMANAGER_H
// Hide multi-threading classes from builds without G4MT
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "GaudiKernel/ToolHandle.h"
......
......@@ -3,6 +3,7 @@
*/
// Hide multi-threading classes from builds without G4MT
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4AtlasAlg/G4AtlasMTRunManager.h"
......
......@@ -3,6 +3,7 @@
*/
// Hide multi-threading classes from builds without G4MT
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4AtlasAlg/G4AtlasUserWorkerThreadInitialization.h"
......
......@@ -3,6 +3,7 @@
*/
// Hide multi-threading classes from builds without G4MT
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4AtlasAlg/G4AtlasWorkerRunManager.h"
......
......@@ -11,6 +11,7 @@
#include "G4VFastSimulationModel.hh"
// Members
#include "G4Types.hh"
#include "G4VFastSimulationModel.hh"
#ifdef G4MULTITHREADED
# include "tbb/concurrent_unordered_map.h"
......
......@@ -11,6 +11,7 @@
// Members
#include "G4VSensitiveDetector.hh"
#include "G4Types.hh"
#ifdef G4MULTITHREADED
# include "tbb/concurrent_unordered_map.h"
#endif
......
......@@ -46,6 +46,7 @@
#define MONOPOLE_G4mplEquationSetup_H
#include <thread>
#include "G4Types.hh"
#ifdef G4MULTITHREADED
# include "tbb/concurrent_unordered_map.h"
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment