Changeset 1384


Ignore:
Timestamp:
07/08/02 10:55:07 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1382 r1384  
    1616   * mbase/Makefile, mbase/BaseLinkDef.h, mbase/BaseIncl.h,
    1717     manalysis/Makefile, manalysis/AnalysisLinkDef.h,
    18      manalysis/AnalysisIncl.h:
     18     manalysis/AnalysisIncl.h, meventdisp/Makefile:
    1919     - changed accordingly
     20
     21   * meventdisp/MGCamDisplay.cc:
     22     - cd to right canvas before drawing camera display
     23
     24   * meventdisp/MGEvtDisplay.cc:
     25     - added the "Geometry"-Tab
     26
     27   * mgui/MCamDisplay.[h,cc]:
     28     - added DrawPixelNumbers
     29
     30   * mgui/MHexagon.h:
     31     - added Getter functions
     32
     33
    2034
    2135 2002/07/04: Abelardo Moralejo
  • trunk/MagicSoft/Mars/NEWS

    r1378 r1384  
    2222
    2323   - Changed the Alpha range according to TDAS 02-03 to [-90°,90°]
     24
     25   - Added a camera display displaying the pixel numbers to the
     26     event display gui.
    2427
    2528
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r1181 r1384  
    163163    // Show camera display for the actual geometry
    164164    //
     165    fCanvas->cd();
    165166    fDisplay = new MCamDisplay(geom);
    166167    fDisplay->Draw();
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc

    r1214 r1384  
    4343#include "MTaskList.h"
    4444#include "MEvtLoop.h"
     45#include "MCamDisplay.h"
    4546#include "MReadMarsFile.h"
     47#include "MGeomCamMagic.h"
    4648
    4749ClassImp(MGEvtDisplay);
     
    218220    TGTab *tabdisp = new TGTab(frame, 300, 300);
    219221
     222    TGLayoutHints *laycanvas = new TGLayoutHints(kLHintsCenterX|kLHintsCenterY|kLHintsExpandX|kLHintsExpandY);
     223
    220224    TGCompositeFrame *tab2 = tabdisp->AddTab("Event Display");
    221 
    222225    TRootEmbeddedCanvas *canvas = new TRootEmbeddedCanvas("EventDisplay", tab2, 400, 400);
    223 
    224     TGLayoutHints *laycanvas = new TGLayoutHints(kLHintsCenterX|kLHintsCenterY|kLHintsExpandX|kLHintsExpandY);
    225226    tab2->AddFrame(canvas, laycanvas);
     227    fList->Add(canvas);
    226228
    227229    fCanvas = canvas->GetCanvas();
     230
     231    TGCompositeFrame *tab3 = tabdisp->AddTab("Geometry");
     232    canvas = new TRootEmbeddedCanvas("CamDisplay", tab3, 400, 400);
     233    tab3->AddFrame(canvas, laycanvas);
     234    fList->Add(canvas);
     235
     236    MGeomCamMagic geom;
     237    MCamDisplay *display = new MCamDisplay(&geom);
     238    display->Draw();
     239    display->DrawPixelNumbers();
     240    fList->Add(display);
    228241
    229242    //
     
    237250    //
    238251    fList->Add(tabdisp);
    239     fList->Add(canvas);
    240252    fList->Add(laycanvas);
    241253    fList->Add(laydisp);
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.cc

    r1330 r1384  
    269269}
    270270
     271void MCamDisplay::DrawPixelNumbers()
     272{
     273    if (!fDrawingPad)
     274        Draw();
     275
     276    fDrawingPad->cd();
     277
     278    TText txt;
     279    txt.SetTextFont(122);
     280    txt.SetTextAlign(22);   // centered/centered
     281
     282    for (UInt_t i=0; i<fNumPixels; i++)
     283    {
     284        TString num;
     285        num += i;
     286
     287        const MHexagon &h = (MHexagon&)*(*fPixels)[i];
     288        TText *nt = txt.DrawText(h.GetX(), h.GetY(), num);
     289        nt->SetTextSize(0.0005*h.GetD());
     290    }
     291}
     292
    271293// ------------------------------------------------------------------------
    272294//
  • trunk/MagicSoft/Mars/mgui/MCamDisplay.h

    r1325 r1384  
    5858    void DrawPhotNum(const MCerPhotEvt *event);
    5959
     60    void DrawPixelNumbers();
     61
    6062    void Reset();
    6163    void Draw(Option_t *option="");
  • trunk/MagicSoft/Mars/mgui/MHexagon.h

    r1076 r1384  
    5757    virtual void  SavePrimitive(ofstream &out, Option_t *);
    5858
     59    Float_t GetX() const { return fX; }
     60    Float_t GetY() const { return fY; }
     61    Float_t GetD() const { return fD; }
     62
    5963    ClassDef(MHexagon, 0)    // A hexagon for MAGIC
    6064};
Note: See TracChangeset for help on using the changeset viewer.