Changeset 9225 for trunk/MagicSoft


Ignore:
Timestamp:
01/16/09 14:57:34 (16 years ago)
Author:
hoehne
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9224 r9225  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2009/01/16 Daniel Hoehne-Moench
     22
     23   * datacenter/scripts/mcsequences:
     24     - implemented sumtrigger -> modes, fTriggerFlagKEY
     25     - fPriority(MCSequenceProcessStatus) is now filled into the mcdb
     26
     27   * datacenter/scripts/fillmccallisto, fillmcstar:
     28     - bugfix: changed argument of $primaries from [$s+$s] to [$s]
     29
     30   * datacenter/macros/fillcamera.C:
     31     - changed NumPheFromDNSB to float(7,3)
     32     - fPriority(MCRunProcessStatus) is now filled into the mcdb
     33
     34   * datacenter/macros/fillmccalib.C:
     35     - minor changes, bugfix (wrong column name for mcdb)
     36
     37   * datacenter/macros/fillmcsignal.C:
     38     - definition of some parameters changed according to fillsignal.C
     39     - minor changes, deleted unnecessary code
     40     - implemented if clause for HiLo-Parameters. Instead of
     41       seqno<200000 the fAmplFadcKEY is queried in the mcdb for each
     42       sequence. For MUX MCs the HiLo-Parameters are not calculated.
     43
     44
    2045
    2146 2009/01/15 Thomas Bretz
  • trunk/MagicSoft/Mars/datacenter/macros/fillcamera.C

    r9216 r9225  
    235235    if (impact < 0)
    236236        imax = "NULL";
    237     TString numphe    = Form("%5.1f", runheader3->GetNumPheFromDNSB());
     237    TString numphe    = Form("%7.3f", runheader3->GetNumPheFromDNSB());
    238238    TString pmin      = Form("%5.1f", runheader3->GetShowerPhiMin());
    239239    TString pmax      = Form("%5.1f", runheader3->GetShowerPhiMax());
     
    600600                 "fReflectorVersionKEY=%d, fCameraVersionKEY=%d, "
    601601                 "fObservationModeKEY=%d, fMCParticleKEY=%d, "
    602                  "fSequenceFirst=0, fNumTriggers=%d, fNumSumTriggers=%d, fViewconeAngleInner=%5.2f, fViewconeAngleOuter=%5.2f, "
     602                 "fNumTriggers=%d, fNumSumTriggers=%d, fViewconeAngleInner=%5.2f, fViewconeAngleOuter=%5.2f, "
    603603                 "fAtmosphericModelKEY=%d, fAmplFadcKEY=%d, fAddSpotSizeKEY=%d, "
    604604                 "fPSFKEY=%d, fViewconeAngleOKEY=%d, fSpectrumKEY=%d, fTriggerFlagKEY=%d ",
     
    613613
    614614        TString vars2 =
    615             Form("fRunFilled=Now(), fFileName=\"%s\", fRunNumber=%d ",
    616                  fname.Data(), RunNum);
     615            Form("fRunFilled=Now(), fFileName=\"%s\", fRunNumber=%d, fPriority=%d ",
     616                 fname.Data(), RunNum, RunNum);
    617617
    618618
     
    670670                     "fReflectorVersionKEY=%d, fCameraVersionKEY=%d, "
    671671                     "fObservationModeKEY=%d, fMCParticleKEY=%d, "
    672                      "fSequenceFirst=0, fNumTriggers=%d, fNumSumTriggers=%d, fViewconeAngleInner=%5.2f, fViewconeAngleOuter=%5.2f, "
     672                     "fNumTriggers=%d, fNumSumTriggers=%d, fViewconeAngleInner=%5.2f, fViewconeAngleOuter=%5.2f, "
    673673                     "fAtmosphericModelKEY=%d, fAmplFadcKEY=%d, fAddSpotSizeKEY=%d, "
    674674                     "fPSFKEY=%d, fViewconeAngleOKEY=%d, fSpectrumKEY=%d, fTriggerFlagKEY=%d ",
     
    683683
    684684            TString vars2 =
    685                 Form("fRunFilled=Now(), fFileName=\"%s\", fRunNumber=%d ",
    686                      fname.Data(), RunNum);
     685                Form("fRunFilled=Now(), fFileName=\"%s\", fRunNumber=%d, fPriority=%d ",
     686                     fname.Data(), RunNum, RunNum);
    687687
    688688
  • trunk/MagicSoft/Mars/datacenter/macros/fillmccalib.C

    r9221 r9225  
    6161#include <iostream>
    6262
    63 #include <TEnv.h>
    6463#include <TRegexp.h>
    6564
     
    141140    if (!h)
    142141    {
    143         cout << "WARNING - Could not find histogram HRelTimeHiGainArea0." << endl;
     142        cout << "ERROR - Could not find histogram HRelTimeHiGainArea0." << endl;
    144143        return 2;
    145144    }
     
    152151    if (!h)
    153152    {
    154         cout << "WARNING - Could not find histogram HRelTimeHiGainArea1." << endl;
     153        cout << "ERROR - Could not find histogram HRelTimeHiGainArea1." << endl;
    155154        return 2;
    156155    }
     
    163162    if (!c)
    164163    {
    165         cout << "WARNING - Could not find MHCamera TotalConv." << endl;
     164        cout << "ERROR - Could not find MHCamera TotalConv." << endl;
    166165        return 2;
    167166    }
     
    264263             " fConvFactorInner=%s, "
    265264             " fConvFactorOuter=%s, "
    266              " fRatioCalEvents=%s, "
     265             " fRatioCalEvts=%s, "
    267266             " fRelChargeRmsInner=%s, "
    268267             " fRelChargeRmsOuter=%s, "
  • trunk/MagicSoft/Mars/datacenter/macros/fillmcsignal.C

    r9221 r9225  
    6060#include <iomanip>
    6161
    62 #include <TEnv.h>
    6362#include <TRegexp.h>
    6463
     
    6665#include <TGraph.h>
    6766#include <TSQLResult.h>
     67#include <TSQLRow.h>
    6868
    6969#include "MSQLServer.h"
     
    8989    }
    9090
    91     Float_t meanextpul = -1;
    92     Float_t rmsextpul  = -1;
     91    TString meanextpulpos("NULL");
     92    TString rmsextpulpos("NULL");
    9393
    9494    MCalibrationPulseTimeCam *pt;
     
    9696    if (pt)
    9797    {
    98         meanextpul = pt->GetAverageArea(0).GetHiGainMean();
    99         rmsextpul  = pt->GetAverageArea(0).GetHiGainRms();
    100 
    101         meanextpul = TMath::Nint(meanextpul*100)/100.;
    102         rmsextpul  = TMath::Nint(rmsextpul*100)/100.;
    103     }
     98        Double_t meanextpul = pt->GetAverageArea(0).GetHiGainMean();
     99        Double_t rmsextpul  = pt->GetAverageArea(0).GetHiGainRms();
     100
     101        if (meanextpul>=0 || rmsextpulpos>=0)
     102        {
     103            meanextpulpos.Form("%6.2f", meanextpul);
     104            rmsextpulpos.Form("%6.2f", rmsextpul);
     105        }
     106    }
     107
    104108
    105109    MStatusArray arr;
     
    113117    if (!cam)
    114118    {
    115         cout << "WARNING - Reading of PedRMS;avg failed." << endl;
     119        cout << "ERROR - Reading of PedRMS;avg failed." << endl;
    116120        return 2;
    117121    }
     
    121125    if (!pul)
    122126    {
    123         cout << "WARNING - Reading of PulsePos;avg failed." << endl;
     127        cout << "ERROR - Reading of PulsePos;avg failed." << endl;
    124128        return 2;
    125129    }
     
    136140        return 2;
    137141    }
    138 
    139     Double_t medoff;
    140     Double_t devoff;
    141 
    142     Double_t medcal;
    143     Double_t devcal;
    144142
    145143    TString medpuloff("NULL");
     
    148146    TString devhilocal("NULL");
    149147
    150     MHCamera *hilooff = (MHCamera*)arr.FindObjectInCanvas("HiLoOff;avg", "MHCamera", "HiLoOff");
    151     if (!hilooff)
    152     {
    153         cout << "WARNING - Reading of HiLoOff failed." << endl;
    154         return 2;
    155     }
    156 
    157     MHCamera *hilocal = (MHCamera*)arr.FindObjectInCanvas("HiLoCal;avg", "MHCamera", "HiLoCal");
    158     if (!hilocal)
    159     {
    160         cout << "WARNING - Reading of HiLoCal failed." << endl;
    161         return 2;
    162     }
    163 
    164     medoff = TMath::Nint(hilooff->GetMedian()*10000)/10000.;
    165     devoff = TMath::Nint(hilooff->GetDev()   *10000)/10000.;
    166 
    167     medcal = TMath::Nint(hilocal->GetMedian()*100)/100.;
    168     devcal = TMath::Nint(hilocal->GetDev()   *100)/100.;
    169 
    170     medpuloff.Form("%7.4f", medoff);
    171     devpuloff.Form("%7.4f", devoff);
    172     medhilocal.Form("%6.2f", medcal);
    173     devhilocal.Form("%6.2f", devcal);
     148    TString query(Form("SELECT MCSequences.fAmplFadcKEY FROM MCSequences LEFT JOIN "
     149                       "AmplFadc on MCSequences.fAmplFadcKEY=AmplFadc.fAmplFadcKEY "
     150                       "where fSequenceFirst=%d;",seq.GetSequence()));
     151
     152    TSQLResult *res = serv.Query(query);
     153    if (!res)
     154    {
     155        cout << "ERROR - Query failed: " << query << endl;
     156        return 2;
     157    }
     158
     159    TSQLRow *row = res->Next();
     160    if (!row)
     161    {
     162        cout << "ERROR - Query failed: " << query << endl;
     163        return 2;
     164    }
     165    TString epochkey  = (*row)[0];
     166    Int_t epoch = atoi(epochkey.Data());
     167
     168    delete res;
     169
     170    if (epoch!=1)
     171    {
     172        MHCamera *hilooff = (MHCamera*)arr.FindObjectInCanvas("HiLoOff;avg", "MHCamera", "HiLoOff");
     173        if (!hilooff)
     174        {
     175            cout << "ERROR - Reading of HiLoOff failed." << endl;
     176            return 2;
     177        }
     178
     179        MHCamera *hilocal = (MHCamera*)arr.FindObjectInCanvas("HiLoCal;avg", "MHCamera", "HiLoCal");
     180        if (!hilocal)
     181        {
     182            cout << "ERROR - Reading of HiLoCal failed." << endl;
     183            return 2;
     184        }
     185
     186        medpuloff.Form("%7.4f",  hilooff->GetMedian());
     187        devpuloff.Form("%7.4f",  hilooff->GetDev());
     188        medhilocal.Form("%6.2f", hilocal->GetMedian());
     189        devhilocal.Form("%6.2f", hilocal->GetDev());
     190    }
    174191
    175192    TArrayI inner(1);
     
    186203    if (meanrmsi<0 || meanrmso<0)
    187204    {
    188         cout << "WARNING - MeanPedRMS inner or outer < 0 " << endl;
     205        cout << "ERROR - MeanPedRMS inner or outer < 0 " << endl;
    189206        cout << "MeanPedRMS inner " << meanrmsi << endl;
    190207        cout << "MeanPedRMS outer " << meanrmso << endl;
     
    192209    }
    193210
    194     meanrmsi = TMath::Nint(meanrmsi*100)/100.;
    195     meanrmso = TMath::Nint(meanrmso*100)/100.;
     211    TString meanrmsinner=Form("%6.2f", meanrmsi);
     212    TString meanrmsouter=Form("%6.2f", meanrmso);
    196213
    197214    cam = (MHCamera*)arr.FindObjectInCanvas("Interp'd;avg", "MHCamera", "Interp'd");
    198215    if (!cam)
    199216    {
    200         cout << "WARNING - Reading of Interp'd;avg failed." << endl;
     217        cout << "ERROR - Reading of Interp'd;avg failed." << endl;
    201218        return 2;
    202219    }
     
    207224    if (meansigi<0 || meansigo<0)
    208225    {
    209         cout << "WARNING - MeanInterp'd inner or outer < 0 " << endl;
     226        cout << "ERROR - MeanInterp'd inner or outer < 0 " << endl;
    210227        cout << "MeanInterp'd inner " << meansigi << endl;
    211228        cout << "MeanInterp'd outer " << meansigo << endl;
     
    213230    }
    214231
    215     meansigi = TMath::Nint(meansigi*100)/100.;
    216     meansigo = TMath::Nint(meansigo*100)/100.;
     232    TString meansiginner =Form("%6.2f", meansigi);
     233    TString meansigouter =Form("%6.2f", meansigo);
    217234
    218235    TString calpos = cal ? Form("%5.1f", cal->GetMean()) : "NULL";
    219236
    220     Stat_t meanpul = pul->GetMean();
    221     Stat_t rmspul  = pul->GetRMS();
    222 
    223     if (meanpul<0 || rmspul<0)
    224     {
    225         cout << "WARNING - PulsePos'd mean or rms < 0 " << endl;
    226         cout << "PulsePos'd mean " << meanpul << endl;
    227         cout << "PulsePos'd rms  " << rmspul << endl;
    228         return 2;
    229     }
    230 
    231     meanpul = TMath::Nint(meanpul*100)/100.;
    232     rmspul  = TMath::Nint(rmspul *100)/100.;
     237    if (pul->GetMean()<0 || pul->GetRMS()<0)
     238    {
     239        cout << "ERROR - PulsePos'd mean or rms < 0 " << endl;
     240        cout << "PulsePos'd mean " << pul->GetMean() << endl;
     241        cout << "PulsePos'd rms  " << pul->GetRMS() << endl;
     242        return 2;
     243    }
     244
     245    TString meanpulpos = Form("%6.2f", pul->GetMean());
     246    TString rmspulpos  = Form("%6.2f", pul->GetRMS());
    233247
    234248    cam = (MHCamera*)arr.FindObjectInCanvas("Unsuitable;avg", "MHCamera", "Unsuitable");
    235249    if (!cam)
    236250    {
    237         cout << "WARNING - Reading of Unsuitable;avg failed." << endl;
     251        cout << "ERROR - Reading of Unsuitable;avg failed." << endl;
    238252        return 2;
    239253    }
     
    242256    Int_t unsuitable01 = cam->GetNumBinsAboveThreshold(0.01);
    243257
    244     TString meanrmsinner =Form("%6.2f", meanrmsi);
    245     TString meanrmsouter =Form("%6.2f", meanrmso);
    246     TString meansiginner =Form("%6.2f", meansigi);
    247     TString meansigouter =Form("%6.2f", meansigo);
    248     TString meanpulpos   =Form("%6.2f", meanpul);
    249     TString rmspulpos    =Form("%6.2f", rmspul);
    250     TString meanextpulpos=Form("%6.2f", meanextpul);
    251     TString rmsextpulpos =Form("%6.2f", rmsextpul);
    252 
    253     if (meanextpul<0 && rmsextpul<0)
    254     {
    255         meanextpulpos = "NULL";
    256         rmsextpulpos  = "NULL";
    257     }
    258 
    259258    // *****************************************************
    260 
    261     // *****************************************************
    262 
    263259
    264260    cout << "Sequence #" << seq.GetSequence() << endl;
  • trunk/MagicSoft/Mars/datacenter/scripts/fillmccallisto

    r9221 r9225  
    5959for (( s=0 ; s < $num ; s++ ))
    6060do
    61    sequence=${primaries[$s+$s]}
     61   sequence=${primaries[$s]}
    6262   printprocesslog "INFO starting $program for mc sequence $sequence"
    6363   no=`printf %08d $sequence | cut -c 0-4`
  • trunk/MagicSoft/Mars/datacenter/scripts/fillmcstar

    r9221 r9225  
    5858for (( s=0 ; s < $num ; s++ ))
    5959do
    60    sequence=${primaries[$s+$s]}
     60   sequence=${primaries[$s]}
    6161   printprocesslog "INFO starting $program for mc sequence $sequence"
    6262   no=`printf %08d $sequence | cut -c 0-4`
  • trunk/MagicSoft/Mars/datacenter/scripts/mcsequences

    r9217 r9225  
    1919#
    2020#   Author(s): Daniela Dorner  12/2005 <mailto:dorner@astro.uni-wuerzburg.de>
    21 #   Author(s): Daniel Hoehne  06/2008 <mailto:hoehne@astro.uni-wuerzburg.de>
    22 #
    23 #   Copyright: MAGIC Software Development, 2000-2008
     21#   Author(s): Daniel Hoehne-Moench  01/2009 <mailto:hoehne@astro.uni-wuerzburg.de>
     22#
     23#   Copyright: MAGIC Software Development, 2000-2009
    2424#
    2525#
     
    7070      pedrun=`echo $pedfile | cut -d_ -f2`
    7171     
    72       modes=("Gamma" "GammaW1" "GammaW2" "GammaFW" "GammaDiff" "GammaHE" "GammaHEW1" "GammaHEW2" "GammaHEFW" "GammaHEDiff" "ProtonDiff" "ProtonHEDiff" "MuonDiff" "MuonHEDiff")
     72      modes=("Gamma" "GammaW1" "GammaW2" "GammaFW" "GammaDiff" "GammaHE" "GammaHEW1" "GammaHEW2" "GammaHEFW" "GammaHEDiff" "ProtonDiff" "ProtonHEDiff" "MuonDiff" "MuonHEDiff" "GammaSUM" "GammaW1SUM" "GammaW2SUM" "GammaFWSUM" "GammaDiffSUM" "GammaHESUM" "GammaHEW1SUM" "GammaHEW2SUM" "GammaHEFWSUM" "GammaHEDiffSUM" "ProtonDiffSUM" "ProtonHEDiffSUM" "MuonDiffSUM" "MuonHEDiffSUM")
    7373      for mode in ${modes[@]}
    7474      do
     
    101101            done   
    102102
    103             trainquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY from MCRunData where fRunNumber=\"$firstruntrain\" "
    104             trainquery2=" select sum(fNumEvents), sum(fNumtriggers) from MCRunData where fRunNumber in ($trainruns2) "
     103            trainquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY, fTriggerFlagKEY from MCRunData where fRunNumber=\"$firstruntrain\" "
     104            trainquery2=" select sum(fNumEvents), sum(fNumTriggers), sum(fNumSumTriggers) from MCRunData where fRunNumber in ($trainruns2) "
    105105            trainvalues=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery1 "`
    106106            trainvalues2=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery2 "`
     
    116116            trainview=`echo $trainvalues | cut -d" " -f10`
    117117            trainass=`echo $trainvalues | cut -d" " -f11`
     118            traintrig=`echo $trainvalues | cut -d" " -f12`
    118119            trainevents=`echo $trainvalues2 | cut -d" " -f1`
    119120            traintriggers=`echo $trainvalues2 | cut -d" " -f2`
     121            trainsumtriggers=`echo $trainvalues2 | cut -d" " -f3`
    120122            trainquery3=" select fSequenceFirst from MCSequenceProcessStatus where fSequenceFirst=\"$firstruntrain\" "
    121123            trainquery4=" select fSequenceFirst from MCSequences where fSequenceFirst=\"$firstruntrain\" "
     
    123125            traincheck4=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $trainquery4 "`
    124126            traininsert1=" insert MCSequenceProcessStatus set fSequenceFirst=\"$firstruntrain\", fSequenceFileWritten=Now() "
    125             traininsert2=" insert MCSequences set fSequenceFirst=\"$firstruntrain\", fRunStart=\"$date\", fNumEvents=\"$trainevents\", fNumTriggers=\"$traintriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$trainspec\", fPSFKEY=\"$trainpsf\", fAddSpotSizeKEY=\"$trainass\", fAmplFadcKEY=\"$trainamplfadc\", fAtmosphericModelKEY=\"$trainatmo\", fObservationModeKEY=\"$trainobs\", fMCParticleKEY=\"$trainpart\", fReflectorVersionKEY=\"$trainrefl\", fCorsikaVersionKEY=\"$traincors\", fCameraVersionKEY=\"$traincam\", fViewConeAngleOKEY=\"$trainview\", fTestTrainKEY=2 "
    126             trainupdate2=" update MCSequences set fRunStart=\"$date\", fNumEvents=\"$trainevents\", fNumTriggers=\"$traintriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$trainspec\", fPSFKEY=\"$trainpsf\", fAddSpotSizeKEY=\"$trainass\", fAmplFadcKEY=\"$trainamplfadc\", fAtmosphericModelKEY=\"$trainatmo\", fObservationModeKEY=\"$trainobs\", fMCParticleKEY=\"$trainpart\", fReflectorVersionKEY=\"$trainrefl\", fCorsikaVersionKEY=\"$traincors\", fCameraVersionKEY=\"$traincam\", fViewConeAngleOKEY=\"$trainview\", fTestTrainKEY=2 where fSequenceFirst=\"$firstruntrain\" "
     127            traininsert2=" insert MCSequences set fSequenceFirst=\"$firstruntrain\", fPriority=\"$firstruntrain\", fRunStart=\"$date\", fNumEvents=\"$trainevents\", fNumTriggers=\"$traintriggers\", fNumSumTriggers=\"$trainsumtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$trainspec\", fPSFKEY=\"$trainpsf\", fAddSpotSizeKEY=\"$trainass\", fAmplFadcKEY=\"$trainamplfadc\", fAtmosphericModelKEY=\"$trainatmo\", fObservationModeKEY=\"$trainobs\", fMCParticleKEY=\"$trainpart\", fReflectorVersionKEY=\"$trainrefl\", fCorsikaVersionKEY=\"$traincors\", fCameraVersionKEY=\"$traincam\", fViewConeAngleOKEY=\"$trainview\", fTriggerFlagKEY=\"$traintrig\", fTestTrainKEY=2 "
     128            trainupdate2=" update MCSequences set fRunStart=\"$date\", fNumEvents=\"$trainevents\", fNumTriggers=\"$traintriggers\", fNumSumTriggers=\"$trainsumtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$trainspec\", fPSFKEY=\"$trainpsf\", fAddSpotSizeKEY=\"$trainass\", fAmplFadcKEY=\"$trainamplfadc\", fAtmosphericModelKEY=\"$trainatmo\", fObservationModeKEY=\"$trainobs\", fMCParticleKEY=\"$trainpart\", fReflectorVersionKEY=\"$trainrefl\", fCorsikaVersionKEY=\"$traincors\", fCameraVersionKEY=\"$traincam\", fViewConeAngleOKEY=\"$trainview\", fTriggerFlagKEY=\"$traintrig\", fTestTrainKEY=2 where fSequenceFirst=\"$firstruntrain\" "
    127129            if [ "$traincheck3" == "" ]
    128130            then
     
    164166            done   
    165167
    166             testquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY from MCRunData where fRunNumber=\"$firstruntest\" "
    167             testquery2=" select sum(fNumEvents), sum(fNumtriggers) from MCRunData where fRunNumber in ($testruns2) "
     168            testquery1=" select fSpectrumKEY, fPSFKEY, fAmplFadcKEY, fAtmosphericModelKEY, fObservationModeKEY, fMCParticleKEY, fReflectorVersionKEY, fCorsikaVersionKEY, fCameraVersionKEY, fViewConeAngleOKEY, fAddSpotSizeKEY, fTriggerFlagKEY from MCRunData where fRunNumber=\"$firstruntest\" "
     169            testquery2=" select sum(fNumEvents), sum(fNumTriggers), sum(fNumSumTriggers) from MCRunData where fRunNumber in ($testruns2) "
    168170            testvalues=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery1 "`
    169171            testvalues2=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery2 "`
     
    179181            testview=`echo $testvalues | cut -d" " -f10`
    180182            testass=`echo $testvalues | cut -d" " -f11`
     183            testtrig=`echo $testvalues | cut -d" " -f12`
    181184            testevents=`echo $testvalues2 | cut -d" " -f1`
    182185            testtriggers=`echo $testvalues2 | cut -d" " -f2`
     186            testsumtriggers=`echo $testvalues2 | cut -d" " -f3`
    183187            testquery3=" select fSequenceFirst from MCSequenceProcessStatus where fSequenceFirst=\"$firstruntest\" "
    184188            testquery4=" select fSequenceFirst from MCSequences where fSequenceFirst=\"$firstruntest\" "
     
    186190            testcheck4=`mysql -ss -u $user --password=$pw --host=$ho $db -e " $testquery4 "`
    187191            testinsert1=" insert MCSequenceProcessStatus set fSequenceFirst=\"$firstruntest\", fSequenceFileWritten=Now() "
    188             testinsert2=" insert MCSequences set fSequenceFirst=\"$firstruntest\", fRunStart=\"$date\", fNumEvents=\"$testevents\", fNumTriggers=\"$testtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$testspec\", fPSFKEY=\"$testpsf\", fAddSpotSizeKEY=\"$testass\", fAmplFadcKEY=\"$testamplfadc\", fAtmosphericModelKEY=\"$testatmo\", fObservationModeKEY=\"$testobs\", fMCParticleKEY=\"$testpart\", fReflectorVersionKEY=\"$testrefl\", fCorsikaVersionKEY=\"$testcors\", fCameraVersionKEY=\"$testcam\", fViewConeAngleOKEY=\"$testview\", fTestTrainKEY=3 "
    189             testupdate2=" update MCSequences set fRunStart=\"$date\", fNumEvents=\"$testevents\", fNumTriggers=\"$testtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$testspec\", fPSFKEY=\"$testpsf\", fAddSpotSizeKEY=\"$testass\", fAmplFadcKEY=\"$testamplfadc\", fAtmosphericModelKEY=\"$testatmo\", fObservationModeKEY=\"$testobs\", fMCParticleKEY=\"$testpart\", fReflectorVersionKEY=\"$testrefl\", fCorsikaVersionKEY=\"$testcors\", fCameraVersionKEY=\"$testcam\", fViewConeAngleOKEY=\"$testview\", fTestTrainKEY=3 where fSequenceFirst=\"$firstruntest\" "
     192            testinsert2=" insert MCSequences set fSequenceFirst=\"$firstruntest\", fPriority=\"$firstruntest\", fRunStart=\"$date\", fNumEvents=\"$testevents\", fNumTriggers=\"$testtriggers\", fNumSumTriggers=\"$testsumtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$testspec\", fPSFKEY=\"$testpsf\", fAddSpotSizeKEY=\"$testass\", fAmplFadcKEY=\"$testamplfadc\", fAtmosphericModelKEY=\"$testatmo\", fObservationModeKEY=\"$testobs\", fMCParticleKEY=\"$testpart\", fReflectorVersionKEY=\"$testrefl\", fCorsikaVersionKEY=\"$testcors\", fCameraVersionKEY=\"$testcam\", fViewConeAngleOKEY=\"$testview\", fTriggerFlagKEY=\"$testtrig\", fTestTrainKEY=3 "
     193            testupdate2=" update MCSequences set fRunStart=\"$date\", fNumEvents=\"$testevents\", fNumTriggers=\"$testtriggers\", fNumSumTriggers=\"$testsumtriggers\", fZBin=\"$zbin\", fSpectrumKEY=\"$testspec\", fPSFKEY=\"$testpsf\", fAddSpotSizeKEY=\"$testass\", fAmplFadcKEY=\"$testamplfadc\", fAtmosphericModelKEY=\"$testatmo\", fObservationModeKEY=\"$testobs\", fMCParticleKEY=\"$testpart\", fReflectorVersionKEY=\"$testrefl\", fCorsikaVersionKEY=\"$testcors\", fCameraVersionKEY=\"$testcam\", fViewConeAngleOKEY=\"$testview\", fTriggerFlagKEY=\"$testtrig\", fTestTrainKEY=3 where fSequenceFirst=\"$firstruntest\" "
    190194            if [ "$testcheck3" == "" ]
    191195            then
Note: See TracChangeset for help on using the changeset viewer.