summaryrefslogtreecommitdiff
path: root/chroma
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-09-16 19:09:08 -0400
committerStan Seibert <stan@mtrr.org>2011-09-16 19:09:08 -0400
commitad3a3e06dd618bfa400269c17d59698d6a54ea9f (patch)
tree5cd26800b49830d907155d707b0ba6a8f654306f /chroma
parenta9d001cf3e2b515864e6c572d849394ac3cc76fb (diff)
downloadchroma-ad3a3e06dd618bfa400269c17d59698d6a54ea9f.tar.gz
chroma-ad3a3e06dd618bfa400269c17d59698d6a54ea9f.tar.bz2
chroma-ad3a3e06dd618bfa400269c17d59698d6a54ea9f.zip
Now use setuptools-built Boost::Python GEANT4 module
Diffstat (limited to 'chroma')
-rw-r--r--chroma/generator/g4gen.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/chroma/generator/g4gen.py b/chroma/generator/g4gen.py
index 91ddc18..fa4521d 100644
--- a/chroma/generator/g4gen.py
+++ b/chroma/generator/g4gen.py
@@ -5,18 +5,7 @@ import g4py.ParticleGun
import pyublas
import numpy as np
from chroma.event import Photons, Vertex
-
-try:
- import G4chroma
-except:
- # Try building the module
- import subprocess
- import sys, os
- module_dir = os.path.split(os.path.realpath(__file__))[0]
- print >>sys.stderr, 'Compiling G4chroma.so...'
- retcode = subprocess.call('g++ -o \'%s/G4chroma.so\' -shared \'%s/G4chroma.cc\' -fPIC `geant4-config --cflags --libs` `python-config --cflags --libs --ldflags` -lboost_python' % (module_dir, module_dir), shell=True)
- assert retcode == 0
- import G4chroma
+import chroma.generator._g4chroma
class G4Generator(object):
def __init__(self, material, seed=None):