From a9eb0bf0dde44d99fbcf256e9edc21cbcec9c353 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Fri, 10 Feb 2017 11:28:15 +0100 Subject: [PATCH] Start working on alignment integration tests. Improve C++14 compatibility --- DDG4/plugins/Geant4DetectorGeometryConstruction.cpp | 5 +---- DDG4/src/Geant4Mapping.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp b/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp index 5d7c0d394..360d176d8 100644 --- a/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp +++ b/DDG4/plugins/Geant4DetectorGeometryConstruction.cpp @@ -1,3 +1,4 @@ +//========================================================================== // AIDA Detector description implementation for LCD //-------------------------------------------------------------------------- // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) @@ -92,10 +93,6 @@ void Geant4DetectorGeometryConstruction::constructGeo(Geant4DetectorConstruction g4map.attach(ctxt->geometry); G4VPhysicalVolume* w = ctxt->geometry->world(); // Create Geant4 volume manager only if not yet available - if ( not g4map.volumeManager().isValid() ) { - ctxt->lcdd.apply("DD4hepVolumeManager", 0, 0); - } - // Create Geant4 volume manager g4map.volumeManager(); if ( m_dumpHierarchy ) { Geant4HierarchyDump dmp(ctxt->lcdd); diff --git a/DDG4/src/Geant4Mapping.cpp b/DDG4/src/Geant4Mapping.cpp index 77ec145a1..cabd35ca6 100644 --- a/DDG4/src/Geant4Mapping.cpp +++ b/DDG4/src/Geant4Mapping.cpp @@ -1,4 +1,3 @@ -// $Id: $ //========================================================================== // AIDA Detector description implementation for LCD //-------------------------------------------------------------------------- @@ -13,8 +12,10 @@ //========================================================================== // Framework include files -#include "DD4hep/Printout.h" #include "DDG4/Geant4Mapping.h" + +#include "DD4hep/Printout.h" +#include "DD4hep/VolumeManager.h" #include "G4PVPlacement.hh" #include <stdexcept> @@ -70,8 +71,9 @@ void Geant4Mapping::attach(Geant4GeometryInfo* data_ptr) { /// Access the volume manager Geant4VolumeManager Geant4Mapping::volumeManager() const { - if (m_dataPtr) { - if (m_dataPtr->g4Paths.empty()) { + if ( m_dataPtr ) { + if ( m_dataPtr->g4Paths.empty() ) { + VolumeManager::getVolumeManager(m_lcdd); return Geant4VolumeManager(m_lcdd, m_dataPtr); } return Geant4VolumeManager(Geometry::Handle < Geant4GeometryInfo > (m_dataPtr)); -- GitLab