Warning, /macros/calibrations/mbd/SLEW/make_dst_uncal_noslew.cmd is written in an unsupported language. File is not indexed.
0001 #!/usr/bin/env bash
0002 #
0003 # usage:
0004 # calmbd.sh <prdf or dst or list> <nevts> <nskip>
0005
0006 infile=$1
0007 echo "input file " $infile
0008
0009 nevt=0
0010 nskip=0
0011 if [[ $# -gt 1 ]]
0012 then
0013 nevts=$2
0014 echo $nevts
0015 fi
0016 if [[ $# -gt 2 ]]
0017 then
0018 nskip=$3
0019 echo skipping $nskip
0020 fi
0021
0022 # get run number
0023 run=""
0024 if [[ "$infile" =~ prdf$ || "$infile" =~ root$ ]]
0025 then
0026 run=${infile##*/}
0027 run=${run%-*}
0028 run=${run#*-}
0029 run=$((10#$run))
0030 elif [[ "$infile" =~ list$ ]]
0031 then
0032 run=${infile##*/}
0033 run=${run%.list}
0034 nevt=2000000
0035 fi
0036
0037 dir=${run}/${infile##*/}
0038 dir=${dir%.*}
0039 mkdir -p $dir
0040 cd $dir
0041 ln -sf ../../run_mbdcalpass.sh .
0042 ln -sf ../../Fun4All_MBD_CalPass.C .
0043
0044 echo processing run $run in directory $dir
0045
0046 # Set PASS0DIR to bypass default in CDB calibrations
0047 #export PASS0DIR=/sphenix/user/chiu/sphenix_bbc/CDB/PASS0/
0048 #echo "Setting PASS0DIR to $PASS0DIR"
0049
0050 # do the pass1 calibrations (only 20K events)
0051 echo run_mbdcalpass.sh $infile 1
0052 run_mbdcalpass.sh $infile 1
0053
0054 # process waveforms, output a DST_UNCALMBD
0055 # here time is in ns and charge in adc
0056 echo run_mbdcalpass.sh $infile 2 $nevts $nskip
0057 run_mbdcalpass.sh $infile 2 $nevts $nskip
0058