Changeset 2381 for trunk/MagicSoft/Mars
- Timestamp:
- 10/04/03 19:51:50 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/meventdisp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc
r2377 r2381 38 38 #include "MTaskList.h" // MTaskList::AddToList 39 39 #include "MHCamera.h" // MHCamera 40 #include "MGeomApply.h" // MGeomApply41 40 #include "MHillasCalc.h" // MHillasCalc 42 41 #include "MHillasSrcCalc.h" // MHillasSrcCalc … … 49 48 #include "MBlindPixelCalc.h" // MBlindPixelCalc 50 49 #include "MImgCleanStd.h" // MImgCleanStd 51 //#include "MGeomCamMagic.h" // MGeomMagicCam52 50 #include "MRawEvtData.h" // MRawEvtData 53 51 … … 117 115 // preprocess tasks and read in first event (process) 118 116 // 119 void /*MGeomCam */MGCamDisplay::SetupTaskList()117 void MGCamDisplay::SetupTaskList() 120 118 { 121 119 MTaskList *tlist = GetTaskList(); 122 120 MParList *plist = GetParList(); 123 121 124 MGeomApply *apply = new MGeomApply;125 122 MMcPedestalCopy *pcopy = new MMcPedestalCopy; 126 123 MMcPedestalNSBAdd *pdnsb = new MMcPedestalNSBAdd; … … 132 129 MHillasSrcCalc *scalc = new MHillasSrcCalc; 133 130 134 tlist->AddToList(apply);135 131 tlist->AddToList(pcopy); 136 132 tlist->AddToList(pdnsb); … … 142 138 tlist->AddToList(scalc); 143 139 144 // MGeomCamMagic *geom = new MGeomCamMagic;145 140 MPedestalCam *pedest = new MPedestalCam; 146 141 MRawEvtData *event = new MRawEvtData; … … 164 159 // Setup Task list for hillas calculation 165 160 // 166 /*MGeomCam *geom = */SetupTaskList();161 SetupTaskList(); 167 162 168 163 // … … 224 219 // together with the hillas ellipse or not. 225 220 // 226 #include <iostream.h>227 221 void MGCamDisplay::UpdateDisplay() 228 222 { … … 236 230 MGeomCam *cam = (MGeomCam*)plist->FindObject("MGeomCam"); 237 231 for (int i=0; i<5; i++) 238 {239 232 fDisplay[i]->SetGeometry(*cam); 240 cout << "---> Setting geometry for: " << fDisplay[i]->GetName() << endl;241 }242 233 } 243 234 -
trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.h
r2377 r2381 20 20 21 21 MHCamera *fDisplay[5]; 22 TCanvas 22 TCanvas *fCanvas2[5]; 23 23 24 24 void AddSetupElements(); 25 25 void UpdateDisplay(); 26 26 27 void /*MGeomCam */SetupTaskList();27 void SetupTaskList(); 28 28 29 29 public: -
trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.cc
r2377 r2381 43 43 #include "MLogManip.h" 44 44 45 #include "MHCamera.h" 45 46 #include "MParList.h" 46 47 #include "MTaskList.h" 47 48 #include "MEvtLoop.h" 48 49 #include "MHCamera.h" 49 #include "MReadMarsFile.h" 50 #include "MGeomCamMagic.h" 50 #include "MGeomApply.h" 51 51 #include "MRawEvtData.h" 52 52 #include "MRawEvtHeader.h" 53 #include "MReadMarsFile.h" 53 54 54 55 #include "MMcEvt.hxx" … … 276 277 277 278 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);287 279 288 280 // … … 422 414 UInt_t w, UInt_t h) 423 415 // : TGTransientFrame(p, main, w, h), fInitOk(kFALSE) 424 : TGMainFrame(p, w, h), fInitOk(kFALSE) 416 : TGMainFrame(p, w, h), fInitOk(kFALSE), fGeom(NULL) 425 417 { 426 418 // … … 441 433 read->DisableAutoScheme(); 442 434 tlist->AddToList(read); 435 436 MGeomApply *apl = new MGeomApply; 437 tlist->AddToList(apl); 443 438 444 439 MParList *plist = new MParList; … … 536 531 // -------------------------------------------------------------------------- 537 532 // 533 // Adds the geometry tab 534 // 535 void 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 // 538 555 // Checks if the event number is valid, and if so reads the new event 539 556 // and updates the display … … 541 558 void MGEvtDisplay::ReadinEvent(Int_t dir) 542 559 { 560 if (!fGeom) 561 AddGeometryTab(); 562 543 563 MRawEvtData *raw = (MRawEvtData*)GetParList()->FindObject("MRawEvtData"); 544 545 564 if (!raw) 546 565 return; -
trunk/MagicSoft/Mars/meventdisp/MGEvtDisplay.h
r2173 r2381 42 42 43 43 void AddFrames(const char *filename, const char *treename); 44 void AddGeometryTab(); 44 45 45 46 void SaveAsDialog() const; … … 53 54 54 55 TCanvas *fCanvas; 56 TCanvas *fGeom; 55 57 56 58 TGCompositeFrame *fTab1;
Note:
See TracChangeset
for help on using the changeset viewer.