diff --git a/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi.sh b/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi.sh index f53a5632ccd808572f9c2eb01587547a97c689aa..21ac59fbd1f7d717abc307a31216b9b402b43f76 100755 --- a/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi.sh +++ b/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi.sh @@ -102,7 +102,8 @@ output_directory="$working_directory/$run_number" mkdir -p "$output_directory" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/$file_stem.log" +logfile="${file_stem}.rdo.log" +exec >& "${output_directory}/${logfile}" echo `date` - $HOSTNAME echo "File: $file_name" echo "Release: $release_directory" @@ -193,14 +194,14 @@ if ! [ -z "$logdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $logdest" + echo "copy $logfile to $logdest" mkdir -p $logdest - eos cp "${config_file_stem}-${seg_str}.log" $logdest + eos cp $logfile $logdest elif ! [ -z "$outdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $outdest" + echo "copy $logfile to $outdest" mkdir -p $outdest - eos cp "${config_file_stem}-${seg_str}.log" $outdest + eos cp $logfile $outdest fi diff --git a/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi_merge.sh b/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi_merge.sh index 08487ea23720463c2c0eb96959b270d8954bb7a5..e5d45909651a8f02805dc5a29c9b7c16a531c57b 100755 --- a/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi_merge.sh +++ b/Control/CalypsoExample/Digitization/scripts/submit_faserMDC_digi_merge.sh @@ -123,7 +123,8 @@ mkdir -p "$output_directory" file_stem="$faser-$short-$run_number-RDO-merge-$slice" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/$file_stem.log" +logfile="${file_stem}.rdo.log" +exec >& "$output_directory/$logfile" echo `date` - $HOSTNAME echo "Directory: $dir_path" echo "Slice: $slice" @@ -216,14 +217,14 @@ if ! [ -z "$logdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $logdest" + echo "copy $logfile to $logdest" mkdir -p $logdest - eos cp "${config_file_stem}-${seg_str}.log" $logdest + eos cp $logfile $logdest elif ! [ -z "$outdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $outdest" + echo "copy $logfile to $outdest" mkdir -p $outdest - eos cp "${config_file_stem}-${seg_str}.log" $outdest + eos cp $logfile $outdest fi diff --git a/Control/CalypsoExample/Generation/scripts/submit_faserMDC_foresee.sh b/Control/CalypsoExample/Generation/scripts/submit_faserMDC_foresee.sh index 0629fe570c45f9da99cbd41c6c86c728eab31c92..723ffb6d50b0243878b261639cc1bab461b7da97 100755 --- a/Control/CalypsoExample/Generation/scripts/submit_faserMDC_foresee.sh +++ b/Control/CalypsoExample/Generation/scripts/submit_faserMDC_foresee.sh @@ -119,7 +119,8 @@ fi mkdir -p "$output_directory" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/${config_file_stem}-${seg_str}.log" +logfile="${config_file_stem}-${seg_str}.gen.log" +exec >& "$output_directory/${logfile}" echo `date` - $HOSTNAME echo "File: $config_file" echo "Segment: $seg_str" @@ -209,14 +210,14 @@ if ! [ -z "$logdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $logdest" + echo "copy $logfile to $logdest" mkdir -p $logdest - eos cp "${config_file_stem}-${seg_str}.log" $logdest + eos cp $logfile $logdest elif ! [ -z "$outdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $outdest" + echo "copy $logffile to $outdest" mkdir -p $outdest - eos cp "${config_file_stem}-${seg_str}.log" $outdest + eos cp $logfile $outdest fi diff --git a/Control/CalypsoExample/Generation/scripts/submit_faserMDC_particlegun.sh b/Control/CalypsoExample/Generation/scripts/submit_faserMDC_particlegun.sh index f7d205ec13b140c77d4c3dbe55c44b8c03f22917..729d75c751e33146a2af334315392d3b16692106 100755 --- a/Control/CalypsoExample/Generation/scripts/submit_faserMDC_particlegun.sh +++ b/Control/CalypsoExample/Generation/scripts/submit_faserMDC_particlegun.sh @@ -117,7 +117,8 @@ fi mkdir -p "$output_directory" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/${config_file_stem}-${seg_str}.log" +logfile="${config_file_stem}-${seg_str}.gen.log" +exec >& "$output_directory/${logfile}" echo `date` - $HOSTNAME echo "File: $config_file" echo "Segment: $seg_str" @@ -207,14 +208,14 @@ if ! [ -z "$logdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $logdest" + echo "copy $logfile to $logdest" mkdir -p $logdest - eos cp "${config_file_stem}-${seg_str}.log" $logdest + eos cp $logfile $logdest elif ! [ -z "$outdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $outdest" + echo "copy $logfile to $outdest" mkdir -p $outdest - eos cp "${config_file_stem}-${seg_str}.log" $outdest + eos cp $logfile $outdest fi diff --git a/Control/CalypsoExample/Reconstruction/scripts/submit_faserMDC_reco.sh b/Control/CalypsoExample/Reconstruction/scripts/submit_faserMDC_reco.sh index 9cba705f55786a40c027c33b68a7584568050f63..819cfeb49014f33f1bde93fdd53b22c2b075e795 100755 --- a/Control/CalypsoExample/Reconstruction/scripts/submit_faserMDC_reco.sh +++ b/Control/CalypsoExample/Reconstruction/scripts/submit_faserMDC_reco.sh @@ -102,7 +102,8 @@ output_directory="$working_directory/${run_number}" mkdir -p "$output_directory" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/$file_stem.log" +logfile="${file_stem}.rec.log" +exec >& "$output_directory/${logfile}" echo `date` - $HOSTNAME echo "File: $file_name" echo "Release: $release_directory" @@ -182,14 +183,14 @@ if ! [ -z "$logdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $logdest" + echo "copy $logfile to $logdest" mkdir -p $logdest - eos cp "${config_file_stem}-${seg_str}.log" $logdest + eos cp $logfile $logdest elif ! [ -z "$outdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $outdest" + echo "copy $logfile to $outdest" mkdir -p $outdest - eos cp "${config_file_stem}-${seg_str}.log" $outdest + eos cp $logfile\ $outdest fi diff --git a/Control/CalypsoExample/Reconstruction/scripts/submit_faser_reco.sh b/Control/CalypsoExample/Reconstruction/scripts/submit_faser_reco.sh index 277d6eaa79a3bc510cb413aa742b292837e28403..e6f4fff1bd6874c14b741eb3835c2bbd538c4660 100755 --- a/Control/CalypsoExample/Reconstruction/scripts/submit_faser_reco.sh +++ b/Control/CalypsoExample/Reconstruction/scripts/submit_faser_reco.sh @@ -4,6 +4,10 @@ # Usage: # submit_faser_reco.sh file_path [release_directory] [working_directory] [nevents] # +# Options: +# --out - specify output location (in EOS) to copy output HITS file +# --log - specify output location (in EOS) for log file +# # file_path - full file name (with path) # release_directory - optional path to release install directory (default pwd) # working_directory - optional path to output directory location (default pwd) @@ -16,8 +20,36 @@ # If this matches reco/r???? it will be passed to the reco job # #---------------------------------------- +# Keep track of time +SECONDS=0 # # Parse command-line options +while [ -n "$1" ] +do + case "$1" in + -l | --log) + logdest="$2"; + shift; + shift;; # Must eat 2 options here + + -o | --out) + outdest="$2"; + shift; + shift;; + + --) # End of options + shift; # Eat this + break;; # And stop parsing + + -*) + echo "Unknown option $1" + shift;; + + *) break;; # Not an option, don't shift + esac +done +# +# Parse command-line arguments file_path=${1} release_directory=${2} working_directory=${3} @@ -70,7 +102,8 @@ output_directory="$working_directory/Run-$run_number" mkdir -p "$output_directory" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/$file_stem.log" +logfile="${file_stem}.rec.log" +exec >& "$output_directory/$logfile" echo `date` - $HOSTNAME echo "File: $file_name" echo "Release: $release_directory" @@ -85,12 +118,12 @@ source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh # Always go back to the starting directory in case paths are relative cd "$starting_directory" cd "$release_directory" -asetup -source build/x8*/setup.sh +#asetup +#source build/x8*/setup.sh # # Do this by hand -# asetup --input="$release_directory/calypso/asetup.faser" Athena,22.0.49 -# source "$release_directory/build/x8*/setup.sh" +asetup --input=calypso/asetup.faser Athena,22.0.49 +source build/x86*/setup.sh # # # Try to find a release tag @@ -102,7 +135,7 @@ if [[ "$recotag" == "reco/r"???? ]]; then fi if [[ "$recotag" == "reco/p"???? ]]; then tag=`echo "$recotag" | cut -c 6-11` - echo "Found reco tag: $tag" + echo "Found proc tag: $tag" fi # # Move to the run directory @@ -132,3 +165,32 @@ fi # # Print out ending time date +echo "Job finished after $SECONDS seconds" +# +# Copy output to EOS if desired +export EOS_MGM_URL=root://eospublic.cern.ch +# +if ! [ -z "$outdest" ] +then + ls -l + echo "copy *-RDO.root to $outdest" + mkdir -p $outdest + eos cp *-xAOD.root $outdest +fi +# +# Also copy log file +if ! [ -z "$logdest" ] +then + cd .. + ls -l + echo "copy $logfile to $logdest" + mkdir -p $logdest + eos cp $logfile $logdest +elif ! [ -z "$outdest" ] +then + cd .. + ls -l + echo "copy $logfile to $outdest" + mkdir -p $outdest + eos cp $logfile\ $outdest +fi diff --git a/Control/CalypsoExample/Simulation/scripts/submit_faserMDC_simulate.sh b/Control/CalypsoExample/Simulation/scripts/submit_faserMDC_simulate.sh index d16a804652b448bc003b6d34756ffe1856588d95..bedbb59174d22cb1e263d79be03670d8bba097a1 100755 --- a/Control/CalypsoExample/Simulation/scripts/submit_faserMDC_simulate.sh +++ b/Control/CalypsoExample/Simulation/scripts/submit_faserMDC_simulate.sh @@ -133,7 +133,8 @@ fi mkdir -p "$output_directory" # # This magic redirects everything in this script to our log file -exec >& "$output_directory/${file_stem}.log" +logfile=${file_stem}.sim.log +exec >& "$output_directory/$logfile" echo `date` - $HOSTNAME echo "Input File: $infile" echo "Output File: $outfilename" @@ -206,15 +207,15 @@ if ! [ -z "$logdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $logdest" + echo "copy $logfile to $logdest" mkdir -p $logdest - eos cp "${config_file_stem}-${seg_str}.log" $logdest + eos cp $logfile $logdest elif ! [ -z "$outdest" ] then cd .. ls -l - echo "copy ${config_file_stem}-${seg_str}.log to $outdest" + echo "copy $logfile to $outdest" mkdir -p $outdest - eos cp "${config_file_stem}-${seg_str}.log" $outdest + eos cp $logfile $outdest fi