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

Last change on this file since 17284 was 17195, checked in by tbretz, 11 years ago
Removed some output to allow the use in a cron job without getting flooded by emails; added the start date to the output.
  • Property svn:executable set to *
File size: 609 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="date; ROOT_HIST=0 ${ROOTSYS}/bin/root -b -q -l ${macro}+\(\\\"${infile}\\\",\\\"${outfile}\\\"\)"
24
25 cd ~/Mars
26
27 echo "echo ${cmd}; ${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.