Import Geant4 9.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:25:56 +02:00
parent 74cad5e589
commit 89a9605df1
4440 changed files with 379508 additions and 189225 deletions
@@ -23,8 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: pyG4GDMLParser.cc,v 1.3 2008/12/12 02:26:34 kmura Exp $
// $Name: geant4-09-03 $
// $Id: pyG4GDMLParser.cc,v 1.5 2010/12/02 08:24:22 kmura Exp $
// $Name: geant4-09-04 $
// ====================================================================
// pyG4GDMLParser.cc
//
@@ -34,6 +34,8 @@
#include <boost/python.hpp>
#include "G4GDMLParser.hh"
#include "G4LogicalVolume.hh"
#include "G4Material.hh"
#include "G4Version.hh"
using namespace boost::python;
@@ -43,14 +45,28 @@ using namespace boost::python;
// ====================================================================
namespace pyG4GDMLParser {
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetWorldVolume,
GetWorldVolume, 0, 1);
#if G4VERSION_NUMBER >= 940
void (G4GDMLParser::*f1_Write)
(const G4String&, const G4VPhysicalVolume*, G4bool,
const G4String&) = &G4GDMLParser::Write;
void (G4GDMLParser::*f2_Write)
(const G4String&, const G4LogicalVolume*, G4bool,
const G4String&) = &G4GDMLParser::Write;
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(g_Write, Write, 2, 4);
#endif
#if G4VERSION_NUMBER >= 920
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Read, Read, 1, 2);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_ReadModule, ReadModule, 1, 2);
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_Write, Write, 1, 4);
#endif
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetWorldVolume,
GetWorldVolume, 0, 1);
}
using namespace pyG4GDMLParser;
@@ -63,15 +79,24 @@ void export_G4GDMLParser()
class_<G4GDMLParser, boost::noncopyable>
("G4GDMLParser", "GDML parser")
// ---
#if G4VERSION_NUMBNER < 920
#if G4VERSION_NUMBER < 920
.def("Read", &G4GDMLParser::Read)
#else
.def("Read", &G4GDMLParser::Read, f_Read())
.def("ReadModule", &G4GDMLParser::ReadModule, f_ReadModule())
.def("Write", &G4GDMLParser::Write, f_Write())
.def("ParseST", &G4GDMLParser::ParseST,
return_value_policy<reference_existing_object>())
#endif
#if G4VERSION_NUMBER >= 920
#if G4VERSION_NUMBER >= 940
.def("Write", f1_Write, f_Write())
.def("Write", f2_Write, g_Write())
#else
.def("Write", &G4GDMLParser::Write, f_Write())
#endif
#endif
.def("GetWorldVolume", &G4GDMLParser::GetWorldVolume,
f_GetWorldVolume()
[return_value_policy<reference_existing_object>()])