Import Geant4 5.2.0 source tree
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
# $Id: G4String.i,v 1.1 2003/06/17 15:25:01 mdressel Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
// coppied from std_string.i
|
||||
|
||||
%include exception.i
|
||||
|
||||
%{
|
||||
#include "G4String.hh"
|
||||
%}
|
||||
|
||||
|
||||
class G4String;
|
||||
|
||||
/* Overloading check */
|
||||
|
||||
%typemap(typecheck) G4String = char *;
|
||||
%typemap(typecheck) const G4String & = char *;
|
||||
|
||||
%typemap(in) G4String {
|
||||
if (PyString_Check($input))
|
||||
$1 = G4String(PyString_AsString($input));
|
||||
else
|
||||
SWIG_exception(SWIG_TypeError, "G4String expected");
|
||||
}
|
||||
|
||||
%typemap(in) const G4String & (G4String temp) {
|
||||
if (PyString_Check($input)) {
|
||||
temp = G4String(PyString_AsString($input));
|
||||
$1 = &temp;
|
||||
} else {
|
||||
SWIG_exception(SWIG_TypeError, "G4String expected");
|
||||
}
|
||||
}
|
||||
|
||||
%typemap(out) G4String {
|
||||
$result = PyString_FromStringAndSize($1.data(),$1.size());
|
||||
}
|
||||
|
||||
%typemap(out) const G4String & {
|
||||
$result = PyString_FromStringAndSize($1->data(),$1->size());
|
||||
}
|
||||
|
||||
%typemap(inv, parse="s") G4String, const G4String &, G4String & "$1_name.c_str()";
|
||||
|
||||
%typemap(inv, parse="s") G4String *, const G4String * "$1_name->c_str()";
|
||||
|
||||
%typemap(outv) G4String {
|
||||
if (PyString_Check($input))
|
||||
$result = G4String(PyString_AsString($input));
|
||||
else
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("G4String expected");
|
||||
}
|
||||
|
||||
%typemap(outv) const G4String & (G4String temp) {
|
||||
if (PyString_Check($input)) {
|
||||
temp = G4String(PyString_AsString($input));
|
||||
$result = &temp;
|
||||
} else {
|
||||
throw SWIG_DIRECTOR_TYPE_MISMATCH("G4String expected");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# $Id: GNUmakefile,v 1.3 2003/06/20 12:41:06 dressel Exp $
|
||||
# --------------------------------------------------------------
|
||||
# GNUmakefile Michael Dressel
|
||||
# --------------------------------------------------------------
|
||||
|
||||
name := G4KernelWrapper
|
||||
G4TARGET := $(name)
|
||||
G4EXLIB := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../..
|
||||
endif
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
|
||||
SWIGFLAGS = -I./ \
|
||||
-I${G4INSTALL}/source/global/management/include \
|
||||
-I${G4INSTALL}/source/geometry/biasing/include \
|
||||
-I${G4INSTALL}/source/digits+hits/detector/include \
|
||||
-I${G4INSTALL}/source/event/include \
|
||||
-I${G4INSTALL}/source/processes/transportation/include \
|
||||
-I${TIARA_BASE}/source/CLHEPWrapper/include \
|
||||
-I${CLHEP_BASE_DIR}/include
|
||||
|
||||
|
||||
include $(TIARA_BASE)/source/swig.gmk
|
||||
|
||||
|
||||
.PHONY: all tiaraClean
|
||||
|
||||
all: $(SWIGSO)
|
||||
|
||||
include $(G4INSTALL)/config/binmake.gmk
|
||||
|
||||
|
||||
|
||||
CPPFLAGS += -I$(PYTHON_INCLUDE_DIR)
|
||||
|
||||
|
||||
LDFLAGS += -L$(PYTHON_LIB_DIR)
|
||||
|
||||
LDLIBS += -lpython$(PYTHONVERSION) \
|
||||
-lnsl \
|
||||
-ldl \
|
||||
-lreadline \
|
||||
-ltermcap \
|
||||
-lieee \
|
||||
-lpthread \
|
||||
-lutil
|
||||
|
||||
|
||||
|
||||
tiaraClean:
|
||||
@echo Cleaning up $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
@rm -rf $(G4WORKDIR)/tmp/$(G4SYSTEM)/$(name)
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
# $Id: G4Kernel.i,v 1.5 2003/06/20 12:41:06 dressel Exp $
|
||||
# -------------------------------------------------------------------
|
||||
# GEANT4 tag $Name: geant4-05-02 $
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
%module G4Kernel
|
||||
%{
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4VSolid.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "G4UserLimits.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4VScorer.hh"
|
||||
#include "G4VCellScorer.hh"
|
||||
#include "G4CellScorer.hh"
|
||||
#include "G4CellStoreScorer.hh"
|
||||
#include "G4VCellScorerStore.hh"
|
||||
#include "G4ScoreTable.hh"
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "G4VUserPhysicsList.hh"
|
||||
#include "G4VModularPhysicsList.hh"
|
||||
#include "G4GeometryCell.hh"
|
||||
#include "G4CellScoreValues.hh"
|
||||
#include "G4CellScorerStore.hh"
|
||||
#include "G4Scorer.hh"
|
||||
#include "G4VSampler.hh"
|
||||
#include "G4MassGeometrySampler.hh"
|
||||
#include "G4ParallelGeometrySampler.hh"
|
||||
#include "G4VImportanceAlgorithm.hh"
|
||||
#include "G4CellScoreComposer.hh"
|
||||
#include "G4VIStore.hh"
|
||||
#include "G4IStore.hh"
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include <strstream>
|
||||
#include "G4VisManager.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
%}
|
||||
|
||||
%include std_string.i
|
||||
%include G4String.i
|
||||
|
||||
%import CLHEP.i
|
||||
%inline %{
|
||||
typedef bool G4bool;
|
||||
typedef double G4double;
|
||||
typedef int G4int;
|
||||
%}
|
||||
|
||||
|
||||
%include G4VIStore.hh
|
||||
|
||||
%include G4GeometryCell.hh
|
||||
|
||||
%include G4IStore.hh
|
||||
|
||||
%include G4CellScoreValues.hh
|
||||
|
||||
%include G4CellScoreComposer.hh
|
||||
|
||||
%include G4VScorer.hh
|
||||
|
||||
%include G4VCellScorer.hh
|
||||
%include G4CellScorer.hh
|
||||
|
||||
%include G4VCellScorerStore.hh
|
||||
%include G4CellScorerStore.hh
|
||||
|
||||
%include G4CellStoreScorer.hh
|
||||
%include G4Scorer.hh
|
||||
|
||||
%include G4VImportanceAlgorithm.hh
|
||||
|
||||
%include G4VSampler.hh
|
||||
|
||||
%include G4MassGeometrySampler.hh
|
||||
|
||||
%include G4ParallelGeometrySampler.hh
|
||||
|
||||
%include G4ScoreTable.hh
|
||||
%extend G4ScoreTable {
|
||||
const char *Write(const G4MapGeometryCellCellScorer &cs){
|
||||
std::ostrstream tmpout;
|
||||
self->Print(cs, &tmpout);
|
||||
std::string *value = new std::string(tmpout.str());
|
||||
return value->c_str();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
class G4VisManager {
|
||||
public:
|
||||
void Initialize();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class G4VPhysicalVolume{
|
||||
};
|
||||
|
||||
class G4VUserDetectorConstruction {
|
||||
public:
|
||||
G4VPhysicalVolume* Construct();
|
||||
};
|
||||
|
||||
|
||||
class G4VUserPrimaryGeneratorAction {
|
||||
};
|
||||
|
||||
class G4VUserPhysicsList {
|
||||
public:
|
||||
void Construct();
|
||||
};
|
||||
|
||||
class G4VModularPhysicsList: public G4VUserPhysicsList {
|
||||
public:
|
||||
void Construct();
|
||||
};
|
||||
|
||||
class G4UserSteppingAction{
|
||||
};
|
||||
|
||||
class G4UserEventAction{
|
||||
};
|
||||
|
||||
class G4FieldManager {
|
||||
};
|
||||
|
||||
class G4VSensitiveDetector {
|
||||
};
|
||||
|
||||
class G4UserLimits {
|
||||
};
|
||||
|
||||
class G4Material {
|
||||
};
|
||||
|
||||
|
||||
class G4VSolid {
|
||||
};
|
||||
|
||||
class G4CSGSolid : public G4VSolid{
|
||||
};
|
||||
|
||||
class G4Box : public G4CSGSolid
|
||||
{
|
||||
public:
|
||||
G4Box(const G4String &pName, G4double pX, G4double pY, G4double pZ);
|
||||
};
|
||||
|
||||
|
||||
class G4Tubs : public G4CSGSolid
|
||||
{
|
||||
public:
|
||||
G4Tubs(const G4String &pName,
|
||||
G4double pRMin,
|
||||
G4double pRMax,
|
||||
G4double pDz,
|
||||
G4double pSPhi,
|
||||
G4double pDPhi );
|
||||
};
|
||||
|
||||
|
||||
|
||||
class G4LogicalVolume
|
||||
{
|
||||
public:
|
||||
G4LogicalVolume(G4VSolid *pSolid,
|
||||
G4Material *pMaterial,
|
||||
const G4String &pName,
|
||||
G4FieldManager* pFieldMgr=0,
|
||||
G4VSensitiveDetector* pSDetector=0,
|
||||
G4UserLimits* pULimits=0,
|
||||
G4bool optimise=true);
|
||||
// Constructor. The solid and material pointer must be non null.
|
||||
// The parameters for field, detector and user limits are optional.
|
||||
// The volume also enters itself into the logical volume Store.
|
||||
// Optimisation of the geometry (voxelisation) for the volume
|
||||
// hierarchy is applied by default. For parameterised volumes in
|
||||
// the hierarchy, optimisation is -always- applied.
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class G4RotationMatrix{
|
||||
public:
|
||||
G4RotationMatrix();
|
||||
};
|
||||
|
||||
class G4PVPlacement : public G4VPhysicalVolume
|
||||
{
|
||||
public:
|
||||
G4PVPlacement(G4RotationMatrix *pRot,
|
||||
const Hep3Vector &tlate,
|
||||
G4LogicalVolume *pCurrentLogical,
|
||||
const G4String &pName,
|
||||
G4LogicalVolume *pMotherLogical = 0,
|
||||
G4bool pMany = false,
|
||||
G4int pCopyNo = 0);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
This directory will contain the source file for python wrappers
|
||||
generated by swig.
|
||||
Reference in New Issue
Block a user