Changeset 8186 for trunk/MagicSoft
- Timestamp:
- 11/01/06 08:54:04 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/macros
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r8185 r8186 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.3 0 2006-11-01 08:29:45tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.31 2006-11-01 08:53:26 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 99 99 MDataSet *fDataSet; 100 100 101 TString fPrimary; 101 TString fPrimaryDate; 102 TString fPrimaryNumber; 102 103 TString fSecondary; 103 104 … … 351 352 void SetDescription(const char *d, const char *t=0) { fDescription = d; fNameTab = t; } 352 353 void SetGroupBy(GroupBy_t b=kGroupByWeek) { fGroupBy=b; } 353 void SetPrimary(const char *ts) { fPrimary=ts; } 354 void SetPrimaryDate(const char *ts) { fPrimaryDate=ts; } 355 void SetPrimaryNumber(const char *ts) { fPrimaryNumber=ts; } 354 356 void SetSecondary(const char *ts) { fSecondary=ts; } 355 357 356 358 Bool_t Plot(const char *value, Float_t min=0, Float_t max=-1, Float_t resolution=0) 357 359 { 358 TString named = fPrimary ;360 TString named = fPrimaryDate; 359 361 TString named2 = fSecondary; 360 362 TString namev = value; 361 TString join = "fSequenceFirst";362 363 363 364 TString tablev = namev(0, namev.First('.')); … … 376 377 query += value; 377 378 query += ", "; 378 query += " Sequences.fSequenceFirst "; 379 query += fPrimaryNumber; 380 query += " "; 379 381 } 380 382 else … … 384 386 query += "), AVG("; 385 387 query += value; 386 query += "), Sequences.fSequenceFirst, STD("; 388 query += "), "; 389 query += fPrimaryNumber; 390 query += ", STD("; 387 391 query += fSecondary; 388 392 query += "), STD("; … … 430 434 where += " AND "; 431 435 where += Form("%s BETWEEN '%s' AND '%s' ", 432 fPrimary .Data(), fRequestFrom.Data(), fRequestTo.Data());436 fPrimaryDate.Data(), fRequestFrom.Data(), fRequestTo.Data()); 433 437 } 434 438 … … 448 452 //query += Form(" HAVING COUNT(%s)=(COUNT(*)+1)/2 ", valuev.Data()); 449 453 } 450 query += Form("ORDER BY %s ", fPrimary .Data());454 query += Form("ORDER BY %s ", fPrimaryDate.Data()); 451 455 452 456 … … 475 479 //plot.SetGroupBy(MPlot::kGroupByWeek); 476 480 477 plot.SetPrimary("Sequences.fRunStart"); 481 plot.SetPrimaryDate("Sequences.fRunStart"); 482 plot.SetPrimaryNumber("Sequences.fSequenceFirst"); 478 483 plot.SetSecondary("(Sequences.fZenithDistanceMin+Sequences.fZenithDistanceMax)/2"); 479 484 -
trunk/MagicSoft/Mars/datacenter/macros/plotoptical.C
r8185 r8186 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotoptical.C,v 1. 3 2006-11-01 08:29:45tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotoptical.C,v 1.4 2006-11-01 08:53:26 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 99 99 MDataSet *fDataSet; 100 100 101 TString fPrimary; 101 TString fPrimaryDate; 102 TString fPrimaryNumber; 102 103 TString fSecondary; 103 104 … … 352 353 void SetDescription(const char *d, const char *t=0) { fDescription = d; fNameTab = t; } 353 354 void SetGroupBy(GroupBy_t b=kGroupByWeek) { fGroupBy=b; } 354 void SetPrimary(const char *ts) { fPrimary=ts; } 355 void SetPrimaryDate(const char *ts) { fPrimaryDate=ts; } 356 void SetPrimaryNumber(const char *ts) { fPrimaryNumber=ts; } 355 357 void SetSecondary(const char *ts) { fSecondary=ts; } 356 358 … … 362 364 Bool_t Plot(const char *value, Float_t min=0, Float_t max=-1, Float_t resolution=0) 363 365 { 364 TString named = fPrimary ;366 TString named = fPrimaryDate; 365 367 TString named2 = fSecondary; 366 368 TString namev = value; 367 TString join = "fSequenceFirst";368 369 369 370 TString tablev = namev(0, namev.First('.')); … … 381 382 query += ", "; 382 383 query += value; 383 query += ", 0 "; 384 query += ", "; 385 query += fPrimaryNumber; 386 query += " "; 384 387 } 385 388 else … … 389 392 query += "), AVG("; 390 393 query += value; 391 query += "), COUNT(*), STD("; 394 query += "), "; 395 query += fPrimaryNumber; 396 query += ", STD("; 392 397 query += fSecondary; 393 398 query += "), STD("; … … 443 448 //query += Form(" HAVING COUNT(%s)=(COUNT(*)+1)/2 ", valuev.Data()); 444 449 } 445 query += Form("ORDER BY %s ", fPrimary .Data());450 query += Form("ORDER BY %s ", fPrimaryDate.Data()); 446 451 447 452 … … 464 469 void plotall(MPlot &plot, TString source) 465 470 { 466 plot.SetPrimary("OpticalData.fTimeStamp"); 467 plot.SetSecondary("fZenithDistance"); 468 469 471 plot.SetPrimaryDate("OpticalData.fTimestamp"); 472 plot.SetPrimaryNumber("OpticalData.fTimestamp"); 473 plot.SetSecondary("OpticalData.fZenithDistance"); 470 474 471 475 TString cond = "fStatusKEY=13";
Note:
See TracChangeset
for help on using the changeset viewer.