Newer
Older
TB_Chris / Kepler / Scripts / .svn / text-base / DaemonScript.sh.svn-base
  1. #!/bin/bash
  2. . /etc/bashrc
  3.  
  4. shopt -s expand_aliases
  5.  
  6. EOS_PATH=/eos/lhcb/testbeam/velo/timepix3/Nov2015/
  7. EOS_CMD=/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select
  8. KEPLER=/afs/cern.ch/user/t/tevans/cmtuser/KEPLER/KEPLER_v3r0/Tb/Kepler/Scripts/Kepler
  9. OPT_PATH=/afs/cern.ch/user/t/tevans/cmtuser/KEPLER/KEPLER_v3r0/Tb/Kepler/options/
  10. OutputFolder=$EOS_PATH/RootFiles/Run$1/
  11. hist=$(pwd)/Kepler-histos.root
  12. tree=$(pwd)/Kepler-tuple.root
  13.  
  14. if [ -n "$2" ] ; then
  15. echo "Running alignment of run $1 ($2)"
  16. AlignmentFile=eos/lhcb/user/t/tevans/Alignment/Nov2015/Default_$2.dat
  17. $KEPLER $1 -a $AlignmentFile -o $OPT_PATH/align.py -h $hist -t $tree | tee Alignment_Run$1.std.out
  18. $EOS_CMD cp $(pwd)/Alignment_out.dat $EOS_PATH/RootFiles/Run$1/Conditions/Alignment$1mille.dat
  19. $EOS_CMD cp $(pwd)/Alignment_Run$1.std.out $EOS_PATH/RootFiles/Run$1/Output/Alignment_Run$1.std.out
  20. fi
  21.  
  22. $KEPLER $1 -o $OPT_PATH/tuple.py -h $hist -t $tree | tee Batch_Run$1.std.out
  23.  
  24. $EOS_CMD cp $(pwd)/Batch_Run$1.std.out $OutputFolder/Output/Batch_Run$1.std.out
  25. $EOS_CMD cp $(pwd)/Kepler-histos.root $OutputFolder/Output/Kepler-histos.root
  26. $EOS_CMD cp $(pwd)/Kepler-tuple.root $OutputFolder/Output/Kepler-tuple.root
  27.