Changeset 9389 for trunk


Ignore:
Timestamp:
03/06/09 20:37:20 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9388 r9389  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2009/03/06 Thomas Bretz
     21
     22   * datacenter/macros/plotrundb.C datacenter/macros/fillstar.C:
     23     - added RunDataCheck access
     24
     25
     26
    2027 2009/03/05 Thomas Bretz
    2128
  • trunk/MagicSoft/Mars/NEWS

    r9385 r9389  
    1010     star for your MCs first.
    1111
     12 ;REMARK
     13
     14   * File produced with this release containing a gamera geometry (which
     15     are basically all files we produce per default) will not be readable
     16     by older releases.
     17
    1218 ;general
    1319
     
    3036   * plotdb.php: added default (sequences) for startup, added possibility
    3137     to set size of plot
     38
     39   * added a new table ''RunDataCheck'' which containes the rates after
     40     image cleaning for every run which succeeded star. It can be
     41     plotted using ''plotrundb.C''
    3242
    3343 ;merpp
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r9096 r9389  
    312312                         seq.GetSequence(), seq.GetTelescope());
    313313
    314     return serv.InsertUpdate("Star", vars, where) ? 1 : 2;
     314    if (!serv.InsertUpdate("Star", vars, where))
     315        return 2;
     316
     317    cout << endl;
     318
     319    h = (TH1*)arr.FindObjectInCanvas("Rate", "TH2D", "Rate");
     320    if (!h)
     321        return 1;
     322
     323    h->ResetBit(TH1::kCanRebin);
     324
     325    Int_t itrig = h->GetYaxis()->FindBin("Trig");
     326    Int_t isum  = h->GetYaxis()->FindBin("Sum");
     327    Int_t inull = h->GetYaxis()->FindBin("0");
     328
     329    for (int i=0; i<h->GetNbinsX(); i++)
     330    {
     331        Int_t id = atoi(h->GetXaxis()->GetBinLabel(i+1));
     332
     333        Int_t run  = seq.GetSequence()<1000000 ? id : id/1000 + 1000000;
     334        Int_t file = seq.GetSequence()<1000000 ? 0  : id%1000;
     335
     336        const char *rtrig = itrig<0 ? "NULL" : Form("%8.1f", h->GetBinContent(i+1, itrig));
     337        const char *rsum  = isum <0 ? "NULL" : Form("%8.1f", h->GetBinContent(i+1, isum));
     338        const char *rnull = inull<0 ? "NULL" : Form("%8.1f", h->GetBinContent(i+1, inull));
     339
     340        cout << "  M" << seq.GetTelescope() << ":" << run << "/" << file << " " <<rtrig << " " << rsum << " " << rnull << endl;
     341
     342        TString vars = Form(" fTelescopeNumber=%d, "
     343                            " fRunNumber=%d, "
     344                            " fFileNumber=%d, "
     345                            " fRateCleanedTrig=%s,"
     346                            " fRateCleanedSum=%s,"
     347                            " fRateCleanedNull=%s",
     348                            seq.GetTelescope(), run, file,
     349                            rtrig, rsum, rnull);
     350
     351        TString where = Form("fTelescopeNumber=%d AND fRunNumber=%d AND fFileNumber=%d",
     352                             seq.GetTelescope(), run, file);
     353
     354        if (!serv.InsertUpdate("RunDataCheck", vars, where))
     355            return 2;
     356    }
     357
     358    return 1;
    315359}
    316360
  • trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C

    r9017 r9389  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.7 2008-07-20 14:21:40 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.8 2009-03-06 20:36:20 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    6363void plotall(MPlot &plot, Int_t tel=0)
    6464{
    65     plot.SetGroupBy(MPlot::kGroupByNight);
     65    //    plot.SetGroupBy(MPlot::kGroupByNight);
    6666
    6767    plot.SetPrimaryDate("RunData.fRunStart");
     
    7575    if (tel>0)
    7676    {
    77         query[0] += " AND fTelescopeNumber=";
    78         query[0] += tel;
     77        cond += " AND fTelescopeNumber=";
     78        cond += tel;
    7979    }
    8080    plot.SetCondition(cond);
     
    9292    plot.SetDescription("L2 Trigger rate before prescaler;R_{L2,U}", "Unpresc");
    9393    plot.Plot("RunData.fL2RateUnpresc", -0.5, 999.5, 5);
     94
     95    plot.SetDescription("L1 trigger rate after cleaning;R_{L1}", "CleanL1");
     96    plot.Plot("RunDataCheck.fRateCleanedTrig", -0, 400, 1);
     97    plot.SetDescription("Sum trigger rate after cleaning;R_{sum}", "CleanSum");
     98    plot.Plot("RunDataCheck.fRateCleanedSum", -0, 400, 1);
     99    plot.SetDescription("Unknown events trigger rate after cleaning;R_{0}", "Clean0");
     100    plot.Plot("RunDataCheck.fRateCleanedNull", -0, 400, 1);
     101
    94102/*
    95103    //from signal*.root
Note: See TracChangeset for help on using the changeset viewer.