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

Reco scripts

parent f1a61422
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
# Used with a condor file to submit to vanilla universe # Used with a condor file to submit to vanilla universe
# #
# Usage: # 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) # file_path - full file name (with path)
# release_directory - optional path to release install directory (default pwd) # release_directory - optional path to release install directory (default pwd)
# working_directory - optional path to output directory location (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 # The release directory must already be set up
# (so an unqualified asetup can set up the release properly) # (so an unqualified asetup can set up the release properly)
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
file_path=${1} file_path=${1}
release_directory=${2} release_directory=${2}
working_directory=${3} working_directory=${3}
nevents=${4}
# #
# Set defaults if arguments aren't provided # Set defaults if arguments aren't provided
if [ -z "$file_path" ] if [ -z "$file_path" ]
...@@ -37,6 +39,12 @@ if [ -z "$working_directory" ] ...@@ -37,6 +39,12 @@ if [ -z "$working_directory" ]
then then
working_directory=`pwd` working_directory=`pwd`
fi fi
#
if [ -z "$nevents" ]
then
nevents="-1"
fi
#
starting_directory=`pwd` starting_directory=`pwd`
# #
# Now extract the run number and file stem # Now extract the run number and file stem
...@@ -71,7 +79,7 @@ echo "Starting: $starting_directory" ...@@ -71,7 +79,7 @@ echo "Starting: $starting_directory"
# #
# Set up the release (do this automatically)? # Set up the release (do this automatically)?
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase 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 # Try automatic
# Always go back to the starting directory in case paths are relative # Always go back to the starting directory in case paths are relative
...@@ -98,21 +106,24 @@ cd "$starting_directory" ...@@ -98,21 +106,24 @@ cd "$starting_directory"
cd "$output_directory" cd "$output_directory"
# #
# Remove any previous directory if it exists # Remove any previous directory if it exists
if [[ -e "$file_stem" ]]; then #if [[ -e "$file_stem" ]]; then
echo "Remove previous directory $file_stem" # echo "Remove previous directory $file_stem"
rm -rf "$file_stem" # rm -rf "$file_stem"
fi #fi
# #
# Make run directory # 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" cd "$file_stem"
# #
# Run job # Run job
if [ -z "$rtag" ] if [[ -z "$rtag" ]]; then
then faser_reco.py "--nevents=$nevents" "$file_path"
faser_reco.py "$file_path"
else else
faser_reco.py "--reco=$rtag" "$file_path" faser_reco.py "--nevents=$nevents" "--reco=$rtag" "$file_path"
fi fi
# #
# Print out ending time # 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