source: trunk/Mars/fact/analysis/gain/fit.sh@ 17371

Last change on this file since 17371 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
3inpath=$PWD/$1
4outpath=${inpath}/fit
5macro=${PWD}/fit_spectra.C
6
7mkdir -p $outpath
8cp ${macro} ${outpath}
9
10files_out=`ls -1r ${inpath} | grep \.root`
11files_fit=`ls -1r ${outpath} | grep \.root`
12
13for file in $files_out
14do
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
30done
31
Note: See TracBrowser for help on using the repository browser.