Changeset 8632 for trunk


Ignore:
Timestamp:
07/03/07 15:20:17 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8630 r8632  
    2020
    2121
     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
    2231 2007/06/30 Thomas Bretz
    2332
     
    2736       an error in extracting the time of a saturating lo-gain pixel
    2837       was introduced. fixed.
     38
     39   * resources/starguider.txt:
     40     - starguider calbration file added
    2941
    3042
     
    124136   * mpointing/MSrcPosCalc.[h,cc]:
    125137     - allow to set a tasklist as callback to now which n-th
    126      pass of the same task list it is
     138       pass of the same task list it is
    127139
    128140   * mbase/MTaskList.[h,cc]:
  • trunk/MagicSoft/Mars/NEWS

    r8625 r8632  
    3838     or replace sequence.txt by the sequence number if the default
    3939     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
    4045
    4146   - callisto: was broken for MCs... fixed.
     
    109114     (Rem: ThetaSqN is no longer needed)
    110115
    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.
    113119
    114120   - ganymed: was broken for Wobble-MCs... fixed.
     
    121127        fit.SetScaleMode(MAlphaFitter::kNone);
    122128        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.
    124135
    125136
  • trunk/MagicSoft/Mars/mmain/MEventDisplay.cc

    r8617 r8632  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.61 2007-06-28 19:49:30 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.62 2007-07-03 14:18:03 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    120120//  Constructor.
    121121//
    122 MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay(), fEvtLoop(0)
     122MEventDisplay::MEventDisplay(const char *fname, const char *path) : MStatusDisplay(756), fEvtLoop(0)
    123123{
    124124    //
     
    517517    fList->Add(laystd2);
    518518    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
     521void 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);
    528545}
    529546
     
    538555    TGCompositeFrame *vf1 = new TGVerticalFrame(fUserFrame, 1, 1);
    539556    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);
    543581
    544582    // create root embedded canvas and add it to the tab
     
    555593    //fCanvas->SetFillColor(16);
    556594
    557     TGLayoutHints *lay = new TGLayoutHints(kLHintsExpandX);
    558     fUserFrame->AddFrame(vf1, lay);
     595    fUserFrame->AddFrame(vf1, expx);
    559596    fUserFrame->AddFrame(vf2);
    560597}
     
    635672}
    636673
     674void 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
    637729// --------------------------------------------------------------------------
    638730//
     
    648740
    649741    //
    650     // Get parlist
    651     //
    652     MParList *plist = (MParList*)fEvtLoop->GetParList();
    653 
    654     //
    655742    // Add Geometry tab
    656743    //
     
    668755    fNumOfEvts->SetText(txt);
    669756
    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();
    686758}
    687759
     
    777849            }
    778850            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;
    779861        }
    780862        break;
  • trunk/MagicSoft/Mars/mmain/MEventDisplay.h

    r8617 r8632  
    2121        kEvtPrev = MStatusDisplay::kSearch + 1,
    2222        kEvtNext,
    23         kEvtNumber
     23        kEvtNumber,
     24        kShowMuon,
     25        kShowImgPar
    2426    };
    2527
     
    3436                          const char *filename, const char *treename);
    3537    void AddTopFramePart2(TGCompositeFrame *frame);
     38    void AddMiddleFrame(TGCompositeFrame *frame);
    3639    void AddGeometryTabs();
    3740    void AddUserFrame(const char *filename);
     41    void ShowHide();
    3842
    3943    void UpdateDisplay();
Note: See TracChangeset for help on using the changeset viewer.