Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:22

0001 #!/usr/bin/env bash
0002 #
0003 # run_qcal.sh <fname>
0004 # do charge fits to get timing offset calibrations
0005 # <fname> is the name of the uncalibrated mbd dst file
0006 #
0007 
0008 # Check that user specifies a file
0009 if [[ $# -lt 1 ]]
0010 then
0011   echo "Usage: run_qcal.sh <fname>"
0012   exit -1
0013 fi
0014 
0015 mbd_uncalrootf=$1    # DigSig ROOT filename
0016 
0017 nevt=0
0018 if [[ $# -gt 1 ]]
0019 then
0020   nevt=$2
0021   echo Processing $2 events
0022 fi
0023 
0024 echo PATH=$PATH
0025 echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH
0026 
0027 # now run calibrations
0028 qcalib_events=0
0029 if [[ $nevt -ne 0 ]]
0030 then
0031   qcalib_events=${nevt}
0032 fi
0033 
0034 # if not interactive, run ROOT in batch mode
0035 if [ ! -z $PS1 ]
0036 then
0037   BATCH=-b
0038 fi
0039 
0040 pass=3
0041 #runtype=1 # pp200
0042 runtype=0 # auau200
0043 echo root.exe $BATCH -q cal_mbd.C\(\"${mbd_uncalrootf}\",${pass},${qcalib_events},${runtype}\)
0044 root.exe $BATCH -q cal_mbd.C\(\"${mbd_uncalrootf}\",${pass},${qcalib_events},${runtype}\)  # time calibrations
0045