2 # Simple shell script used as 'Executable' with HTCondor batch submission scripts.
3 # Configures GENIE, cd's to the job directory and executes the input GENIE commands.
6 # ./htcondor_exec.sh [/path/genie_setup_script] [/job/dir] [executable --argument1 --argument2 ...] [another_executable --argument1 --argument2 ...] ...
8 # C.Andreopoulos <constantinos.andreopoulos \at cern.ch>
13 #echo "Number of arguments: ${#@}"
16 # first two arguments are the setup script and the job directory
22 echo "htcondor_exec.sh / GENIE setup script: $genie_setup"
23 echo "htcondor_exec.sh / Job directory: $jobs_dir"
32 # remaining arguments are genie executables and their arguments
35 # Known commands to look
54 #echo "Number of known commands: ${#known_exec[@]}"
66 # loop over known GENIE commands
67 for y in ${known_exec[@]}
69 # current argument is a known GENIE command
73 if [ "$do_run" -eq 1 ]
75 echo "htcondor_exec.sh / Executing: ${genie_command} ${genie_args}"
76 ${genie_command} ${genie_args}
87 if [ "$new_command" -eq 1 ]
92 genie_args="${genie_args} $x";
95 echo "htcondor_exec.sh / Executing: ${genie_command} ${genie_args}"
96 ${genie_command} ${genie_args}