Last change
on this file since 17326 was 17326, checked in by tbretz, 11 years ago |
Added code to extract hv-patch wise temperatures from aux files.
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 |
|
---|
3 | macro=$PWD/extract_temp.C
|
---|
4 | outpath=$PWD/temp
|
---|
5 |
|
---|
6 | mkdir -p $outpath
|
---|
7 | cp ${macro} ${outpath}
|
---|
8 |
|
---|
9 | where="(((fNumPedestalTrigger=3000 OR fNumPedestalTrigger=5000) AND fRunTypeKey=2) OR (fNumPedestalTrigger=10000 AND fRunTypeKey=3) OR fRunTypeKey=17)"
|
---|
10 | wheredrs="(drs.fROI=single.fROI AND fDrsStep=2)"
|
---|
11 |
|
---|
12 | query="SELECT Concat(fNight, '_', fRunID, '_', (SELECT fRunID FROM RunInfo \`drs\` WHERE drs.fNight=single.fNight AND "$wheredrs" AND single.fRunID<30+drs.fRunID ORDER BY ABS(CAST(single.fRunID AS SIGNED) - CAST(drs.fRunID AS SIGNED)) ASC LIMIT 0,1)) AS num "
|
---|
13 | query=$query" FROM RunInfo \`single\` WHERE "$where
|
---|
14 |
|
---|
15 | runpairs=( `mysql -u factread --password=r3adfac! --host=lp-fact factdata -s -e "$query"` )
|
---|
16 |
|
---|
17 | for runpair in ${runpairs[@]}
|
---|
18 | do
|
---|
19 | if [ $runpair = 'NULL' ]
|
---|
20 | then
|
---|
21 | continue
|
---|
22 | fi
|
---|
23 |
|
---|
24 | night=`echo $runpair | cut -d_ -f1`
|
---|
25 | runnum=`printf %03d $run`
|
---|
26 |
|
---|
27 | log=$outpath"/"$night"_"$runnum
|
---|
28 |
|
---|
29 | outfile=$outpath/${runnum}_${runnum}.root
|
---|
30 |
|
---|
31 | if [ -e $outfile ]
|
---|
32 | then
|
---|
33 | continue
|
---|
34 | fi
|
---|
35 |
|
---|
36 | cd ~/Mars
|
---|
37 |
|
---|
38 | cmd="ROOT_HIST=0 ${ROOTSYS}/bin/root -q -b -l ${macro}+\($night,$runnum,\\\"${outfile}\\\"\)"
|
---|
39 |
|
---|
40 | echo "date; echo '${cmd}'; ${cmd}" | qsub -N t${night}${runnum} -q test -cwd -e ${log}".err" -o ${log}".log"
|
---|
41 |
|
---|
42 | cd - > /dev/null
|
---|
43 | done
|
---|
44 |
|
---|
45 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.