- Timestamp:
- 02/17/04 17:03:46 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3213 r3214 4 4 5 5 -*-*- END OF LINE -*-*- 6 7 2004/01/17: Raquel de los Reyes 8 9 * mcamera/MCameraHV.h 10 - Now it derives from a MCamEvent class and implemented the 11 GetPixContent() and DrawPixelContent() functions. Added the 12 GetMean function to get the mean HV settings of the camera. 13 14 * macros/CCDataCheck.C 15 - Added the HV settings plots. 6 16 7 17 2004/02/11: Hendrik Bartko -
trunk/MagicSoft/Mars/macros/CCDataCheck.C
r3093 r3214 16 16 ! 17 17 ! 18 ! Author(s): Raquel de los Reyes, 0 1/2004 <mailto:reyes@gae.ucm.es>18 ! Author(s): Raquel de los Reyes, 02/2004 <mailto:reyes@gae.ucm.es> 19 19 ! 20 20 ! Copyright: MAGIC Software Development, 2000-2004 … … 24 24 // 25 25 // This macro made the check of the central control files (.rep files). 26 // It displays 8tabs:26 // It displays 9 tabs: 27 27 // - Drive system 28 // - Camera status29 // - HV power supplies28 // - HV of power supplies and HV settings 29 // - DC of power supplies and several camera related status plots 30 30 // - LV power supplies 31 31 // - Cooling system … … 36 36 //////////////////////////////////////////////////////////////////////////// 37 37 38 void CCDataCheck(const TString filename="CC_200 3_11_30_20_29_20.root", const TString directory="../rootfiles/2003_12_01/")38 void CCDataCheck(const TString filename="CC_2004_02_11.root", const TString directory="../") 39 39 { 40 40 41 // 41 42 // Check of the raw files 42 43 // 43 MStatusDisplay *d = new MStatusDisplay;44 d->SetTitle(Form("- %s -",filename));45 d->SetLogStream(&gLog, kTRUE); // Disables output to stdout44 // MStatusDisplay *d = new MStatusDisplay; 45 // d->SetTitle(filename); 46 // d->SetLogStream(&gLog, kTRUE); // Disables output to stdout 46 47 47 48 // … … 127 128 MHVsTime hCoolStatus("MCameraCooling.fStatus"); 128 129 hCoolStatus.SetName("CoolingStatus"); 130 MHVsTime hCamMean("MCameraHV.fMean"); 131 hCamMean.SetName("CameraMean"); 129 132 130 133 // Reads the trees of the root file and the analysed branches … … 148 151 149 152 // Set of MHCamEvents classes 150 // MHCamEvent HVdisplay("CamHV","Camera HV supplies");151 //HVdisplay.SetBit(MHCamera::kVariance);152 //plist.AddToList(&HVdisplay);153 MHCamEvent HVdisplay("CamHV","Camera mean HV settings"); 154 HVdisplay.SetBit(MHCamera::kVariance); 155 plist.AddToList(&HVdisplay); 153 156 154 157 // Set of MHPixVsTime classes (Trigger macroscells) … … 294 297 MFillH filltrigmc18("TrigMacrocell18","MReportTrigger"); 295 298 MFillH filltrigmc19("TrigMacrocell19","MReportTrigger"); 296 // MFillH fillHVD("CamHV","MCameraHV"); 299 MFillH fillcammean(&hCamMean,"MTimeCamera"); 300 MFillH fillHVD(&HVdisplay,"MCameraHV"); 297 301 298 302 // Do not display the result given by the default draw function … … 350 354 filltrigmc18.SetBit(MFillH::kDoNotDisplay); 351 355 filltrigmc19.SetBit(MFillH::kDoNotDisplay); 352 // fillHVD.SetBit(MFillH::kDoNotDisplay); 356 fillcammean.SetBit(MFillH::kDoNotDisplay); 357 fillHVD.SetBit(MFillH::kDoNotDisplay); 358 359 // Skip the fill function is there is no tree entries 360 fillZd.SetBit(MFillH::kCanSkip); 361 fillAz.SetBit(MFillH::kCanSkip); 362 fillError.SetBit(MFillH::kCanSkip); 363 fillDState.SetBit(MFillH::kCanSkip); 364 fillError2.SetBit(MFillH::kCanSkip); 365 fillHVA.SetBit(MFillH::kCanSkip); 366 fillHVB.SetBit(MFillH::kCanSkip); 367 fillCA.SetBit(MFillH::kCanSkip); 368 fillCB.SetBit(MFillH::kCanSkip); 369 fillLVTemp.SetBit(MFillH::kCanSkip); 370 fillLVHum.SetBit(MFillH::kCanSkip); 371 fillLVStatus.SetBit(MFillH::kCanSkip); 372 fillLVRPS.SetBit(MFillH::kCanSkip); 373 fillTCenter.SetBit(MFillH::kCanSkip); 374 fillTWall.SetBit(MFillH::kCanSkip); 375 fillTWater.SetBit(MFillH::kCanSkip); 376 fillTOptLink.SetBit(MFillH::kCanSkip); 377 fillTempOptLink.SetBit(MFillH::kCanSkip); 378 fillHWall.SetBit(MFillH::kCanSkip); 379 fillHCenter.SetBit(MFillH::kCanSkip); 380 fillCCHum.SetBit(MFillH::kCanSkip); 381 fillCCTemp.SetBit(MFillH::kCanSkip); 382 fillCCWS.SetBit(MFillH::kCanSkip); 383 fillCCSR.SetBit(MFillH::kCanSkip); 384 fillTrigBL2.SetBit(MFillH::kCanSkip); 385 fillTrigAL2.SetBit(MFillH::kCanSkip); 386 fillTrigStatus.SetBit(MFillH::kCanSkip); 387 fillTrigZd.SetBit(MFillH::kCanSkip); 388 fillCamStatus.SetBit(MFillH::kCanSkip); 389 fillCamSentStatus.SetBit(MFillH::kCanSkip); 390 fillCamStatusDC.SetBit(MFillH::kCanSkip); 391 fillHVStatus.SetBit(MFillH::kCanSkip); 392 fillLidsStatus.SetBit(MFillH::kCanSkip); 393 fillCoolStatus.SetBit(MFillH::kCanSkip); 394 filltrigmc1.SetBit(MFillH::kCanSkip); 395 filltrigmc2.SetBit(MFillH::kCanSkip); 396 filltrigmc3.SetBit(MFillH::kCanSkip); 397 filltrigmc4.SetBit(MFillH::kCanSkip); 398 filltrigmc5.SetBit(MFillH::kCanSkip); 399 filltrigmc6.SetBit(MFillH::kCanSkip); 400 filltrigmc7.SetBit(MFillH::kCanSkip); 401 filltrigmc8.SetBit(MFillH::kCanSkip); 402 filltrigmc9.SetBit(MFillH::kCanSkip); 403 filltrigmc10.SetBit(MFillH::kCanSkip); 404 filltrigmc11.SetBit(MFillH::kCanSkip); 405 filltrigmc12.SetBit(MFillH::kCanSkip); 406 filltrigmc13.SetBit(MFillH::kCanSkip); 407 filltrigmc14.SetBit(MFillH::kCanSkip); 408 filltrigmc15.SetBit(MFillH::kCanSkip); 409 filltrigmc16.SetBit(MFillH::kCanSkip); 410 filltrigmc17.SetBit(MFillH::kCanSkip); 411 filltrigmc18.SetBit(MFillH::kCanSkip); 412 filltrigmc19.SetBit(MFillH::kCanSkip); 413 fillcammean.SetBit(MFillH::kCanSkip); 414 fillHVD.SetBit(MFillH::kCanSkip); 353 415 354 416 // Add all the task to the task list … … 407 469 tlist.AddToList(&filltrigmc18, "Trigger"); 408 470 tlist.AddToList(&filltrigmc19, "Trigger"); 409 // tlist.AddToList(&fillHVD); 471 tlist.AddToList(&fillcammean, "Camera"); 472 tlist.AddToList(&fillHVD); 410 473 411 474 // … … 414 477 MEvtLoop evtloop; 415 478 evtloop.SetParList(&plist); 416 evtloop.SetDisplay(d);479 // evtloop.SetDisplay(d); 417 480 418 481 // … … 426 489 gStyle->SetPadGridX(kTRUE); 427 490 gStyle->SetPadGridY(kTRUE); 428 491 gStyle->SetCanvasColor(kWhite); 492 MHVsTime *clone1; 493 TGraph *g; 494 TH1 *hist; 495 TAxis *axey; 496 TAxis *axex; 497 MH3 *mh3; 498 MHPixVsTime *pixclone1; 499 MHCamera *Sum; 429 500 // 430 501 // Drive report (pointing.C from T. Bretz) 431 502 // 432 TCanvas &c1 = d.AddTab("DRIVE SYSTEM"); 503 if ((d = evtloop.GetDisplay())) 504 TCanvas &c1 = d.AddTab("DRIVE SYSTEM"); 505 else 506 TCanvas *c1 = new TCanvas(); 433 507 // ************* Plot the telescope tracking positions on the sky *********** 434 508 TGraph *g1 = hZd.GetGraph(); … … 474 548 } 475 549 // ---------------------- Control deviation of the motors ------------------- 476 c1 .cd();550 c1->cd(); 477 551 p = new TPad("", "", 0.6, 0, 1, 0.29); 478 552 p->Draw(); … … 480 554 gStyle->SetOptStat(1110); 481 555 gStyle->SetStatFormat(".2g"); 482 MH3 *mh3 = (MH3*)hError.DrawClone("nonew");556 mh3 = (MH3*)hError.DrawClone("nonew"); 483 557 mh3->GetHist()->SetXTitle("\\Delta [arcmin]"); 484 558 mh3->GetHist()->SetYTitle(""); … … 493 567 ln.DrawLine(2.0*360*60/16384., 0, 2.0*360*60/16384., hError.GetHist()->GetMaximum()); 494 568 // ---------------------- Plot the drive status vs time --------------------- 495 c1 .cd();569 c1->cd(); 496 570 p = new TPad("", "", 0.6, 0.29, 1, 0.42); 497 571 p->Draw(); 498 572 p->cd(); 499 hvt = (MHVsTime*)hDState.DrawClone("nonew");573 MHVsTime *hvt = (MHVsTime*)hDState.DrawClone("nonew"); 500 574 hvt->GetGraph()->SetMarkerStyle(kFullDotSmall); 501 TH1 *hist = hvt->GetGraph()->GetHistogram(); 502 TAxis *axey = hist->GetYaxis(); 503 TAxis *axex = hist->GetXaxis(); 504 hist->SetXTitle("Time"); 505 hist->SetYTitle(""); 506 hist->SetTitle(""); 507 hist->SetStats(0); 508 hist->SetMinimum(-0.5); 509 hist->SetMaximum(4.5); 510 axey->Set(5, -0.5, 4.5); 511 axey->SetBinLabel(axey->FindFixBin(0), "Error"); 512 axey->SetBinLabel(axey->FindFixBin(1), "Stopped"); 513 axey->SetBinLabel(axey->FindFixBin(3), "Moving"); 514 axey->SetBinLabel(axey->FindFixBin(4), "Tracking"); 515 axey->SetLabelSize(0.15); 516 axex->SetLabelSize(0.08); 517 axex->SetTitleSize(0.09); 518 axex->SetTitleOffset(0.45); 575 if (hvt->GetGraph()->GetN()) 576 { 577 hist = hvt->GetGraph()->GetHistogram(); 578 TAxis *axey = hist->GetYaxis(); 579 TAxis *axex = hist->GetXaxis(); 580 hist->SetXTitle("Time"); 581 hist->SetYTitle(""); 582 hist->SetTitle(""); 583 hist->SetStats(0); 584 hist->SetMinimum(-0.5); 585 hist->SetMaximum(4.5); 586 axey->Set(5, -0.5, 4.5); 587 axey->SetBinLabel(axey->FindFixBin(0), "Error"); 588 axey->SetBinLabel(axey->FindFixBin(1), "Stopped"); 589 axey->SetBinLabel(axey->FindFixBin(3), "Moving"); 590 axey->SetBinLabel(axey->FindFixBin(4), "Tracking"); 591 axey->SetLabelSize(0.15); 592 axex->SetLabelSize(0.08); 593 axex->SetTitleSize(0.09); 594 axex->SetTitleOffset(0.45); 595 } 519 596 // --------------- Control deviation of the motors vs zenith angle ---------- 520 c1 .cd();597 c1->cd(); 521 598 p = new TPad("", "", 0.6, 0.71, 1, 1); 522 599 p->Draw(); … … 531 608 mh3->GetHist()->Draw("box"); 532 609 // -------------------------- Zenith angle vs time -------------------------- 533 c1 .cd();610 c1->cd(); 534 611 p = new TPad("", "", 0.6, 0.42, 1, 0.71); 535 612 p->Draw(); … … 550 627 // Camera report 551 628 // 552 // *********************** Camera status ************************************ 553 TCanvas &c2 = d.AddTab("CAMERA STATUS"); 554 c2->Divide(2,3); 629 // ************************* HV of power supplies *************************** 630 if ((d = evtloop.GetDisplay())) 631 TCanvas &c2 = d.AddTab("CAMERA HV"); 632 else 633 TCanvas *c2 = new TCanvas(); 634 c2->Divide(2,2); 555 635 c2->cd(1); 556 TGraph *g = hCamStatus.GetGraph(); 557 g->SetMarkerStyle(kFullDotSmall); 558 g->SetTitle("Camera status"); 559 MHVsTime *clone1 = (MHVsTime*)hCamStatus.DrawClone("nonew"); 560 TH1 *hist = clone1->GetGraph()->GetHistogram(); 561 axey = hist->GetYaxis(); 562 hist->SetMinimum(-0.5); 563 hist->SetMaximum(9.5); 564 axey->Set(10,-0.5,9.5); 565 axey->SetBinLabel(axey->FindFixBin(0),"EROR"); 566 axey->SetBinLabel(axey->FindFixBin(1),"ALARM"); 567 axey->SetBinLabel(axey->FindFixBin(2),"BLOCKED!"); 568 axey->SetBinLabel(axey->FindFixBin(3),"WARM!"); 569 axey->SetBinLabel(axey->FindFixBin(4),"HOT"); 570 axey->SetBinLabel(axey->FindFixBin(5),"HVRAMPING"); 571 axey->SetBinLabel(axey->FindFixBin(6),"OK"); 572 axey->SetBinLabel(axey->FindFixBin(7),"INIT"); 573 axey->SetBinLabel(axey->FindFixBin(8),"SHUTD"); 574 axey->SetBinLabel(axey->FindFixBin(9),"N/A"); 575 axey->SetLabelSize(0.07); 576 hist->SetXTitle("Time"); 577 hist->SetYTitle(""); 578 c2->cd(2); 579 TGraph *g = hCamStatusDC.GetGraph(); 580 g->SetMarkerStyle(kFullDotSmall); 581 g->SetTitle("Camera DC status"); 582 MHVsTime *clone1 = (MHVsTime*)hCamStatusDC.DrawClone("nonew"); 583 TH1 *hist = clone1->GetGraph()->GetHistogram(); 584 axey = hist->GetYaxis(); 585 hist->SetMinimum(-0.5); 586 hist->SetMaximum(9.5); 587 axey->Set(10,-0.5,9.5); 588 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 589 axey->SetBinLabel(axey->FindFixBin(1),"Alarm"); 590 axey->SetBinLabel(axey->FindFixBin(3),"Hot"); 591 axey->SetBinLabel(axey->FindFixBin(5),"Ok"); 592 axey->SetBinLabel(axey->FindFixBin(6),"Warm"); 593 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 594 axey->SetLabelSize(0.07); 595 hist->SetXTitle("Time"); 596 hist->SetYTitle(""); 597 c2->cd(3); 598 TGraph *g = hHVStatus.GetGraph(); 599 g->SetMarkerStyle(kFullDotSmall); 600 g->SetTitle("Camera HV status"); 601 MHVsTime *clone1 = (MHVsTime*)hHVStatus.DrawClone("nonew"); 602 TH1 *hist = clone1->GetGraph()->GetHistogram(); 603 axey = hist->GetYaxis(); 604 hist->SetMinimum(-0.5); 605 hist->SetMaximum(9.5); 606 axey->Set(10,-0.5,9.5); 607 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 608 axey->SetBinLabel(axey->FindFixBin(1),"Mismatch"); 609 axey->SetBinLabel(axey->FindFixBin(2),"Trip"); 610 axey->SetBinLabel(axey->FindFixBin(3),"Ramping"); 611 axey->SetBinLabel(axey->FindFixBin(4),"Off"); 612 axey->SetBinLabel(axey->FindFixBin(5),"Nominal"); 613 axey->SetBinLabel(axey->FindFixBin(6),"LimCurrentWarning"); 614 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 615 axey->SetLabelSize(0.07); 616 hist->SetXTitle("Time"); 617 hist->SetYTitle(""); 618 c2->cd(4); 619 TGraph *g = hLidsStatus.GetGraph(); 620 g->SetMarkerStyle(kFullDotSmall); 621 g->SetTitle("Camera Lids status"); 622 MHVsTime *clone1 = (MHVsTime*)hLidsStatus.DrawClone("nonew"); 623 TH1 *hist = clone1->GetGraph()->GetHistogram(); 624 axey = hist->GetYaxis(); 625 hist->SetMinimum(-0.5); 626 hist->SetMaximum(9.5); 627 axey->Set(10,-0.5,9.5); 628 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 629 axey->SetBinLabel(axey->FindFixBin(1),"SafetyLimit"); 630 axey->SetBinLabel(axey->FindFixBin(4),"Closed"); 631 axey->SetBinLabel(axey->FindFixBin(5),"Opened"); 632 axey->SetBinLabel(axey->FindFixBin(6),"Moving"); 633 axey->SetBinLabel(axey->FindFixBin(7),"Stopped"); 634 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 635 axey->SetLabelSize(0.07); 636 hist->SetXTitle("Time"); 637 hist->SetYTitle(""); 638 c2->cd(5); 639 TGraph *g = hCoolStatus.GetGraph(); 640 g->SetMarkerStyle(kFullDotSmall); 641 g->SetTitle("Camera cooling status"); 642 MHVsTime *clone1 = (MHVsTime*)hCoolStatus.DrawClone("nonew"); 643 TH1 *hist = clone1->GetGraph()->GetHistogram(); 644 axey = hist->GetYaxis(); 645 hist->SetMinimum(-0.5); 646 hist->SetMaximum(9.5); 647 axey->Set(10,-0.5,9.5); 648 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 649 axey->SetBinLabel(axey->FindFixBin(1),"Alarm"); 650 axey->SetBinLabel(axey->FindFixBin(4),"Off"); 651 axey->SetBinLabel(axey->FindFixBin(5),"Ok"); 652 axey->SetBinLabel(axey->FindFixBin(6),"Temp.Warning"); 653 axey->SetBinLabel(axey->FindFixBin(7),"Cond.Warning"); 654 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 655 axey->SetLabelSize(0.07); 656 hist->SetXTitle("Time"); 657 hist->SetYTitle(""); 658 c2->cd(6); 659 TGraph *g = hCamSentStatus.GetGraph(); 660 g->SetMarkerStyle(kFullDotSmall); 661 g->SetTitle("Camera sentinel status"); 662 MHVsTime *clone1 = (MHVsTime*)hCamSentStatus.DrawClone("nonew"); 663 TH1 *hist = clone1->GetGraph()->GetHistogram(); 664 axey = hist->GetYaxis(); 665 hist->SetMinimum(-0.5); 666 hist->SetMaximum(9.5); 667 axey->Set(10,-0.5,9.5); 668 axey->SetBinLabel(axey->FindFixBin(0),"ERROR"); 669 axey->SetBinLabel(axey->FindFixBin(1),"ALL IS OK"); 670 axey->SetBinLabel(axey->FindFixBin(2),"SUN IS PRESENT"); 671 axey->SetBinLabel(axey->FindFixBin(3),"BAD ATM. COND."); 672 axey->SetBinLabel(axey->FindFixBin(4),"BAD T/RH CAMERA"); 673 axey->SetBinLabel(axey->FindFixBin(5),"HOT CAMERA"); 674 axey->SetBinLabel(axey->FindFixBin(6),"FADC FANS PROB."); 675 axey->SetBinLabel(axey->FindFixBin(7),"CECO TIMEOUT"); 676 axey->SetBinLabel(axey->FindFixBin(9),"N/A"); 677 axey->SetLabelSize(0.07); 678 hist->SetXTitle("Time"); 679 hist->SetYTitle(""); 680 681 // ******************** HV and currents of power supplies ******************* 682 TCanvas &c3 = d.AddTab("CAMERA HV"); 683 c3->Divide(1,2); 684 c3->cd(1); 685 // ---------------------------- High voltages ------------------------------- 636 // ---------------------------- Power supplies ------------------------------ 686 637 TLegend *legHV = new TLegend(0.85,0.75,0.99,0.99); 687 TGraph *g = hHVA.GetGraph();638 g = hHVA.GetGraph(); 688 639 g->SetMarkerColor(2); 689 640 g->SetLineColor(2); 690 641 g->SetTitle("Voltages of power supplies"); 691 legHV->AddEntry(g,"Power supply A (hvps1)","l"); 642 legHV->AddEntry(g,"PS A (hvps1)","l"); 643 clone1 = (MHVsTime*)hHVA.DrawClone("nonew"); 644 if(clone1->GetGraph()->GetN()) 645 { 646 hist = clone1->GetGraph()->GetHistogram(); 647 hist->SetXTitle("Time"); 648 hist->SetYTitle("High voltage [V]"); 649 hist->SetMinimum(0); 650 } 692 651 g = hHVB.GetGraph(); 693 652 g->SetMarkerColor(3); 694 653 g->SetLineColor(3); 695 legHV->AddEntry(g,"Power supply B (hvps2)","l"); 696 MHVsTime *clone1 = (MHVsTime*)hHVA.DrawClone("nonew"); 697 MHVsTime *clone2 = (MHVsTime*)hHVB.DrawClone("nonewsame"); 698 TH1 *hist = clone1->GetGraph()->GetHistogram(); 699 hist->SetXTitle("Time"); 700 hist->SetYTitle("High voltage [V]"); 701 hist->SetMinimum(0); 654 legHV->AddEntry(g,"PS B (hvps2)","l"); 655 clone1 = (MHVsTime*)hHVB.DrawClone("nonewsame"); 702 656 legHV->DrawClone(); 703 c3->cd(2); 704 // ----------------------------- Currents ---------------------------------- 657 // ---------------------------- HV settings --------------------------------- 658 c2->cd(2); 659 g = hCamMean.GetGraph(); 660 g->SetMarkerColor(2); 661 g->SetLineColor(2); 662 g->SetTitle("Camera mean HV settings"); 663 clone1 = (MHVsTime*)hCamMean.DrawClone("nonew"); 664 if(clone1->GetGraph()->GetN()) 665 { 666 hist = clone1->GetGraph()->GetHistogram(); 667 hist->SetXTitle("Time"); 668 hist->SetYTitle("HV [V]"); 669 hist->SetMinimum(0); 670 } 671 c2->cd(3); 672 Sum = (MHCamera*)HVdisplay.GetHistByName("sum"); 673 TVirtualPad *c = gPad; 674 c->cd(1); 675 gPad->SetBorderMode(0); 676 Sum->SetYTitle("Mean"); 677 Sum->DrawClone("pixelindex"); 678 c2->cd(4); 679 gPad->SetBorderMode(0); 680 Sum->SetYTitle("Mean HV settings"); 681 Sum->DrawClone("EPhist"); 682 683 // ******************** Currents of power supplies ******************* 684 if ((d = evtloop.GetDisplay())) 685 TCanvas &c3 = d.AddTab("CAMERA DC"); 686 else 687 TCanvas *c3 = new TCanvas(); 688 // ----------------------------- Power supplies ------------------------------ 689 c3->Divide(1,2); 690 c3->cd(1); 705 691 TLegend *legC = new TLegend(0.85,0.75,0.99,0.99); 706 TGraph *g = hCA.GetGraph();692 g = hCA.GetGraph(); 707 693 g->SetMarkerColor(2); 708 694 g->SetLineColor(2); 709 695 g->SetTitle("Currents of power supplies"); 710 696 legC->AddEntry(g,"Power supply A (curr1)","l"); 697 clone1 = (MHVsTime*)hCA.DrawClone("nonew"); 698 if(clone1->GetGraph()->GetN()) 699 { 700 hist = clone1->GetGraph()->GetHistogram(); 701 hist->SetXTitle("Time"); 702 hist->SetYTitle("Current [mA]"); 703 hist->SetMinimum(0); 704 } 711 705 g = hCB.GetGraph(); 712 706 g->SetMarkerColor(3); 713 707 g->SetLineColor(3); 714 708 legC->AddEntry(g,"Power supply B (curr2)","l"); 715 MHVsTime *clone1 = (MHVsTime*)hCA.DrawClone("nonew"); 716 MHVsTime *clone2 = (MHVsTime*)hCB.DrawClone("nonewsame"); 717 TH1 *hist = clone1->GetGraph()->GetHistogram(); 718 hist->SetXTitle("Time"); 719 hist->SetYTitle("Current [mA]"); 720 hist->SetMinimum(0); 709 clone1 = (MHVsTime*)hCB.DrawClone("nonewsame"); 721 710 legC->DrawClone(); 722 711 c3->cd(2); 712 gPad->SetBorderMode(0); 713 gPad->Divide(2,2); 714 TVirtualPad *c = gPad; 715 c->cd(1); 716 g = hCamStatus.GetGraph(); 717 g->SetMarkerStyle(kFullDotSmall); 718 g->SetTitle("Camera status"); 719 clone1 = (MHVsTime*)hCamStatus.DrawClone("nonew"); 720 if(clone1->GetGraph()->GetN()) 721 { 722 hist = clone1->GetGraph()->GetHistogram(); 723 axey = hist->GetYaxis(); 724 hist->SetMinimum(-0.5); 725 hist->SetMaximum(9.5); 726 axey->Set(10,-0.5,9.5); 727 axey->SetBinLabel(axey->FindFixBin(0),"EROR"); 728 axey->SetBinLabel(axey->FindFixBin(1),"ALARM"); 729 axey->SetBinLabel(axey->FindFixBin(2),"BLOCKED!"); 730 axey->SetBinLabel(axey->FindFixBin(3),"WARM!"); 731 axey->SetBinLabel(axey->FindFixBin(4),"HOT"); 732 axey->SetBinLabel(axey->FindFixBin(5),"HVRAMPING"); 733 axey->SetBinLabel(axey->FindFixBin(6),"OK"); 734 axey->SetBinLabel(axey->FindFixBin(7),"INIT"); 735 axey->SetBinLabel(axey->FindFixBin(8),"SHUTD"); 736 axey->SetBinLabel(axey->FindFixBin(9),"N/A"); 737 axey->SetLabelSize(0.07); 738 hist->SetXTitle("Time"); 739 hist->SetYTitle(""); 740 } 741 c->cd(2); 742 g = hCamStatusDC.GetGraph(); 743 g->SetMarkerStyle(kFullDotSmall); 744 g->SetTitle("Camera DC status"); 745 clone1 = (MHVsTime*)hCamStatusDC.DrawClone("nonew"); 746 if(clone1->GetGraph()->GetN()) 747 { 748 hist = clone1->GetGraph()->GetHistogram(); 749 axey = hist->GetYaxis(); 750 hist->SetMinimum(-0.5); 751 hist->SetMaximum(9.5); 752 axey->Set(10,-0.5,9.5); 753 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 754 axey->SetBinLabel(axey->FindFixBin(1),"Alarm"); 755 axey->SetBinLabel(axey->FindFixBin(3),"Hot"); 756 axey->SetBinLabel(axey->FindFixBin(5),"Ok"); 757 axey->SetBinLabel(axey->FindFixBin(6),"Warm"); 758 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 759 axey->SetLabelSize(0.07); 760 hist->SetXTitle("Time"); 761 hist->SetYTitle(""); 762 } 763 c->cd(3); 764 g = hHVStatus.GetGraph(); 765 g->SetMarkerStyle(kFullDotSmall); 766 g->SetTitle("Camera HV status"); 767 clone1 = (MHVsTime*)hHVStatus.DrawClone("nonew"); 768 if(clone1->GetGraph()->GetN()) 769 { 770 hist = clone1->GetGraph()->GetHistogram(); 771 axey = hist->GetYaxis(); 772 hist->SetMinimum(-0.5); 773 hist->SetMaximum(9.5); 774 axey->Set(10,-0.5,9.5); 775 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 776 axey->SetBinLabel(axey->FindFixBin(1),"Mismatch"); 777 axey->SetBinLabel(axey->FindFixBin(2),"Trip"); 778 axey->SetBinLabel(axey->FindFixBin(3),"Ramping"); 779 axey->SetBinLabel(axey->FindFixBin(4),"Off"); 780 axey->SetBinLabel(axey->FindFixBin(5),"Nominal"); 781 axey->SetBinLabel(axey->FindFixBin(6),"LimCurrentWarning"); 782 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 783 axey->SetLabelSize(0.07); 784 hist->SetXTitle("Time"); 785 hist->SetYTitle(""); 786 } 787 c->cd(4); 788 g = hLidsStatus.GetGraph(); 789 g->SetMarkerStyle(kFullDotSmall); 790 g->SetTitle("Camera Lids status"); 791 clone1 = (MHVsTime*)hLidsStatus.DrawClone("nonew"); 792 if(clone1->GetGraph()->GetN()) 793 { 794 hist = clone1->GetGraph()->GetHistogram(); 795 axey = hist->GetYaxis(); 796 hist->SetMinimum(-0.5); 797 hist->SetMaximum(9.5); 798 axey->Set(10,-0.5,9.5); 799 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 800 axey->SetBinLabel(axey->FindFixBin(1),"SafetyLimit"); 801 axey->SetBinLabel(axey->FindFixBin(4),"Closed"); 802 axey->SetBinLabel(axey->FindFixBin(5),"Opened"); 803 axey->SetBinLabel(axey->FindFixBin(6),"Moving"); 804 axey->SetBinLabel(axey->FindFixBin(7),"Stopped"); 805 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 806 axey->SetLabelSize(0.07); 807 hist->SetXTitle("Time"); 808 hist->SetYTitle(""); 809 } 723 810 // ***************************** LV power supplies ************************** 724 TCanvas &c4 = d.AddTab("CAMERA LV"); 811 if ((d = evtloop.GetDisplay())) 812 TCanvas &c4 = d.AddTab("CAMERA LV"); 813 else 814 TCanvas *c4 = new TCanvas(); 725 815 c4->Divide(2,2); 726 816 c4->cd(1); 727 TGraph *g = hLVTemp.GetGraph();817 g = hLVTemp.GetGraph(); 728 818 g->SetMarkerColor(2); 729 819 g->SetLineColor(2); 730 820 g->SetTitle("LV temperature"); 731 MHVsTime *clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew"); 732 TH1 *hist = clone1->GetGraph()->GetHistogram(); 733 hist->SetXTitle("Time"); 734 hist->SetYTitle("Temperature [\\circ]"); 821 clone1 = (MHVsTime*)hLVTemp.DrawClone("nonew"); 822 if(clone1->GetGraph()->GetN()) 823 { 824 hist = clone1->GetGraph()->GetHistogram(); 825 hist->SetXTitle("Time"); 826 hist->SetYTitle("Temperature [\\circ]"); 827 } 735 828 c4->cd(2); 736 TGraph *g = hLVHum.GetGraph();829 g = hLVHum.GetGraph(); 737 830 g->SetMarkerColor(4); 738 831 g->SetLineColor(4); 739 832 g->SetTitle("LV humidity"); 740 MHVsTime *clone1 = (MHVsTime*)hLVHum.DrawClone("nonew"); 741 TH1 *hist = clone1->GetGraph()->GetHistogram(); 742 hist->SetXTitle("Time"); 743 hist->SetYTitle("Humidity [%]"); 833 clone1 = (MHVsTime*)hLVHum.DrawClone("nonew"); 834 if(clone1->GetGraph()->GetN()) 835 { 836 hist = clone1->GetGraph()->GetHistogram(); 837 hist->SetXTitle("Time"); 838 hist->SetYTitle("Humidity [%]"); 839 } 744 840 c4->cd(3); 745 TGraph *g = hLVStatus.GetGraph();841 g = hLVStatus.GetGraph(); 746 842 g->SetMarkerStyle(kFullDotSmall); 747 843 g->SetTitle("LV status"); 748 MHVsTime *clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew"); 749 TH1 *hist = clone1->GetGraph()->GetHistogram(); 750 axey = hist->GetYaxis(); 751 hist->SetMinimum(-0.5); 752 hist->SetMaximum(9.5); 753 axey->Set(10,-0.5,9.5); 754 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 755 axey->SetBinLabel(axey->FindFixBin(1),"Alarm"); 756 axey->SetBinLabel(axey->FindFixBin(2),"Trip"); 757 axey->SetBinLabel(axey->FindFixBin(4),"Off"); 758 axey->SetBinLabel(axey->FindFixBin(5),"On"); 759 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 760 hist->SetXTitle("Time"); 761 hist->SetYTitle(""); 844 clone1 = (MHVsTime*)hLVStatus.DrawClone("nonew"); 845 if(clone1->GetGraph()->GetN()) 846 { 847 hist = clone1->GetGraph()->GetHistogram(); 848 axey = hist->GetYaxis(); 849 hist->SetMinimum(-0.5); 850 hist->SetMaximum(9.5); 851 axey->Set(10,-0.5,9.5); 852 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 853 axey->SetBinLabel(axey->FindFixBin(1),"Alarm"); 854 axey->SetBinLabel(axey->FindFixBin(2),"Trip"); 855 axey->SetBinLabel(axey->FindFixBin(4),"Off"); 856 axey->SetBinLabel(axey->FindFixBin(5),"On"); 857 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 858 hist->SetXTitle("Time"); 859 hist->SetYTitle(""); 860 } 762 861 c4->cd(4); 763 TGraph *g = hLVRPS.GetGraph();862 g = hLVRPS.GetGraph(); 764 863 g->SetMarkerStyle(kFullDotSmall); 765 864 g->SetTitle("LV request power supply"); 766 MHVsTime *clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew"); 767 TH1 *hist = clone1->GetGraph()->GetHistogram(); 768 hist->SetXTitle("Time"); 769 hist->SetYTitle(""); 770 axey = hist->GetYaxis(); 771 hist->SetMinimum(-0.5); 772 hist->SetMaximum(1.5); 773 axey->Set(2, -0.5, 1.5); 774 axey->SetBinLabel(axey->FindFixBin(0), "OFF"); 775 axey->SetBinLabel(axey->FindFixBin(1), "ON"); 865 clone1 = (MHVsTime*)hLVRPS.DrawClone("nonew"); 866 if(clone1->GetGraph()->GetN()) 867 { 868 hist = clone1->GetGraph()->GetHistogram(); 869 hist->SetXTitle("Time"); 870 hist->SetYTitle(""); 871 axey = hist->GetYaxis(); 872 hist->SetMinimum(-0.5); 873 hist->SetMaximum(1.5); 874 axey->Set(2, -0.5, 1.5); 875 axey->SetBinLabel(axey->FindFixBin(0), "OFF"); 876 axey->SetBinLabel(axey->FindFixBin(1), "ON"); 877 } 776 878 // ****************************** Cooling *********************************** 777 TCanvas &c5 = d.AddTab("COOLING SYSTEM"); 879 if ((d = evtloop.GetDisplay())) 880 TCanvas &c5 = d.AddTab("COOLING SYSTEM"); 881 else 882 TCanvas *c5 = new TCanvas(); 778 883 gStyle->SetPadGridX(kTRUE); 779 884 gStyle->SetPadGridY(kTRUE); 780 c5->Divide( 1,2);885 c5->Divide(2,2); 781 886 c5->cd(1); 782 887 // -------------------------- Camera temperatures --------------------------- 783 888 TLegend *legtemp = new TLegend(0.85,0.75,0.99,0.99); 784 TGraph *g = hTCenter.GetGraph();889 g = hTCenter.GetGraph(); 785 890 g->SetMarkerColor(8); 786 891 g->SetLineColor(8); 787 892 g->SetTitle("Camera temperature"); 788 893 legtemp->AddEntry(g,"T at camera center","l"); 894 clone1 = (MHVsTime*)hTCenter.DrawClone("nonew"); 895 if(clone1->GetGraph()->GetN()) 896 { 897 hist = clone1->GetGraph()->GetHistogram(); 898 hist->SetXTitle("Time"); 899 hist->SetYTitle("Temperature [\\circ C]"); 900 hist->SetMinimum(0); 901 } 789 902 g = hTWall.GetGraph(); 790 903 g->SetMarkerColor(12); 791 904 g->SetLineColor(12); 792 905 legtemp->AddEntry(g,"T at camera wall","l"); 906 clone1 = (MHVsTime*)hTWall.DrawClone("nonewsame"); 793 907 g = hTWater.GetGraph(); 794 908 g->SetMarkerColor(4); 795 909 g->SetLineColor(4); 796 910 legtemp->AddEntry(g,"T at water deposit","l"); 911 clone1 = (MHVsTime*)hTWater.DrawClone("nonewsame"); 797 912 g = hTOptLink.GetGraph(); 798 913 g->SetMarkerColor(2); 799 914 g->SetLineColor(2); 800 915 legtemp->AddEntry(g,"T at optical links","l"); 801 MHVsTime *clone1 = (MHVsTime*)hTCenter.DrawClone("nonew"); 802 MHVsTime *clone2 = (MHVsTime*)hTWall.DrawClone("nonewsame"); 803 MHVsTime *clone3 = (MHVsTime*)hTWater.DrawClone("nonewsame"); 804 MHVsTime *clone4 = (MHVsTime*)hTOptLink.DrawClone("nonewsame"); 805 TH1 *hist = clone1->GetGraph()->GetHistogram(); 806 hist->SetXTitle("Time"); 807 hist->SetYTitle("Temperature [\\circ C]"); 808 hist->SetMinimum(0); 916 clone1 = (MHVsTime*)hTOptLink.DrawClone("nonewsame"); 809 917 legtemp->DrawClone(); 918 c5->cd(2); 919 g = hCoolStatus.GetGraph(); 920 g->SetMarkerStyle(kFullDotSmall); 921 g->SetTitle("Camera cooling status"); 922 clone1 = (MHVsTime*)hCoolStatus.DrawClone("nonew"); 923 if(clone1->GetGraph()->GetN()) 924 { 925 hist = clone1->GetGraph()->GetHistogram(); 926 axey = hist->GetYaxis(); 927 hist->SetMinimum(-0.5); 928 hist->SetMaximum(9.5); 929 axey->Set(10,-0.5,9.5); 930 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 931 axey->SetBinLabel(axey->FindFixBin(1),"Alarm"); 932 axey->SetBinLabel(axey->FindFixBin(4),"Off"); 933 axey->SetBinLabel(axey->FindFixBin(5),"Ok"); 934 axey->SetBinLabel(axey->FindFixBin(6),"Temp.Warning"); 935 axey->SetBinLabel(axey->FindFixBin(7),"Cond.Warning"); 936 axey->SetBinLabel(axey->FindFixBin(9),"n/a"); 937 axey->SetLabelSize(0.05); 938 hist->SetXTitle("Time"); 939 hist->SetYTitle(""); 940 } 810 941 // ------------------------- Camera relative humidity ----------------------- 811 c5->cd(2); 812 gPad->SetBorderMode(0); 813 gPad->Divide(2, 1); 814 TVirtualPad *c = gPad; 815 c->cd(1); 942 c5->cd(3); 816 943 TLegend *leghum = new TLegend(0.75,0.75,0.99,0.99); 817 TGraph *g = hHCenter.GetGraph();944 g = hHCenter.GetGraph(); 818 945 g->SetMarkerColor(8); 819 946 g->SetLineColor(8); 820 947 g->SetTitle("Camera relative humidity"); 821 948 leghum->AddEntry(g,"RH at camera center","l"); 949 clone1 = (MHVsTime*)hHCenter.DrawClone("nonew"); 950 if(clone1->GetGraph()->GetN()) 951 { 952 hist = clone1->GetGraph()->GetHistogram(); 953 hist->SetXTitle("Time"); 954 hist->SetYTitle("Relative humidity [%]"); 955 hist->SetMaximum(50); 956 hist->SetMinimum(0); 957 } 822 958 g = hHWall.GetGraph(); 823 959 g->SetMarkerColor(12); 824 960 g->SetLineColor(12); 825 961 leghum->AddEntry(g,"RH at camera wall","l"); 826 clone1 = (MHVsTime*)hHCenter.DrawClone("nonew"); 827 clone2 = (MHVsTime*)hHWall.DrawClone("nonewsame"); 828 hist = clone1->GetGraph()->GetHistogram(); 829 hist->SetXTitle("Time"); 830 hist->SetYTitle("Relative humidity [%]"); 831 hist->SetMaximum(50); 832 hist->SetMinimum(0); 962 clone1 = (MHVsTime*)hHWall.DrawClone("nonewsame"); 833 963 leghum->DrawClone(); 834 964 // ---------------------- Temperature distribution -------------------------- 835 c->cd(2); 836 TH1F *h3 = hTempOptLink.GetHistByName("TOptLink"); 837 h3->SetXTitle("Temperature [\\circ C]"); 838 h3->SetYTitle(""); 839 h3->SetLineColor(2); 840 h3->SetTitle("Distribution of opt. links temperature"); 841 h3->SetStats(0); 842 MH3 *mh3 = (MH3*)hTempOptLink.DrawClone("nonew"); 843 965 c5->cd(4); 966 hist = hTempOptLink.GetHistByName("TOptLink"); 967 hist->SetXTitle("Temperature [\\circ C]"); 968 hist->SetYTitle(""); 969 hist->SetLineColor(2); 970 hist->SetTitle("Distribution of opt. links temperature"); 971 hist->SetStats(0); 972 mh3 = (MH3*)hTempOptLink.DrawClone("nonew"); 844 973 // 845 974 // **************************** Trigger report ****************************** 846 975 // 847 TCanvas &c6 = d.AddTab("TRIGGER SYSTEM"); 976 if ((d = evtloop.GetDisplay())) 977 TCanvas &c6 = d.AddTab("TRIGGER SYSTEM"); 978 else 979 TCanvas *c6 = new TCanvas(); 848 980 c6->Divide(1,3); 849 981 c6->cd(1); … … 851 983 gStyle->SetPadGridY(kTRUE); 852 984 TLegend *legtrig = new TLegend(0.85,0.85,0.99,0.99); 853 TGraph *g = hTrigBL2.GetGraph();985 g = hTrigBL2.GetGraph(); 854 986 g->SetMarkerStyle(kFullDotSmall); 855 987 g->SetMarkerColor(2); … … 857 989 g->SetTitle("L2 trigger rate"); 858 990 legtrig->AddEntry(g,"Before prescaler","l"); 991 clone1 = (MHVsTime*)hTrigBL2.DrawClone("nonew"); 992 if(clone1->GetGraph()->GetN()) 993 { 994 hist = clone1->GetGraph()->GetHistogram(); 995 hist->SetXTitle("Time"); 996 hist->SetYTitle("L2 trigger rate [Hz]"); 997 } 859 998 g = hTrigAL2.GetGraph(); 860 999 g->SetMarkerColor(4); 861 1000 g->SetLineColor(4); 862 1001 legtrig->AddEntry(g,"After prescaler","l"); 863 MHVsTime *clone1 = (MHVsTime*)hTrigBL2.DrawClone("nonew"); 864 MHVsTime *clone2 = (MHVsTime*)hTrigAL2.DrawClone("nonewsame"); 865 TH1 *hist = clone1->GetGraph()->GetHistogram(); 866 hist->SetXTitle("Time"); 867 hist->SetYTitle("L2 trigger rate [Hz]"); 1002 clone1 = (MHVsTime*)hTrigAL2.DrawClone("nonewsame"); 868 1003 legtrig->DrawClone(); 869 1004 c6->cd(2); 870 TH1 *h4= hTrigZd.GetHistByName("TrigZd");871 h 4->SetXTitle("Zenith angle[\\circ]");872 h 4->SetYTitle("Trigger rate [Hz]");873 h 4->SetMarkerColor(4);874 h 4->SetTitle("L2 trigger rate after prescaler");875 h 4->SetStats(0);1005 hist = hTrigZd.GetHistByName("TrigZd"); 1006 hist->SetXTitle("Zenith angle[\\circ]"); 1007 hist->SetYTitle("Trigger rate [Hz]"); 1008 hist->SetMarkerColor(4); 1009 hist->SetTitle("L2 trigger rate after prescaler"); 1010 hist->SetStats(0); 876 1011 mh3 = (MH3*)hTrigZd.DrawClone("nonew"); 877 1012 c6->cd(3); 878 TGraph *g = hTrigStatus.GetGraph(); 879 g->SetMarkerStyle(kFullDotSmall); 880 g->SetTitle("Trigger status"); 881 MHVsTime *clone1 = (MHVsTime*)hTrigStatus.DrawClone("nonew"); 882 TH1 *hist = clone1->GetGraph()->GetHistogram(); 883 axey = hist->GetYaxis(); 884 hist->SetMinimum(-0.5); 885 hist->SetMaximum(5.5); 886 axey->Set(6,-0.5,5.5); 887 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 888 axey->SetBinLabel(axey->FindFixBin(1),"Idle"); 889 axey->SetBinLabel(axey->FindFixBin(2),"Loading"); 890 axey->SetBinLabel(axey->FindFixBin(3),"Ready"); 891 axey->SetBinLabel(axey->FindFixBin(4),"Active"); 892 axey->SetBinLabel(axey->FindFixBin(5),"Stopped"); 893 axey->SetLabelSize(0.07); 894 hist->SetXTitle("Time"); 895 hist->SetYTitle(""); 1013 g = hTrigStatus.GetGraph(); 1014 g->SetMarkerStyle(kFullDotSmall); 1015 g->SetTitle("Trigger status"); 1016 clone1 = (MHVsTime*)hTrigStatus.DrawClone("nonew"); 1017 if(clone1->GetGraph()->GetN()) 1018 { 1019 hist = clone1->GetGraph()->GetHistogram(); 1020 axey = hist->GetYaxis(); 1021 hist->SetMinimum(-0.5); 1022 hist->SetMaximum(5.5); 1023 axey->Set(6,-0.5,5.5); 1024 axey->SetBinLabel(axey->FindFixBin(0),"Error"); 1025 axey->SetBinLabel(axey->FindFixBin(1),"Idle"); 1026 axey->SetBinLabel(axey->FindFixBin(2),"Loading"); 1027 axey->SetBinLabel(axey->FindFixBin(3),"Ready"); 1028 axey->SetBinLabel(axey->FindFixBin(4),"Active"); 1029 axey->SetBinLabel(axey->FindFixBin(5),"Stopped"); 1030 axey->SetLabelSize(0.07); 1031 hist->SetXTitle("Time"); 1032 hist->SetYTitle(""); 1033 } 896 1034 // ***************************** Trigger of macrocells ********************** 897 TCanvas &c7 = d.AddTab("TRIG. MACROCELLs"); 1035 if ((d = evtloop.GetDisplay())) 1036 TCanvas &c7 = d.AddTab("TRIG. MACROCELLs"); 1037 else 1038 TCanvas *c7 = new TCanvas(); 898 1039 c7->Divide(2,2); 899 1040 c7->cd(1); 900 1041 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99); 901 TGraph *g = htrigmc1.GetGraph();1042 g = htrigmc1.GetGraph(); 902 1043 g->SetMarkerStyle(kFullDotSmall); 903 1044 g->SetMarkerColor(2); 904 1045 legtrig->AddEntry(g,Form("Macrocell 1: %3.0f",g->GetHistogram()->GetMaximum()),"p"); 905 1046 g->SetTitle("Trigger rate of mc 1 : (maximum)"); 906 MHPixVsTime *pixclone1 = (MHPixVsTime*)htrigmc1.DrawClone("nonew"); 907 TH1 *hist = pixclone1->GetGraph()->GetHistogram(); 908 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 909 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 910 hist->SetXTitle("Time"); 911 hist->SetYTitle("Trigger [Hz]"); 1047 pixclone1 = (MHPixVsTime*)htrigmc1.DrawClone("nonew"); 1048 if(clone1->GetGraph()->GetN()) 1049 { 1050 hist = pixclone1->GetGraph()->GetHistogram(); 1051 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 1052 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 1053 hist->SetXTitle("Time"); 1054 hist->SetYTitle("Trigger [Hz]"); 1055 } 912 1056 legtrig->DrawClone(); 913 1057 c7->cd(2); 914 1058 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99); 915 TGraph *g = htrigmc2.GetGraph();1059 g = htrigmc2.GetGraph(); 916 1060 g->SetMarkerStyle(kFullDotSmall); 917 1061 g->SetMarkerColor(2); 918 1062 legtrig->AddEntry(g,Form("Macrocell 2: %3.0f",g->GetHistogram()->GetMaximum()),"p"); 919 1063 g->SetTitle("Trigger rate of mc 2-7 : (maximum)"); 920 MHPixVsTime *pixclone1 = (MHPixVsTime*)htrigmc2.DrawClone("nonew"); 921 TH1 *hist = pixclone1->GetGraph()->GetHistogram(); 922 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 923 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 924 hist->SetXTitle("Time"); 925 hist->SetYTitle("Trigger [Hz]"); 1064 pixclone1 = (MHPixVsTime*)htrigmc2.DrawClone("nonew"); 1065 if(clone1->GetGraph()->GetN()) 1066 { 1067 hist = pixclone1->GetGraph()->GetHistogram(); 1068 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 1069 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 1070 hist->SetXTitle("Time"); 1071 hist->SetYTitle("Trigger [Hz]"); 1072 } 926 1073 g=htrigmc3.GetGraph(); 927 1074 g->SetMarkerStyle(kFullDotSmall); … … 962 1109 c7->cd(3); 963 1110 TLegend *legtrig = new TLegend(0.80,0.70,0.99,0.99); 964 TGraph *g = htrigmc8.GetGraph();1111 g = htrigmc8.GetGraph(); 965 1112 g->SetMarkerStyle(kFullDotSmall); 966 1113 g->SetMarkerColor(2); … … 969 1116 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 970 1117 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 971 MHPixVsTime *pixclone1 = (MHPixVsTime*)htrigmc8.DrawClone("nonew"); 972 TH1 *hist = pixclone1->GetGraph()->GetHistogram(); 973 hist->SetXTitle("Time"); 974 hist->SetYTitle("Trigger [Hz]"); 1118 pixclone1 = (MHPixVsTime*)htrigmc8.DrawClone("nonew"); 1119 if(clone1->GetGraph()->GetN()) 1120 { 1121 hist = pixclone1->GetGraph()->GetHistogram(); 1122 hist->SetXTitle("Time"); 1123 hist->SetYTitle("Trigger [Hz]"); 1124 } 975 1125 g=htrigmc9.GetGraph(); 976 1126 g->SetMarkerStyle(kFullDotSmall); … … 1014 1164 legtrig->AddEntry(g,Form("Macrocell 14: %3.0f",g->GetHistogram()->GetMaximum()),"p"); 1015 1165 g->SetTitle("Trigger rate of mc 14-19 : (maximum)"); 1016 MHPixVsTime *pixclone1 = (MHPixVsTime*)htrigmc14.DrawClone("nonew"); 1017 TH1 *hist = pixclone1->GetGraph()->GetHistogram(); 1018 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 1019 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 1020 hist->SetXTitle("Time"); 1021 hist->SetYTitle("Trigger [Hz]"); 1166 pixclone1 = (MHPixVsTime*)htrigmc14.DrawClone("nonew"); 1167 if(clone1->GetGraph()->GetN()) 1168 { 1169 hist = pixclone1->GetGraph()->GetHistogram(); 1170 if(hist->GetMaximum()<g->GetHistogram()->GetMaximum()) 1171 hist->SetMaximum(g->GetHistogram()->GetMaximum()); 1172 hist->SetXTitle("Time"); 1173 hist->SetYTitle("Trigger [Hz]"); 1174 } 1022 1175 g=htrigmc15.GetGraph(); 1023 1176 g->SetMarkerStyle(kFullDotSmall); … … 1060 1213 // *************************** Weather station ****************************** 1061 1214 // 1062 TCanvas &c8 = d.AddTab("WEATHER STATION"); 1215 if ((d = evtloop.GetDisplay())) 1216 TCanvas &c8 = d.AddTab("WEATHER STATION"); 1217 else 1218 TCanvas *c8 = new TCanvas(); 1063 1219 c8->Divide(2,2); 1064 1220 // ----------------------- Relative humidity -------------------------------- 1065 1221 c8->cd(1); 1066 TGraph *g = hCCHum.GetGraph();1222 g = hCCHum.GetGraph(); 1067 1223 g->SetMarkerStyle(kFullDotSmall); 1068 1224 g->SetMarkerColor(4); 1069 1225 g->SetLineColor(4); 1070 1226 g->SetTitle("Relative humidity"); 1071 MHVsTime *clone1 = (MHVsTime*)hCCHum.DrawClone("nonew"); 1072 TH1 *hist = clone1->GetGraph()->GetHistogram(); 1073 hist->SetXTitle("Time"); 1074 hist->SetYTitle("Humidity [%]"); 1227 clone1 = (MHVsTime*)hCCHum.DrawClone("nonew"); 1228 if(clone1->GetGraph()->GetN()) 1229 { 1230 hist = clone1->GetGraph()->GetHistogram(); 1231 hist->SetXTitle("Time"); 1232 hist->SetYTitle("Humidity [%]"); 1233 } 1075 1234 // -------------------------- Temperature ----------------------------------- 1076 1235 c8->cd(2); 1077 TGraph *g = hCCTemp.GetGraph();1236 g = hCCTemp.GetGraph(); 1078 1237 g->SetMarkerStyle(kFullDotSmall); 1079 1238 g->SetMarkerColor(2); 1080 1239 g->SetLineColor(2); 1081 1240 g->SetTitle("Temperature"); 1082 MHVsTime *clone2 = (MHVsTime*)hCCTemp.DrawClone("nonew"); 1083 TH1 *hist = clone2->GetGraph()->GetHistogram(); 1084 hist->SetXTitle("Time"); 1085 hist->SetYTitle("Temperature [\\circ C]"); 1241 clone1 = (MHVsTime*)hCCTemp.DrawClone("nonew"); 1242 if(clone1->GetGraph()->GetN()) 1243 { 1244 hist = clone1->GetGraph()->GetHistogram(); 1245 hist->SetXTitle("Time"); 1246 hist->SetYTitle("Temperature [\\circ C]"); 1247 } 1086 1248 // --------------------------- Wind speed ----------------------------------- 1087 1249 c8->cd(3); 1088 TGraph *g = hCCWS.GetGraph();1250 g = hCCWS.GetGraph(); 1089 1251 g->SetMarkerStyle(kFullDotSmall); 1090 1252 g->SetMarkerColor(3); 1091 1253 g->SetLineColor(3); 1092 1254 g->SetTitle("Wind speed"); 1093 MHVsTime *clone3 = (MHVsTime*)hCCWS.DrawClone("nonew"); 1094 TH1 *hist = clone3->GetGraph()->GetHistogram(); 1095 hist->SetXTitle("Time"); 1096 hist->SetYTitle("Wind speed [km/h]"); 1255 clone1 = (MHVsTime*)hCCWS.DrawClone("nonew"); 1256 if(clone1->GetGraph()->GetN()) 1257 { 1258 hist = clone1->GetGraph()->GetHistogram(); 1259 hist->SetXTitle("Time"); 1260 hist->SetYTitle("Wind speed [km/h]"); 1261 } 1097 1262 // -------------------------- Solar radiation ------------------------------- 1098 1263 c8->cd(4); 1099 TGraph *g = hCCSR.GetGraph();1264 g = hCCSR.GetGraph(); 1100 1265 g->SetMarkerStyle(kFullDotSmall); 1101 1266 g->SetMarkerColor(9); 1102 1267 g->SetLineColor(9); 1103 1268 g->SetTitle("Solar radiation"); 1104 MHVsTime *clone4 = (MHVsTime*)hCCSR.DrawClone("nonew"); 1105 TH1 *hist = clone4->GetGraph()->GetHistogram(); 1106 hist->SetXTitle("Time"); 1107 hist->SetYTitle("Solar radiation [W/m^2]"); 1108 1109 // 1269 clone1 = (MHVsTime*)hCCSR.DrawClone("nonew"); 1270 if(clone1->GetGraph()->GetN()) 1271 { 1272 hist = clone1->GetGraph()->GetHistogram(); 1273 hist->SetXTitle("Time"); 1274 hist->SetYTitle("Solar radiation [W/m^2]"); 1275 } 1276 1277 // Save data in a postscriptfile (filename.ps) 1278 TString file; 1279 if (filename.Last('.')>0) 1280 file = filename(0, filename.Last('.')); 1281 1110 1282 // Make sure the display hasn't been deleted by the user while the 1111 1283 // eventloop was running. 1112 //1113 1284 if ((d = evtloop.GetDisplay())) 1114 { 1115 TString file; 1116 if (filename.Last('.')>0) 1117 file = filename(0, filename.Last('.')); 1118 1119 // Save data in a postscriptfile (status.ps) 1120 d->SaveAsPS(-1,Form("%s.ps",file)); 1285 d->SaveAsPS(directory+file+".ps"); 1286 else 1287 { 1288 c1->Print(directory+file+".ps("); 1289 c2->Print(directory+file+".ps"); 1290 c3->Print(directory+file+".ps"); 1291 c4->Print(directory+file+".ps"); 1292 c5->Print(directory+file+".ps"); 1293 c6->Print(directory+file+".ps"); 1294 c7->Print(directory+file+".ps"); 1295 c8->Print(directory+file+".ps)"); 1121 1296 } 1122 1297 } -
trunk/MagicSoft/Mars/mcamera/MCameraHV.h
r2870 r3214 10 10 #endif 11 11 12 class MCameraHV : public MParContainer 12 class MCameraHV : public MParContainer, public MCamEvent 13 13 { 14 14 friend class MReportCamera; … … 24 24 25 25 TArrayS fHV; // [V] Measured high Voltages for all PMTs 26 27 Float_t fMean; // [V] Mean high voltage of the camera 28 26 29 public: 27 30 MCameraHV() : fHV(577) … … 38 41 Byte_t GetCurrentB() const { return fCurrentB; } 39 42 43 Float_t GetMean() { fMean = fHV.GetSum()/fHV.GetSize(); return fMean; } 44 45 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const 46 { 47 val = fHV[idx]; 48 return val>0; 49 } 50 void DrawPixelContent(Int_t num) const 51 { 52 } 53 40 54 ClassDef(MCameraHV, 1) // Container storing information about the Camera HV 41 55 };
Note:
See TracChangeset
for help on using the changeset viewer.