Changeset 2381 for trunk/MagicSoft


Ignore:
Timestamp:
10/04/03 19:51:50 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/meventdisp
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r2377 r2381  
    3838#include "MTaskList.h"           // MTaskList::AddToList
    3939#include "MHCamera.h"            // MHCamera
    40 #include "MGeomApply.h"          // MGeomApply
    4140#include "MHillasCalc.h"         // MHillasCalc
    4241#include "MHillasSrcCalc.h"      // MHillasSrcCalc
     
    4948#include "MBlindPixelCalc.h"     // MBlindPixelCalc
    5049#include "MImgCleanStd.h"        // MImgCleanStd
    51 //#include "MGeomCamMagic.h"       // MGeomMagicCam
    5250#include "MRawEvtData.h"         // MRawEvtData
    5351
     
    117115//  preprocess tasks and read in first event (process)
    118116//
    119 void /*MGeomCam */MGCamDisplay::SetupTaskList()
     117void MGCamDisplay::SetupTaskList()
    120118{
    121119    MTaskList *tlist = GetTaskList();
    122120    MParList  *plist = GetParList();
    123121
    124     MGeomApply        *apply = new MGeomApply;
    125122    MMcPedestalCopy   *pcopy = new MMcPedestalCopy;
    126123    MMcPedestalNSBAdd *pdnsb = new MMcPedestalNSBAdd;
     
    132129    MHillasSrcCalc    *scalc = new MHillasSrcCalc;
    133130
    134     tlist->AddToList(apply);
    135131    tlist->AddToList(pcopy);
    136132    tlist->AddToList(pdnsb);
     
    142138    tlist->AddToList(scalc);
    143139
    144     // MGeomCamMagic *geom   = new MGeomCamMagic;
    145140    MPedestalCam  *pedest = new MPedestalCam;
    146141    MRawEvtData   *event  = new MRawEvtData;
     
    164159    // Setup Task list for hillas calculation
    165160    //
    166     /*MGeomCam *geom = */SetupTaskList();
     161    SetupTaskList();
    167162
    168163    //
     
    224219//  together with the hillas ellipse or not.
    225220//
    226 #include <iostream.h>
    227221void MGCamDisplay::UpdateDisplay()
    228222{
     
    236230        MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam");
    237231        for (int i=0; i<5; i++)
    238         {
    239232            fDisplay[i]->SetGeometry(*cam);
    240             cout << "---> Setting geometry for: " << fDisplay[i]->GetName() << endl;
    241         }
    242233    }
    243234
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.h

    r2377 r2381  
    2020
    2121    MHCamera *fDisplay[5];
    22     TCanvas     *fCanvas2[5];
     22    TCanvas  *fCanvas2[5];
    2323
    2424    void AddSetupElements();
    2525    void UpdateDisplay();
    2626
    27     void /*MGeomCam */SetupTaskList();
     27    void SetupTaskList();
    2828
    2929public:
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc

    r2377 r2381  
    4343#include "MLogManip.h"
    4444
     45#include "MHCamera.h"
    4546#include "MParList.h"
    4647#include "MTaskList.h"
    4748#include "MEvtLoop.h"
    4849#include "MHCamera.h"
    49 #include "MReadMarsFile.h"
    50 #include "MGeomCamMagic.h"
     50#include "MGeomApply.h"
    5151#include "MRawEvtData.h"
    5252#include "MRawEvtHeader.h"
     53#include "MReadMarsFile.h"
    5354
    5455#include "MMcEvt.hxx"
     
    276277
    277278    fCanvas=AddTab("Photons");
    278 
    279     AddTab("Geometry");
    280 
    281     MGeomCamMagic geom;
    282     MHCamera *display = new MHCamera(geom);
    283     display->SetBit(TH1::kNoStats);
    284     display->Draw();
    285     display->DrawPixelIndices();
    286     fList->Add(display);
    287279
    288280    //
     
    422414                           UInt_t w, UInt_t h)
    423415//    : TGTransientFrame(p, main, w, h), fInitOk(kFALSE)
    424 : TGMainFrame(p, w, h), fInitOk(kFALSE)
     416: TGMainFrame(p, w, h), fInitOk(kFALSE), fGeom(NULL)
    425417{
    426418    //
     
    441433    read->DisableAutoScheme();
    442434    tlist->AddToList(read);
     435
     436    MGeomApply *apl = new MGeomApply;
     437    tlist->AddToList(apl);
    443438
    444439    MParList *plist = new MParList;
     
    536531// --------------------------------------------------------------------------
    537532//
     533//  Adds the geometry tab
     534//
     535void MGEvtDisplay::AddGeometryTab()
     536{
     537    MGeomCam *geom = (MGeomCam*)GetParList()->FindObject("MGeomCam");
     538    if (!geom)
     539        return;
     540
     541    fGeom=AddTab("Geometry");
     542
     543    MHCamera *cam = new MHCamera(*geom);
     544    cam->SetBit(TH1::kNoStats);
     545    cam->Draw();
     546    cam->DrawPixelIndices();
     547    fList->Add(cam);
     548
     549    fGeom->Modified();
     550    fGeom->Update();
     551}
     552
     553// --------------------------------------------------------------------------
     554//
    538555//  Checks if the event number is valid, and if so reads the new event
    539556//  and updates the display
     
    541558void MGEvtDisplay::ReadinEvent(Int_t dir)
    542559{
     560    if (!fGeom)
     561        AddGeometryTab();
     562
    543563    MRawEvtData *raw = (MRawEvtData*)GetParList()->FindObject("MRawEvtData");
    544 
    545564    if (!raw)
    546565        return;
  • trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h

    r2173 r2381  
    4242
    4343    void AddFrames(const char *filename, const char *treename);
     44    void AddGeometryTab();
    4445
    4546    void SaveAsDialog() const;
     
    5354
    5455    TCanvas   *fCanvas;
     56    TCanvas   *fGeom;
    5557
    5658    TGCompositeFrame *fTab1;
Note: See TracChangeset for help on using the changeset viewer.