Changeset 17327


Ignore:
Timestamp:
11/21/13 12:40:41 (11 years ago)
Author:
tbretz
Message:
Updated query to account for new sql version
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/fact/analysis/gain/runanalysis.sh

    r17322 r17327  
    99cp ${macro} ${outpath}
    1010
    11 where="(((fNumPedestalTrigger=3000 OR fNumPedestalTrigger=5000) AND fRunTypeKEY=2) OR (fNumPedestalTrigger=10000 AND fRunTypeKEY=3) OR fRunTypeKEY=17)"
     11where="(((fNumPedestalTrigger=3000 OR fNumPedestalTrigger=5000) AND fRunTypeKey=2) OR (fNumPedestalTrigger=10000 AND fRunTypeKey=3) OR fRunTypeKey=17)"
    1212wheredrs="(drs.fROI=single.fROI AND fDrsStep=2)"
    1313
    14 query="SELECT Concat(fNight, '_', fRunId, '_', (SELECT fRunId FROM RunInfo \`drs\` WHERE drs.fNight=single.fNight AND "$wheredrs" AND (single.fRunId-drs.fRunId)<30 limit 0,1)) AS num "
     14query="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 "
    1515query=$query" FROM RunInfo \`single\` WHERE "$where
    1616
     
    3535   drsnum=`printf %03d $drs`
    3636
    37    path="/fact/raw/"$year"/"$month"/"$day
    38    runfile=$path"/"$night"_"
    39    drsfile=$path"/"$night"_"$drsnum.drs.fits.gz
     37   #runpath="/archive/fact/fails/raw/"$year"/"$month"/"$day
     38   #drspath="/fact/raw/"$year"/"$month"/"$day
     39
     40   runpath="/fact/raw/"$year"/"$month"/"$day
     41   drspath="/fact/raw/"$year"/"$month"/"$day
     42
     43   runfile=$runpath"/"$night"_"
     44   drsfile=$drspath"/"$night"_"$drsnum.drs.fits.gz
    4045   log=$outpath"/"$night"_"$runnum
    4146
Note: See TracChangeset for help on using the changeset viewer.