Skip to content
Snippets Groups Projects
Geant4GDMLDetector.cpp 1.02 KiB
Newer Older
//==========================================================================
Markus Frank's avatar
Markus Frank committed
//  AIDA Detector description implementation 
//--------------------------------------------------------------------------
Markus Frank's avatar
Markus Frank committed
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
//
// For the licensing terms see $DD4hepINSTALL/LICENSE.
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
//
// Author     : M.Frank
//
//==========================================================================

// Framework include files
#include <DDG4/Geant4GDMLDetector.h>
//#define GEANT4_HAS_GDML
Markus Frank's avatar
Markus Frank committed
dd4hep::sim::Geant4GDMLDetector::Geant4GDMLDetector(const std::string& gdmlFile)
  : m_fileName(gdmlFile) {
Markus Frank's avatar
Markus Frank committed
G4VPhysicalVolume* dd4hep::sim::Geant4GDMLDetector::Construct() {
#ifdef GEANT4_HAS_GDML
  G4GDMLParser parser;
  parser.Read( m_fileName );
  m_world = parser.GetWorldVolume();
#endif
  return m_world;
}