Ignore:
Timestamp:
03/16/09 15:13:43 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/macros
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/plotdb.C

    r9385 r9402  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.55 2009-03-04 18:45:26 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.56 2009-03-16 15:13:43 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    379379            delete fDataSet;
    380380    }
    381     void SetDataSet(const TString filename)
     381    void SetDataSet(const TString filename, UInt_t num=(UInt_t)-1)
    382382    {
    383383        if (fDataSet)
     
    392392            return;
    393393
    394         fDataSet = new MDataSet(filename);
     394        fDataSet = new MDataSet(filename, num);
    395395        fPrimaryNumber="Sequences.fSequenceFirst";
    396396    }
     
    427427        case kNone:
    428428        case kGroupByPrimary:
    429             query += Form("%s AS %s", valued.Data(), valued.Data()+1);
     429            query += Form("%s AS %s", named.Data(), valued.Data()+1);
    430430            break;
    431431        case kGroupByHour:
     
    701701}
    702702
    703 int plotdb(TString from, TString to, const char *dataset=0)
     703int plotdb(TString from, TString to, const char *dataset=0, UInt_t num=(UInt_t)-1)
    704704{
    705705    MSQLMagic serv("sql.rc");
     
    721721
    722722    MPlot plot(serv);
    723     plot.SetDataSet(dataset);
     723    plot.SetDataSet(dataset, num);
    724724    plot.SetDisplay(d);
    725725    plot.SetRequestRange(from, to);
     
    731731}
    732732
    733 int plotdb(const char *ds, TString path)
     733int plotdb(const char *ds, UInt_t num, TString path="/magic/sequences")
    734734{
    735735    MSQLMagic serv("sql.rc");
     
    751751
    752752    MPlot plot(serv);
    753     plot.SetDataSet(ds);
     753    plot.SetDataSet(ds, num);
    754754    plot.SetDisplay(d);
    755755    plot.SetRequestRange("", "");
     
    759759
    760760    return 1;
     761}
     762
     763int plotdb(const char *ds, TString path="/magic/sequences")
     764{
     765    return plotdb(ds, (UInt_t)-1, path);
    761766}
    762767
  • trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C

    r9389 r9402  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.8 2009-03-06 20:36:20 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.9 2009-03-16 15:13:43 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    7878        cond += tel;
    7979    }
     80
     81    //cond +=" AND (RunData.fSourceKEY=403 OR RunData.fSourceKEY=871) ";
     82
    8083    plot.SetCondition(cond);
    8184
     
    9497
    9598    plot.SetDescription("L1 trigger rate after cleaning;R_{L1}", "CleanL1");
    96     plot.Plot("RunDataCheck.fRateCleanedTrig", -0, 400, 1);
     99    plot.Plot("RunDataCheck.fRateCleanedTrig", -0.5, 399.5, 1);
    97100    plot.SetDescription("Sum trigger rate after cleaning;R_{sum}", "CleanSum");
    98     plot.Plot("RunDataCheck.fRateCleanedSum", -0, 400, 1);
     101    plot.Plot("RunDataCheck.fRateCleanedSum", -0.5, 399.5, 1);
    99102    plot.SetDescription("Unknown events trigger rate after cleaning;R_{0}", "Clean0");
    100     plot.Plot("RunDataCheck.fRateCleanedNull", -0, 400, 1);
     103    plot.Plot("RunDataCheck.fRateCleanedNull", -0.5, 399.5, 1);
    101104
    102105/*
     
    122125}
    123126
    124 int plotrundb(TString from, TString to, const char *dataset=0)
     127int plotrundb(TString from, TString to, const char *dataset=0, UInt_t num=(UInt_t)-1)
    125128{
    126129    MSQLMagic serv("sql.rc");
     
    142145
    143146    MPlot plot(serv);
    144     plot.SetDataSet(dataset);
     147    plot.SetDataSet(dataset, num);
    145148    plot.SetDisplay(d);
    146149    plot.SetRequestRange(from, to);
     
    152155}
    153156
    154 int plotrundb(const char *ds)
     157int plotrundb(const char *ds, UInt_t num=(UInt_t)-1)
    155158{
    156159    MSQLMagic serv("sql.rc");
     
    172175
    173176    MPlot plot(serv);
    174     plot.SetDataSet(ds);
     177    plot.SetDataSet(ds, num);
    175178    plot.SetDisplay(d);
    176179    plot.SetRequestRange("", "");
Note: See TracChangeset for help on using the changeset viewer.