Changeset 8632 for trunk/MagicSoft
- Timestamp:
- 07/03/07 15:20:17 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8630 r8632 20 20 21 21 22 2007/07/03 Thomas Bretz 23 24 * mmain/MEventDisplay.[h,cc]: 25 - changed default size 26 - added two butons to switch of the display of the image 27 parameters 28 29 30 22 31 2007/06/30 Thomas Bretz 23 32 … … 27 36 an error in extracting the time of a saturating lo-gain pixel 28 37 was introduced. fixed. 38 39 * resources/starguider.txt: 40 - starguider calbration file added 29 41 30 42 … … 124 136 * mpointing/MSrcPosCalc.[h,cc]: 125 137 - allow to set a tasklist as callback to now which n-th 126 pass of the same task list it is138 pass of the same task list it is 127 139 128 140 * mbase/MTaskList.[h,cc]: -
trunk/MagicSoft/Mars/NEWS
r8625 r8632 38 38 or replace sequence.txt by the sequence number if the default 39 39 sequence file should be used. 40 41 - mars: The default size has been increased 42 43 - mars: There are two new heckboxes which allow to switch off 44 the calculated image parameters 40 45 41 46 - callisto: was broken for MCs... fixed. … … 109 114 (Rem: ThetaSqN is no longer needed) 110 115 111 - ganymed: From XXXX on a real starguider calibration with a real 112 pointing model for the starguider is done. 116 - ganymed: From 85340 (19.3.2006) on a real starguider calibration 117 with a real pointing model for the starguider is done, calibrated 118 with more than thousand tpoints taken from this date on. 113 119 114 120 - ganymed: was broken for Wobble-MCs... fixed. … … 121 127 fit.SetScaleMode(MAlphaFitter::kNone); 122 128 fit.SetScaleUser(1./3); 123 it is not yet read in automatically (will follow soon) 129 it is not yet read in automatically (will follow soon). 130 In the case of fixed Scale you can also use 131 cuts.SetThetaCut(MFMagicCuts::kOn); 132 no off-cut needed. 133 Be carefull in case of three off-regions when switching on 134 scale mode. Make sure that the scale interval is set correctly. 124 135 125 136 -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r8617 r8632 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.6 1 2007-06-28 19:49:30tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.62 2007-07-03 14:18:03 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 120 120 // Constructor. 121 121 // 122 MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay( ), fEvtLoop(0)122 MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay(756), fEvtLoop(0) 123 123 { 124 124 // … … 517 517 fList->Add(laystd2); 518 518 frame->AddFrame(top2, laystd2); 519 520 // 521 // Add trailing line... 522 // 523 TGHorizontal3DLine *line = new TGHorizontal3DLine(frame); 524 TGLayoutHints *layline = new TGLayoutHints(kLHintsExpandX); 525 fList->Add(line); 526 fList->Add(layline); 527 frame->AddFrame(line, layline); 519 } 520 521 void MEventDisplay::AddMiddleFrame(TGCompositeFrame *frame) 522 { 523 // 524 // Create the gui elements 525 // 526 TGCheckButton *imgpar = new TGCheckButton(frame, "ImgPar", kShowImgPar); 527 imgpar->SetState(kButtonDown); 528 imgpar->Associate(this); 529 fList->Add(imgpar); 530 531 TGCheckButton *muon = new TGCheckButton(frame, "Muon", kShowMuon); 532 muon->Associate(this); 533 muon->SetState(kButtonDown); 534 fList->Add(muon); 535 536 // 537 // add the gui elements to the frame 538 // 539 // TGLayoutHints *laystd = new TGLayoutHints(kLHintsLeft|kLHintsCenterY, 5, 5); 540 // fList->Add(laystd); 541 // top2->AddFrame(prevevt, laystd); 542 543 frame->AddFrame(imgpar); 544 frame->AddFrame(muon); 528 545 } 529 546 … … 538 555 TGCompositeFrame *vf1 = new TGVerticalFrame(fUserFrame, 1, 1); 539 556 TGCompositeFrame *vf2 = new TGVerticalFrame(fUserFrame, 1, 1); 540 541 AddTopFramePart1(vf1, filename, "Events"); 542 AddTopFramePart2(vf1); 557 TGCompositeFrame *hor = new TGHorizontalFrame(vf1, 1, 1); 558 TGCompositeFrame *ver = new TGVerticalFrame(hor, 1, 1); 559 TGCompositeFrame *vfb = new TGVerticalFrame(hor, 1, 1); 560 561 TGHorizontal3DLine *line = new TGHorizontal3DLine(vf1); 562 TGLayoutHints *expx = new TGLayoutHints(kLHintsExpandX); 563 TGLayoutHints *right = new TGLayoutHints(kLHintsRight|kLHintsTop); 564 fList->Add(line); 565 fList->Add(expx); 566 fList->Add(right); 567 568 hor->AddFrame(ver); 569 hor->AddFrame(vfb, right); 570 571 AddMiddleFrame(vfb); 572 573 // 574 // Add trailing line... 575 // 576 vf1->AddFrame(hor, expx); 577 vf1->AddFrame(line, expx); 578 579 AddTopFramePart1(ver, filename, "Events"); 580 AddTopFramePart2(ver); 543 581 544 582 // create root embedded canvas and add it to the tab … … 555 593 //fCanvas->SetFillColor(16); 556 594 557 TGLayoutHints *lay = new TGLayoutHints(kLHintsExpandX); 558 fUserFrame->AddFrame(vf1, lay); 595 fUserFrame->AddFrame(vf1, expx); 559 596 fUserFrame->AddFrame(vf2); 560 597 } … … 635 672 } 636 673 674 void MEventDisplay::ShowHide() 675 { 676 TGCheckButton *but1 = (TGCheckButton*)fList->FindWidget(kShowMuon); 677 TGCheckButton *but2 = (TGCheckButton*)fList->FindWidget(kShowImgPar); 678 679 const Bool_t imgpar = but1 && but1->IsDown(); 680 const Bool_t muon = but2 && but2->IsDown(); 681 682 // 683 // Get parlist 684 // 685 MParList *plist = fEvtLoop->GetParList(); 686 if (!plist) 687 return; 688 689 // 690 // Draw ellipse on top of all pads 691 // 692 const Int_t n = 5; 693 694 TObject *obj[n] = { 695 plist->FindObject("MHillas"), 696 plist->FindObject("MHillasSrc"), 697 plist->FindObject("MHillasExt"), 698 plist->FindObject("MSrcPosCam"), 699 plist->FindObject("MMuonSearchPar") 700 }; 701 702 const Bool_t state[n] = { 703 imgpar, 704 imgpar, 705 imgpar, 706 imgpar, 707 muon, 708 }; 709 710 711 for (int i=1; i<7; i++) 712 { 713 TCanvas *c = GetCanvas(i); 714 c->GetPad(1)->cd(1); 715 716 TList *list = gPad->GetListOfPrimitives(); 717 718 for (int j=0;j<n; j++) 719 if (obj[j]) 720 if (state[j] && !list->FindObject(obj[j])) 721 list->Add(obj[j]); 722 else 723 list->Remove(obj[j]); 724 725 gPad->Modified(kTRUE); 726 } 727 } 728 637 729 // -------------------------------------------------------------------------- 638 730 // … … 648 740 649 741 // 650 // Get parlist651 //652 MParList *plist = (MParList*)fEvtLoop->GetParList();653 654 //655 742 // Add Geometry tab 656 743 // … … 668 755 fNumOfEvts->SetText(txt); 669 756 670 // 671 // Draw ellipse on top of all pads 672 // 673 TObject *hillas1 = plist->FindObject("MHillas"); 674 TObject *hillas2 = plist->FindObject("MHillasSrc"); 675 TObject *hillas3 = plist->FindObject("MHillasExt"); 676 TObject *hmuon = plist->FindObject("MMuonSearchPar"); 677 for (int i=1; i<7;i++) 678 { 679 TCanvas *c = GetCanvas(i); 680 c->GetPad(1)->cd(1); 681 hmuon->Draw(); 682 hillas1->Draw(); 683 hillas2->Draw(); 684 hillas3->Draw(); 685 } 757 ShowHide(); 686 758 } 687 759 … … 777 849 } 778 850 return kTRUE; 851 852 case kCM_CHECKBUTTON: 853 switch (mp1) 854 { 855 case kShowMuon: 856 case kShowImgPar: 857 ShowHide(); 858 return kTRUE; 859 } 860 return kTRUE; 779 861 } 780 862 break; -
trunk/MagicSoft/Mars/mmain/MEventDisplay.h
r8617 r8632 21 21 kEvtPrev = MStatusDisplay::kSearch + 1, 22 22 kEvtNext, 23 kEvtNumber 23 kEvtNumber, 24 kShowMuon, 25 kShowImgPar 24 26 }; 25 27 … … 34 36 const char *filename, const char *treename); 35 37 void AddTopFramePart2(TGCompositeFrame *frame); 38 void AddMiddleFrame(TGCompositeFrame *frame); 36 39 void AddGeometryTabs(); 37 40 void AddUserFrame(const char *filename); 41 void ShowHide(); 38 42 39 43 void UpdateDisplay();
Note:
See TracChangeset
for help on using the changeset viewer.