DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Geant4GDMLDetector.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 // Framework include files
16 
17 // C/C++ include files
18 #include <iostream>
19 
20 //#define GEANT4_HAS_GDML
21 
22 #ifdef GEANT4_HAS_GDML
23 #include <G4GDMLParser.hh>
24 #endif
25 
27  : m_fileName(gdmlFile) {
28 }
29 
31 #ifdef GEANT4_HAS_GDML
32  G4GDMLParser parser;
33  parser.Read( m_fileName );
34  m_world = parser.GetWorldVolume();
35 #endif
36  return m_world;
37 }
parser
dd4hepDOMParser * parser
Definition: DocumentHandler.cpp:159
Geant4GDMLDetector.h
dd4hep::sim::Geant4GDMLDetector::Geant4GDMLDetector
Geant4GDMLDetector(const std::string &gdmlFile)
Constructor to open gdml file.
Definition: Geant4GDMLDetector.cpp:26
dd4hep::sim::Geant4GDMLDetector::Construct
G4VPhysicalVolume * Construct() override
Definition: Geant4GDMLDetector.cpp:30