Skip to content
Snippets Groups Projects
Commit 096efe86 authored by Eric Torrence's avatar Eric Torrence
Browse files

Merge branch 'recodev' into 'master'

Reco scripts

See merge request faser/calypso!165
parents f1a61422 66fb4072
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,12 @@
# Used with a condor file to submit to vanilla universe
#
# Usage:
# submit_faser_reco.sh file_path [release_directory] [working_directory]
# submit_faser_reco.sh file_path [release_directory] [working_directory] [nevents]
#
# 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)
# nevents - optional number of events to process (default: -1 - all)
#
# The release directory must already be set up
# (so an unqualified asetup can set up the release properly)
......@@ -20,6 +21,7 @@
file_path=${1}
release_directory=${2}
working_directory=${3}
nevents=${4}
#
# Set defaults if arguments aren't provided
if [ -z "$file_path" ]
......@@ -37,6 +39,12 @@ if [ -z "$working_directory" ]
then
working_directory=`pwd`
fi
#
if [ -z "$nevents" ]
then
nevents="-1"
fi
#
starting_directory=`pwd`
#
# Now extract the run number and file stem
......@@ -71,7 +79,7 @@ echo "Starting: $starting_directory"
#
# Set up the release (do this automatically)?
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh
source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.sh
#
# Try automatic
# Always go back to the starting directory in case paths are relative
......@@ -98,21 +106,24 @@ cd "$starting_directory"
cd "$output_directory"
#
# Remove any previous directory if it exists
if [[ -e "$file_stem" ]]; then
echo "Remove previous directory $file_stem"
rm -rf "$file_stem"
fi
#if [[ -e "$file_stem" ]]; then
# echo "Remove previous directory $file_stem"
# rm -rf "$file_stem"
#fi
#
# Make run directory
mkdir "$file_stem"
if [[ -e "$file_stem" ]]; then
echo "Directory $file_stem already exists"
else
mkdir "$file_stem"
fi
cd "$file_stem"
#
# Run job
if [ -z "$rtag" ]
then
faser_reco.py "$file_path"
if [[ -z "$rtag" ]]; then
faser_reco.py "--nevents=$nevents" "$file_path"
else
faser_reco.py "--reco=$rtag" "$file_path"
faser_reco.py "--nevents=$nevents" "--reco=$rtag" "$file_path"
fi
#
# Print out ending time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment