-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_boss_ana.sh
executable file
·39 lines (30 loc) · 1.03 KB
/
run_boss_ana.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
sleep 5s
if [ -z ${dump_job_options+x} ]; then
tmp_outdir=`mktemp -d --tmpdir=/localscratch/${SLURM_JOB_ID}/`
else
tmp_outdir=$(dirname "${ana_job_option_template_path}")
fi
JOBID=${SLURM_ARRAY_TASK_ID}
analysis_filename="${tmp_outdir}/${analysis_filename_base}-${JOBID}.root"
# Create the reconstruction card
ana_job_option_filename="ana_$JOBID.txt"
jobopt="${tmp_outdir}/${ana_job_option_filename}"
input_data_files=`cat ${reco_chunk_file_path} | sed -n "s/^\s*$JOBID\s*:\s*{\(.*\)}\s*$/\1/p" | sed -e "s/\s*,\s*/,\n/g"`
template=`cat ${ana_job_option_template_path}`
cat << EOT > $jobopt
$template
EventCnvSvc.digiRootInputFile = {${input_data_files}
};
NTupleSvc.Output = {
"FILE88 DATAFILE='${analysis_filename}' OPT='NEW' TYP='ROOT'"};
EOT
echo "using job options file: $jobopt"
cat $jobopt
if [ -z ${dump_job_options+x} ]; then
echo "using boss: ${application_path}"
time ${application_path} $jobopt
mv ${analysis_filename} ${output_dir}/.
rm -rf ${tmp_outdir}
fi
exit 0