Skip to content

Commit

Permalink
small enhancement in robustness of jana config files
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Britton committed Apr 19, 2017
1 parent b5596c6 commit 55df412
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
13 changes: 10 additions & 3 deletions MCwrapper/MakeMC.csh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ if ( "$BKGFOLDSTR" == "DEFAULT" ) then
endif
endif


set recon_pre=`echo $CUSTOM_PLUGINS | cut -c1-4`
set jana_config_file=`echo $CUSTOM_PLUGINS | sed -r 's/^.{5}//'`

if ( -f $jana_config_file ) then
cp $jana_config_file ./jana_config.cfg
endif

set gen_pre=""

if ( "$GENR" != "0" ) then
Expand Down Expand Up @@ -372,12 +380,11 @@ if ( "$GENR" != "0" ) then
if ( "$RECON" != "0" ) then
echo "RUNNING RECONSTRUCTION"

set recon_pre=`echo $CUSTOM_PLUGINS | cut -c1-4`


if ( "$recon_pre" == "file" ) then
set jana_config_file=`echo $CUSTOM_PLUGINS | sed -r 's/^.{5}//'`
echo "using config file: "$jana_config_file
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' --config=$jana_config_file -PNTHREADS=$NUMTHREADS
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' --config=jana_config.cfg -PNTHREADS=$NUMTHREADS
else
set pluginlist=("danarest" "monitoring_hists")

Expand Down
14 changes: 10 additions & 4 deletions MCwrapper/MakeMC.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ if [[ "$BKGFOLDSTR" == "DEFAULT" ]]; then
fi
fi


recon_pre=`echo $CUSTOM_PLUGINS | cut -c1-4`
jana_config_file=`echo $CUSTOM_PLUGINS | sed -r 's/^.{5}//'`

if [[ -f $jana_config_file ]]; then
echo "gathering jana config file"
cp $jana_config_file ./jana_config.cfg
fi

gen_pre=""

if [[ "$GENR" != "0" ]]; then
Expand Down Expand Up @@ -371,13 +380,10 @@ if [[ "$GENR" != "0" ]]; then

if [[ "$RECON" != "0" ]]; then
echo "RUNNING RECONSTRUCTION"

recon_pre=`echo $CUSTOM_PLUGINS | cut -c1-4`

if [[ "$recon_pre" == "file" ]]; then
jana_config_file=`echo $CUSTOM_PLUGINS | sed -r 's/^.{5}//'`
echo "using config file: "$jana_config_file
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' --config=$jana_config_file -PNTHREADS=$NUMTHREADS
hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' --config=jana_config.cfg -PNTHREADS=$NUMTHREADS
else

declare -a pluginlist=("danarest" "monitoring_hists")
Expand Down
Empty file modified MCwrapper/examples/MC.config
100644 → 100755
Empty file.

0 comments on commit 55df412

Please sign in to comment.