#!/bin/tcsh

setenv temp \"$1\"
setenv store \"$2\"

if ($#argv != 2 ) then
    echo e.g.:  ReFitResol.csh path store
    exit 1 
endif
 
# correcting east
root -l -q "ReFitResol.C($temp, $store, 0)"
cp $1/files/$2_PmtRes-calib_e.txt $1/files/$2_PmtRes-calib_e_old.txt
mv $1/files/temp_resol.txt $1/files/$2_PmtRes-calib_e.txt
 
# correcting west
root -l -q "ReFitResol.C($temp, $store, 1)"
cp $1/files/$2_PmtRes-calib_w.txt $1/files/$2_PmtRes-calib_w_old.txt
mv $1/files/temp_resol.txt $1/files/$2_PmtRes-calib_w.txt
 


