From 4ad052e067391cfab04b43e011dd2150635bd001 Mon Sep 17 00:00:00 2001
From: Whitney Armstrong <warmstrong@anl.gov>
Date: Mon, 28 Dec 2020 12:56:30 -0600
Subject: [PATCH] 	modified:   dis.sh 	modified:   gen.sh

---
 dis/dis.sh |  6 ------
 dis/gen.sh | 13 ++++++++++++-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/dis/dis.sh b/dis/dis.sh
index 977f3312..7c68e130 100644
--- a/dis/dis.sh
+++ b/dis/dis.sh
@@ -46,12 +46,6 @@ export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root"
 ## TODO remove this
 #bash util/build_detector.sh
 
-g++ dis/src/pythia_dis.cc -o pythia_dis  \
-   -I/usr/local/include  \
-   -O2 -std=c++11 -pedantic -W -Wall -Wshadow -fPIC  \
-   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpythia8 -ldl \
-   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lHepMC3
-
 
 ## =============================================================================
 ## Step 2: Run the simulation
diff --git a/dis/gen.sh b/dis/gen.sh
index 5a4c4aeb..6c52e901 100644
--- a/dis/gen.sh
+++ b/dis/gen.sh
@@ -35,7 +35,18 @@ JUGGLER_FILE_NAME_TAG="dis"
 ## =============================================================================
 ## Step 1: Dummy event generator
 ## TODO better file name that encodes the actual configuration we're running
-root -b -q "dis/generator/gen_central_electrons.cxx(${JUGGLER_N_EVENTS}, \".local/${JUGGLER_FILE_NAME_TAG}.hepmc\")"
+
+g++ dis/src/pythia_dis.cc -o pythia_dis  \
+   -I/usr/local/include  \
+   -O2 -std=c++11 -pedantic -W -Wall -Wshadow -fPIC  \
+   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lpythia8 -ldl \
+   -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lHepMC3
+if [[ "$?" -ne "0" ]] ; then
+  echo "ERROR compiling pythia"
+  exit 1
+fi
+
+./pythia_dis
 if [[ "$?" -ne "0" ]] ; then
   echo "ERROR running script"
   exit 1
-- 
GitLab