Last change
on this file since 17667 was 17321, checked in by tbretz, 11 years ago |
Fixed a bug which caused the macro to be executed twice.
|
-
Property svn:executable
set to
*
|
File size:
611 bytes
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | inpath=$PWD/$1
|
---|
4 | outpath=${inpath}/fit
|
---|
5 | macro=${PWD}/fit_spectra.C
|
---|
6 |
|
---|
7 | mkdir -p $outpath
|
---|
8 | cp ${macro} ${outpath}
|
---|
9 |
|
---|
10 | files_out=`ls -1r ${inpath} | grep \.root`
|
---|
11 | files_fit=`ls -1r ${outpath} | grep \.root`
|
---|
12 |
|
---|
13 | for file in $files_out
|
---|
14 | do
|
---|
15 | infile=$inpath"/"${file}
|
---|
16 | outfile=${outpath}"/"${file}
|
---|
17 |
|
---|
18 | if [ -e $outfile ]
|
---|
19 | then
|
---|
20 | continue
|
---|
21 | fi
|
---|
22 |
|
---|
23 | cmd="ROOT_HIST=0 ${ROOTSYS}/bin/root -b -q -l ${macro}+\(\\\"${infile}\\\",\\\"${outfile}\\\"\)"
|
---|
24 |
|
---|
25 | cd ~/Mars
|
---|
26 |
|
---|
27 | echo "echo '${cmd}'; date; ${cmd}" | qsub -N f${file} -q test -cwd -e ${outfile}".err" -o ${outfile}".log"
|
---|
28 |
|
---|
29 | cd - > /dev/null
|
---|
30 | done
|
---|
31 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.