Changeset 7495 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 02/10/06 15:01:40 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r7494 r7495 47 47 // .x plotdb.C("2004-11-14 00:00:00", "2005-02-28 00:00:00") 48 48 // --> 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) 49 52 // 50 53 // Make sure, that database and password are corretly set in a resource … … 432 435 } 433 436 434 int plotdb(TString from ="", TString to="")437 int plotdb(TString from, TString to) 435 438 { 436 439 TEnv env("sql.rc"); … … 464 467 } 465 468 469 int 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 466 501 int plotdb(Int_t period) 467 502 { … … 495 530 return 1; 496 531 } 532 533 int plotdb() 534 { 535 return plotdb("", ""); 536 }
Note:
See TracChangeset
for help on using the changeset viewer.