Ignore:
Timestamp:
02/10/06 15:01:40 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7494 r7495  
    4747//   .x plotdb.C("2004-11-14 00:00:00", "2005-02-28 00:00:00")
    4848//  --> all values from 14.11.2004 0h to 28.2.2005 0h are plotted
     49// or all data, but with dataset data highlighted
     50//   .x plotdb.C("dataset.txt")
     51//  --> the sequences defined in dataset.txt aree highlighted (blue:on, red:off)
    4952//
    5053// Make sure, that database and password are corretly set in a resource
     
    432435}
    433436
    434 int plotdb(TString from="", TString to="")
     437int plotdb(TString from, TString to)
    435438{
    436439    TEnv env("sql.rc");
     
    464467}
    465468
     469int plotdb(const char *ds)
     470{
     471    TEnv env("sql.rc");
     472
     473    MSQLServer serv(env);
     474    if (!serv.IsConnected())
     475    {
     476        cout << "ERROR - Connection to database failed." << endl;
     477        return 0;
     478    }
     479
     480    cout << "plotdb" << endl;
     481    cout << "------" << endl;
     482    cout << endl;
     483    cout << "Connected to " << serv.GetName() << endl;
     484    cout << endl;
     485
     486    MStatusDisplay *d = new MStatusDisplay;
     487    d->SetWindowName(serv.GetName());
     488    d->SetTitle(serv.GetName());
     489
     490    MPlot plot(serv);
     491    plot.SetDataSet(ds);
     492    plot.SetDisplay(d);
     493    plot.SetRequestRange("", "");
     494    plotall(plot);
     495    d->SaveAsRoot("plotdb.root");
     496    d->SaveAsPS("plotdb.ps");
     497
     498    return 1;
     499}
     500
    466501int plotdb(Int_t period)
    467502{
     
    495530    return 1;
    496531}
     532
     533int plotdb()
     534{
     535    return plotdb("", "");
     536}
Note: See TracChangeset for help on using the changeset viewer.