From c54b5b76587561f1a6a458f0efe7007b02d54453 Mon Sep 17 00:00:00 2001 From: tbritton Date: Fri, 21 Apr 2017 10:53:30 -0400 Subject: [PATCH] better output structure --- MCwrapper/MakeMC.csh | 13 +++++++++++-- MCwrapper/MakeMC.sh | 10 +++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/MCwrapper/MakeMC.csh b/MCwrapper/MakeMC.csh index 6fc69073..074e26d4 100755 --- a/MCwrapper/MakeMC.csh +++ b/MCwrapper/MakeMC.csh @@ -150,6 +150,12 @@ endif if ( ! -d "$OUTDIR/configurations/" ) then mkdir $OUTDIR/configurations/ endif +if ( ! -d "$OUTDIR/configurations/generation/" ) then + mkdir $OUTDIR/configurations/generation/ +endif +if ( ! -d "$OUTDIR/configurations/geant/" ) then + mkdir $OUTDIR/configurations/geant/ +endif if ( ! -d "$OUTDIR/hddm/" ) then mkdir $OUTDIR/hddm/ endif @@ -351,6 +357,8 @@ if ( "$GENR" != "0" ) then sed -i 's/TEMPMINE/0.0012/' control'_'$formatted_runNumber'_'$formatted_fileNumber.in endif + cp $PWD/control'_'$formatted_runNumber'_'$formatted_fileNumber.in $OUTDIR/configurations/geant/ + mv $PWD/control'_'$formatted_runNumber'_'$formatted_fileNumber.in $PWD/control.in if ( "$GEANTVER" == "3" ) then @@ -401,6 +409,7 @@ if ( "$GENR" != "0" ) then if ( "$recon_pre" == "file" ) then echo "using config file: "$jana_config_file hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' --config=jana_config.cfg -PNTHREADS=$NUMTHREADS + rm jana_config.cfg else set pluginlist=("danarest" "monitoring_hists") @@ -450,7 +459,7 @@ if ( "$GENR" != "0" ) then set filename_root=`echo $rootfile | sed -r 's/.{5}$//'` set filetomv="$rootfile" set filecheck=`echo $current_files | grep -c $filetomv` - + if ( "$filecheck" == "0" ) then mv $filetomv $filename_root\_$STANDARD_NAME.root mv $PWD/$filename_root\_$STANDARD_NAME.root $OUTDIR/root/ @@ -464,7 +473,7 @@ if ( "$GENR" != "0" ) then endif if ( "$gen_pre" != "file" ) then - mv $PWD/*.conf $OUTDIR/configurations/ + mv $PWD/*.conf $OUTDIR/configurations/generation/ endif set hddmfiles=`ls | grep .hddm` diff --git a/MCwrapper/MakeMC.sh b/MCwrapper/MakeMC.sh index 348a4425..2cae0dfb 100755 --- a/MCwrapper/MakeMC.sh +++ b/MCwrapper/MakeMC.sh @@ -150,6 +150,12 @@ fi if [[ ! -d "$OUTDIR/configurations/" ]]; then mkdir $OUTDIR/configurations/ fi +if [[ ! -d "$OUTDIR/configurations/generation/" ]]; then + mkdir $OUTDIR/configurations/generation/ +fi +if [[ ! -d "$OUTDIR/configurations/geant/" ]]; then + mkdir $OUTDIR/configurations/geant/ +fi if [[ ! -d "$OUTDIR/hddm/" ]]; then mkdir $OUTDIR/hddm/ fi @@ -354,6 +360,7 @@ if [[ "$GENR" != "0" ]]; then sed -i 's/TEMPMINE/0.0012/' control'_'$formatted_runNumber'_'$formatted_fileNumber.in fi + cp $PWD/control'_'$formatted_runNumber'_'$formatted_fileNumber.in $OUTDIR/configurations/geant/ mv $PWD/control'_'$formatted_runNumber'_'$formatted_fileNumber.in $PWD/control.in if [[ "$GEANTVER" == "3" ]]; then @@ -405,6 +412,7 @@ if [[ "$GENR" != "0" ]]; then if [[ "$recon_pre" == "file" ]]; then echo "using config file: "$jana_config_file hd_root ./$STANDARD_NAME'_geant'$GEANTVER'_smeared.hddm' --config=jana_config.cfg -PNTHREADS=$NUMTHREADS + rm jana_config.cfg else declare -a pluginlist=("danarest" "monitoring_hists") @@ -469,7 +477,7 @@ if [[ "$GENR" != "0" ]]; then fi fi if [[ "$gen_pre" != "file" ]]; then - mv $PWD/*.conf $OUTDIR/configurations/ + mv $PWD/*.conf $OUTDIR/configurations/generation/ fi hddmfiles=$(ls | grep .hddm) if [[ "$hddmfiles" != "" ]]; then