Changeset 1385 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
07/08/02 11:44:34 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1384 r1385  
    2222     - cd to right canvas before drawing camera display
    2323
    24    * meventdisp/MGEvtDisplay.cc:
     24   * meventdisp/MGEvtDisplay.[h,cc]:
    2525     - added the "Geometry"-Tab
     26     - added MC informations to gui
    2627
    2728   * mgui/MCamDisplay.[h,cc]:
  • trunk/MagicSoft/Mars/NEWS

    r1384 r1385  
    2525   - Added a camera display displaying the pixel numbers to the
    2626     event display gui.
     27
     28   - Added Monte Carlo Informations to event display gui
    2729
    2830
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc

    r1384 r1385  
    4747#include "MGeomCamMagic.h"
    4848
     49#include "MMcEvt.hxx"
     50
    4951ClassImp(MGEvtDisplay);
    5052
     
    131133
    132134    //
    133     // layout and add frame
     135    //  --- the top1 part of the window ---
     136    //
     137    TGHorizontalFrame *top2 = new TGHorizontalFrame(frame, 300, 100);
     138    fList->Add(top2);
     139
     140    fEvtInfo = new TGLabel(top2, new TGString(""));
     141    fList->Add(fEvtInfo);
     142
     143    top2->AddFrame(fEvtInfo, laystd);
     144
     145    //
     146    // layout and add frames
    134147    //
    135148    TGLayoutHints *laytop1 = new TGLayoutHints(kLHintsTop);
    136149    fList->Add(laytop1);
    137 
    138150    frame->AddFrame(top1, laytop1);
     151    frame->AddFrame(top2, laytop1);
    139152}
    140153
     
    393406
    394407    MReadMarsFile *read = new MReadMarsFile(tname, fname);
     408    read->DisableAutoScheme();
    395409    tlist->AddToList(read);
    396410
     
    430444{
    431445    delete this;
     446}
     447
     448void MGEvtDisplay::UpdateMcLabel()
     449{
     450    MMcEvt *evt=(MMcEvt*)GetParList()->FindObject("MMcEvt");
     451    if (!evt)
     452        return;
     453
     454    TString txt = " ";
     455
     456    switch (evt->GetPartId())
     457    {
     458    case kGAMMA:
     459        txt += "Gamma";
     460        break;
     461    case kPROTON:
     462        txt += "Proton";
     463        break;
     464    case kHELIUM:
     465        txt += "Helium";
     466        break;
     467    default:
     468        txt += "Unknown Particle Id";
     469    }
     470
     471    txt += ":  E=";
     472    txt += (int)(evt->GetEnergy()+.5);
     473    txt += "GeV  r=";
     474    txt += (int)(evt->GetImpact()/100+.5);
     475    txt += "m  ZA=";
     476    txt += (int)(evt->GetTheta()*180/TMath::Pi()+.5);
     477    txt += "°     ";
     478
     479    fEvtInfo->SetText(txt);
    432480}
    433481
     
    443491        GetReader()->DecEventNum();
    444492        UpdateDisplay();
     493        UpdateMcLabel();
    445494    }
    446495
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h

    r1030 r1385  
    2727    //
    2828    TGLabel     *fNumOfEvts;
     29    TGLabel     *fEvtInfo;
    2930    TGTextEntry *fTxtEvtNr;
    3031
     
    6263    Bool_t IsInitOk() { return fInitOk; }
    6364
     65    void UpdateMcLabel();
     66
    6467    virtual void UpdateDisplay() = 0;
    6568
  • trunk/MagicSoft/Mars/meventdisp/Makefile

    r1383 r1385  
    2222#  connect the include files defined in the config.mk file
    2323#
    24 INCLUDES = -I. -I../mbase -I../mraw -I../mgui -I../manalysis -I../mfileio
     24INCLUDES = -I. -I../mbase -I../mraw -I../mgui \
     25           -I../manalysis -I../mfileio -I../mmc
    2526
    2627#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.