Changeset 2895 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 01/23/04 17:22:46 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/CCDataCheck.C
r2888 r2895 26 26 // It displays 5 tabs: 27 27 // - Drive system 28 // - Power supplies 28 // - HV power supplies 29 // - LV power supplies 29 30 // - Cooling system 30 31 // - Trigger 31 // - Weather station (?)32 // - Weather station 32 33 // 33 34 //////////////////////////////////////////////////////////////////////////// … … 63 64 MHVsTime hDState("MReportDrive.fState"); 64 65 hDState.SetName("State"); 65 // Power supplies66 // HV power supplies 66 67 MHVsTime hHVA("MCameraHV.fVoltageA"); 67 68 hHVA.SetName("HVA"); … … 72 73 MHVsTime hCB("MCameraHV.fCurrentB"); 73 74 hCB.SetName("CB"); 75 // LV power supplies 76 MHVsTime hLVTemp("MCameraLV.fTemp"); 77 hLVTemp.SetName("LVTemp"); 78 MHVsTime hLVHum("MCameraLV.fHumidity"); 79 hLVHum.SetName("LVHum"); 80 MHVsTime hLVStatus("MCameraHV.fStatus"); 81 hLVStatus.SetName("LVStatus"); 82 MHVsTime hLVRPS("MCameraLV.fRequestPowerSupply"); 83 hLVRPS.SetName("LVRPS"); 74 84 // Cooling system 75 85 MHVsTime hTCenter("MCameraCooling.fTempCenter"); … … 109 119 read.AddToBranchList("MReportDrive.*"); 110 120 read.AddToBranchList("MCameraHV.*"); 121 read.AddToBranchList("MCameraLV.*"); 111 122 read.AddToBranchList("MCameraCooling.*"); 112 123 read.AddToBranchList("MReportCC.*"); … … 143 154 MFillH fillCA(&hCA, "MTimeCamera"); 144 155 MFillH fillCB(&hCB, "MTimeCamera"); 156 MFillH fillLVTemp(&hLVTemp, "MTimeCamera"); 157 MFillH fillLVHum(&hLVHum, "MTimeCamera"); 158 MFillH fillLVStatus(&hLVStatus, "MTimeCamera"); 159 MFillH fillLVRPS(&hLVRPS, "MTimeCamera"); 145 160 MFillH fillTCenter(&hTCenter, "MTimeCamera"); 146 161 MFillH fillTWall(&hTWall, "MTimeCamera"); … … 167 182 fillCA.SetBit(MFillH::kDoNotDisplay); 168 183 fillCB.SetBit(MFillH::kDoNotDisplay); 184 fillLVTemp.SetBit(MFillH::kDoNotDisplay); 185 fillLVHum.SetBit(MFillH::kDoNotDisplay); 186 fillLVStatus.SetBit(MFillH::kDoNotDisplay); 187 fillLVRPS.SetBit(MFillH::kDoNotDisplay); 169 188 fillTCenter.SetBit(MFillH::kDoNotDisplay); 170 189 fillTWall.SetBit(MFillH::kDoNotDisplay); … … 187 206 tlist.AddToList(&fillError, "Drive"); 188 207 tlist.AddToList(&fillDState, "Drive"); 189 tlist.AddToList(&fillError2, 208 tlist.AddToList(&fillError2, "Drive"); 190 209 tlist.AddToList(&fillHVA, "Camera"); 191 210 tlist.AddToList(&fillHVB, "Camera"); 192 211 tlist.AddToList(&fillCA, "Camera"); 193 212 tlist.AddToList(&fillCB, "Camera"); 213 tlist.AddToList(&fillLVTemp, "Camera"); 214 tlist.AddToList(&fillLVHum, "Camera"); 215 tlist.AddToList(&fillLVStatus, "Camera"); 216 tlist.AddToList(&fillLVRPS, "Camera"); 194 217 tlist.AddToList(&fillTCenter, "Camera"); 195 218 tlist.AddToList(&fillTWall, "Camera"); … … 220 243 221 244 tlist.PrintStatistics(); 245 246 gStyle->SetPadGridX(kTRUE); 247 gStyle->SetPadGridY(kTRUE); 222 248 223 249 // … … 344 370 // Camera report 345 371 // 346 // HV and currents 372 // HV and currents of power supplies 347 373 TCanvas &c2 = d->AddTab("HV"); 348 374 c2->Divide(1,2); 349 375 c2->cd(1); 350 // High voltages of the power supplies376 // High voltages 351 377 TLegend *legHV = new TLegend(0.85,0.75,0.99,0.99); 352 378 TGraph *g = hHVA.GetGraph(); … … 367 393 legHV->DrawClone(); 368 394 c2->cd(2); 369 // Currents of power supplies395 // Currents 370 396 TLegend *legC = new TLegend(0.85,0.75,0.99,0.99); 371 397 TGraph *g = hCA.GetGraph(); … … 385 411 hist->SetMinimum(0); 386 412 legC->DrawClone(); 387 413 414 // LV power supplies 415 TCanvas &c3 = d->AddTab("LV"); 416 c3->Divide(2,2); 417 c3->cd(1); 418 TGraph *g = hLVTemp.GetGraph(); 419 g->SetMarkerColor(2); 420 g->SetLineColor(2); 421 g->SetTitle("LV temperature"); 422 MHVsTime *clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew"); 423 TH1 *hist = clone1->GetGraph()->GetHistogram(); 424 hist->SetXTitle("Time"); 425 hist->SetYTitle("Temperature [\\circ]"); 426 c3->cd(2); 427 TGraph *g = hLVHum.GetGraph(); 428 g->SetMarkerColor(4); 429 g->SetLineColor(4); 430 g->SetTitle("LV humidity"); 431 MHVsTime *clone1 = (MHVsTime*)hLVHum.DrawClone("nonew"); 432 TH1 *hist = clone1->GetGraph()->GetHistogram(); 433 hist->SetXTitle("Time"); 434 hist->SetYTitle("Humidity [%]"); 435 c3->cd(3); 436 TGraph *g = hLVStatus.GetGraph(); 437 g->SetMarkerColor(8); 438 g->SetLineColor(8); 439 g->SetTitle("LV status"); 440 MHVsTime *clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew"); 441 TH1 *hist = clone1->GetGraph()->GetHistogram(); 442 hist->SetXTitle("Time"); 443 hist->SetYTitle("Status"); 444 c3->cd(4); 445 TGraph *g = hLVRPS.GetGraph(); 446 g->SetMarkerColor(3); 447 g->SetLineColor(3); 448 g->SetTitle("LV request power supply"); 449 MHVsTime *clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew"); 450 TH1 *hist = clone1->GetGraph()->GetHistogram(); 451 hist->SetXTitle("Time"); 452 hist->SetYTitle("Request power supply"); 453 TAxis *axey = hist->GetYaxis(); 454 axey->Set(2, -0.5, 1.5); 455 axey->SetBinLabel(axey->FindFixBin(0), "OFF"); 456 axey->SetBinLabel(axey->FindFixBin(1), "ON"); 388 457 // Cooling 389 TCanvas &c 3= d->AddTab("Cooling");458 TCanvas &c4 = d->AddTab("Cooling"); 390 459 gStyle->SetPadGridX(kTRUE); 391 460 gStyle->SetPadGridY(kTRUE); 392 c 3->Divide(1,2);393 c 3->cd(1);461 c4->Divide(1,2); 462 c4->cd(1); 394 463 // Camera temperatures 395 464 TLegend *legtemp = new TLegend(0.85,0.75,0.99,0.99); … … 421 490 legtemp->DrawClone(); 422 491 // Camera relative humidity 423 c 3->cd(2);492 c4->cd(2); 424 493 gPad->SetBorderMode(0); 425 494 gPad->Divide(2, 1); … … 457 526 // Trigger report 458 527 // 459 TCanvas &c 4= d->AddTab("Trigger");528 TCanvas &c5 = d->AddTab("Trigger"); 460 529 gStyle->SetPadGridX(kTRUE); 461 530 gStyle->SetPadGridY(kTRUE); … … 481 550 // CC report (Weather station) 482 551 // 483 TCanvas &c5 = d->AddTab("Central Control"); 484 gStyle->SetPadGridX(kTRUE); 485 gStyle->SetPadGridY(kTRUE); 486 c5->Divide(2,2); 552 TCanvas &c6 = d->AddTab("Central Control"); 553 c6->Divide(2,2); 487 554 // Relative humidity 488 c 5->cd(1);555 c6->cd(1); 489 556 TGraph *g = hCCHum.GetGraph(); 490 557 g->SetMarkerStyle(kFullDotSmall); … … 497 564 hist->SetYTitle("Humidity [%]"); 498 565 // Temperature 499 c 5->cd(2);566 c6->cd(2); 500 567 TGraph *g = hCCTemp.GetGraph(); 501 568 g->SetMarkerStyle(kFullDotSmall); … … 508 575 hist->SetYTitle("Temperature [\\circ C]"); 509 576 // Wind speed 510 c 5->cd(3);577 c6->cd(3); 511 578 TGraph *g = hCCWS.GetGraph(); 512 579 g->SetMarkerStyle(kFullDotSmall); … … 519 586 hist->SetYTitle("Wind speed [km/h]"); 520 587 // Solar radiation 521 c 5->cd(4);588 c6->cd(4); 522 589 TGraph *g = hCCSR.GetGraph(); 523 590 g->SetMarkerStyle(kFullDotSmall); … … 536 603 if ((d = evtloop.GetDisplay())) 537 604 { 538 TString file = filename.Remove(filename.Index("."),5); 605 TString file; 606 if (filename.Last('.')>0) 607 file = filename(0, filename.Last('.')); 608 609 // TString file = filename.Remove(filename.Index("."),5); 539 610 // Save data in a postscriptfile (status.ps) 540 611 d->SaveAsPS(-1,Form("%s.ps",file));
Note:
See TracChangeset
for help on using the changeset viewer.