Changeset 8999 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 07/14/08 20:59:13 (17 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
r8952 r8999 59 59 #include <iomanip> 60 60 61 #include <TEnv.h>62 61 #include <TRegexp.h> 63 62 … … 381 380 int fillsignal(TString fname, Bool_t dummy=kTRUE) 382 381 { 383 TEnv env("sql.rc"); 384 385 MSQLMagic serv(env); 382 MSQLMagic serv("sql.rc"); 386 383 if (!serv.IsConnected()) 387 384 { -
trunk/MagicSoft/Mars/datacenter/macros/plotstat.C
r8996 r8999 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotstat.C,v 1. 7 2008-07-05 19:01:42tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotstat.C,v 1.8 2008-07-14 19:59:06 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 319 319 320 320 // 0: All data for which are files available 321 query[0] = "select SUM(TIME_TO_SEC(TIMEDIFF(fRunStop, fRunStart)))/3600 "; 322 query[0] += "from RunData left join RunProcessStatus on RunData.fRunNumber=RunProcessStatus.fRunNumber "; 323 query[0] += "where fRunTypeKey=2 and not ISNULL(fRawFileAvail)"; 321 query[0] = "SELECT SUM(TIME_TO_SEC(TIMEDIFF(fRunStop, fRunStart)))/3600 "; 322 query[0] += "FROM RunData "; 323 query[0] += "LEFT JOIN RunProcessStatus USING (fTelescopeNumber, fRunNumber, fFileNumber) "; 324 query[0] += "WHERE fRunTypeKey=2 AND NOT ISNULL(fRawFileAvail)"; 325 /* 326 if (tel>0) 327 { 328 query[0] += " AND fTelescopeNumber="; 329 query[0] += tel; 330 } 331 */ 324 332 325 333 // 1: All data 326 query[1] = " selectSUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart)))/3600 ";327 query[1] += " from RunData wherefRunTypeKEY=2";334 query[1] = "SELECTT SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart)))/3600 "; 335 query[1] += "FROM RunData WHERE fRunTypeKEY=2"; 328 336 329 337 // 2: All data which is not excluded 330 query[2] = " selectSUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart)))/3600 ";331 query[2] += " from RunData where fRunTypeKEY=2 andfExcludedFDAKEY=1";338 query[2] = "SELECT SUM(TIME_TO_SEC(TIMEDIFF(fRunStop,fRunStart)))/3600 "; 339 query[2] += "FROM RunData WHERE fRunTypeKEY=2 AND fExcludedFDAKEY=1"; 332 340 333 341 // 3: All sequences 334 query[3] = " select SUM(fRunTime)/3600 fromSequences";342 query[3] = "SELECT SUM(fRunTime)/3600 FROM Sequences"; 335 343 336 344 // 4: All sequences with callisto failed 337 query[4] = " select SUM(fRunTime)/3600 from Sequences left join SequenceProcessStatus on";338 query[4] += " Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst where";339 query[4] += " ISNULL(fCallisto) and not ISNULL(fFailedTime) and notISNULL(fAllFilesAvail)";345 query[4] = "SELECT SUM(fRunTime)/3600 FROM Sequences "; 346 query[4] += "LEFT JOIN SequenceProcessStatus USING (fSequenceFirst) "; 347 query[4] += "WHERE ISNULL(fCallisto) AND NOT ISNULL(fFailedTime) AND NOT ISNULL(fAllFilesAvail)"; 340 348 341 349 // 5: All sequences with callisto=OK 342 query[5] = "select SUM(fRunTime)/3600 from Sequences left join SequenceProcessStatus on "; 343 query[5] += "Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst where not ISNULL(fCallisto)"; 350 query[5] = "SELECT SUM(fRunTime)/3600 FROM Sequences "; 351 query[5] += "LEFT JOIN SequenceProcessStatus USING (fSequenceFirst) "; 352 query[5] += "WHERE NOT ISNULL(fCallisto)"; 344 353 345 354 // 6: All sequences with star failed 346 query[6] = " select SUM(fRunTime)/3600 from Sequences left join SequenceProcessStatus on";347 query[6] += " Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst where";348 query[6] += " ISNULL(fStar) and not ISNULL(fFailedTime) and notISNULL(fCallisto)";355 query[6] = "SELECT SUM(fRunTime)/3600 FROM Sequences "; 356 query[6] += "LEFT JOIN SequenceProcessStatus USING (fSequenceFirst) "; 357 query[6] += "WHERE ISNULL(fStar) AND NOT ISNULL(fFailedTime) AND NOT ISNULL(fCallisto)"; 349 358 350 359 // 7: All sequences with star=OK 351 query[7] = "select SUM(fRunTime)/3600 from Sequences left join SequenceProcessStatus on "; 352 query[7] += "Sequences.fSequenceFirst=SequenceProcessStatus.fSequenceFirst where not ISNULL(fStar)"; 360 query[7] = "SELECT SUM(fRunTime)/3600 FROM Sequences "; 361 query[7] += "LEFT JOIN SequenceProcessStatus USING (fSequenceFirst) "; 362 query[7] += "WHERE NOT ISNULL(fStar)"; 353 363 354 364 // 0: All data
Note:
See TracChangeset
for help on using the changeset viewer.