#include <MINFDisplay.h>
Public Member Functions | |
| MINFDisplay () | |
| MINFDisplay (Int_t size) | |
| virtual | ~MINFDisplay () |
| virtual Bool_t | AllViews () |
| void | CanvasRefresh () |
| virtual void | Clear (Option_t *option="") |
| virtual void | DisableDetector (const char *name) |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| virtual void | Draw (Option_t *option="") |
| virtual void | DrawAllViews () |
| virtual void | DrawHits () |
| virtual void | DrawTitle (Option_t *option="") |
| virtual void | DrawView (Double_t phi, Double_t theta, Double_t psi=0.) |
| virtual void | DrawViewGL () |
| virtual void | DrawViewX3D () |
| virtual void | EnableDetector (const char *name) |
| virtual void | ExecuteEvent (Int_t event, Int_t px, Int_t py) |
| Int_t | GetBackColor () |
| MINFGUIPanel * | GetMINFGUIPanel () |
| Int_t | GetZoomMode () |
| virtual void | LoadPoints () |
| TPad * | Pad () |
| virtual void | Paint (Option_t *option="") |
| virtual void | RunScript () |
| virtual void | SetBackColor (Int_t color=10) |
| virtual void | SetDrawHits (Bool_t draw=kTRUE) |
| virtual void | SetDrawParticles (Bool_t draw=kTRUE) |
| virtual void | SetRange (Double_t rrange=390, Double_t zrange=1000) |
| virtual void | SetCenter (Double_t xcenter=0, Double_t ycenter=0, Double_t zcenter=500) |
| virtual void | SetView (Double_t phi, Double_t theta, Double_t psi=0.) |
| virtual void | SetPickMode () |
| virtual void | SetUnZoomPad (TVirtualPad *pad) |
| virtual void | SetZoomMode () |
| virtual void | ShowEvent () |
| virtual void | ShowNextEvent (Int_t delta=1) |
| virtual void | ToggleDetectorOutline () |
| virtual void | ToggleSteelEars () |
| virtual void | UnZoom () |
Private Attributes | |
| Int_t | fZoomMode |
| Bool_t | fDrawAllViews |
| Bool_t | fDrawParticles |
| Bool_t | fDrawHits |
| Double_t | fTheta |
| Double_t | fPhi |
| Double_t | fPsi |
| Double_t | fRrange |
| Double_t | fZrange |
| Double_t | fXcenter |
| Double_t | fYcenter |
| Double_t | fZcenter |
| Double_t | fXrange |
| Double_t | fYrange |
| Int_t | fHitsCuts |
| MINFGUIPanel * | fMINFGUIPanel |
| TCanvas * | fCanvas |
| TPad * | fPad |
| TVirtualPad * | fUnZoomPad |
| TList * | fFruits |
| Int_t | fBackColor |
|
|
Definition at line 61 of file MINFDisplay.cxx. 00061 : 00062 fMINFGUIPanel(0) 00063 , fCanvas(0) 00064 , fUnZoomPad(0) 00065 { 00066 }
|
|
|
Definition at line 69 of file MINFDisplay.cxx. References fBackColor, fCanvas, fDrawAllViews, fDrawHits, fDrawParticles, fHitsCuts, fMINFGUIPanel, fPad, fPhi, fPsi, fTheta, fXcenter, fXrange, fYcenter, fYrange, fZcenter, fZoomMode, fZrange, MINFGUIPanel::GetCanvas(), gMINFast, MINFast::SetDisplay(), SetRange(), and MINFGUIPanel::ShowStatusBar(). 00069 : 00070 fMINFGUIPanel(0) 00071 , fCanvas(0) 00072 , fUnZoomPad(0) 00073 , fBackColor(10) 00074 { 00075 00076 // Create an event display object. 00077 // A canvas named "edisplay" is created with a vertical size in pixels 00078 // 00079 // A QUICK Overview of the Event Display functions 00080 // =============================================== 00081 // 00082 // The event display can be invoked by running minfast. 00083 // A canvas like in the picture below will appear. 00084 // 00085 // On the left side of the frame, the following buttons appear: 00086 // *Next* to move to the next event 00087 // *Previous* to move to the previous event 00088 // *Top View* to display a top view of the current event 00089 // *Side View* to display a right side view of the current event 00090 // *Front View* to display a front view of the current event 00091 // *All Views* to display front/side/top/30-30 views of current event 00092 // *OpenGL* to use OpenGl to view the current event. 00093 // Note that OpenGL cannot be used across the network. 00094 // Once in GL, click the HELP button of the GL canvas. 00095 // *X3D* to use X3D to view the current event (Unix only). 00096 // Once in X3D, type M to see list of all possible opts. 00097 // For example, type J to zoom, K to unzoom. 00098 // Use the mouse to rotate. 00099 // *Zoom<-->Pick* Toggle, between *Zoom* and *Pick* states, where: 00100 // *Pick* Select this option to be able to point to a hit with 00101 // mouse. All hits from the same track will "glow." 00102 // Once on the hit, use right button to select 00103 // an action. For example, select SetMarkerAttributes to 00104 // change the marker type/color/size for the track. 00105 // *Zoom* Select this option (default) if you want to zoom. 00106 // To zoom, use left button in a "rubber-band" style. 00107 // *UnZoom* To revert to previous picture size in selected view. 00108 // The middle mouse button will select a new view. 00109 // 00110 // When you are in Zoom mode, you can click on blank part of canvas 00111 // to select special options with the right mouse button. 00112 // This will display a pop-up menu with items like: 00113 // *Disable detector* 00114 // *Enable detector*, etc. 00115 // For example select "Disable detector". You get a dialog box. 00116 // Disable detector FLS or EMU for example. 00117 // 00118 // When in pick mode, you can "Inspect" object pointed by mouse. 00119 // When you are on a track, select the menu item "InspectParticle" 00120 // to display the current particle attributes. "InspectHit" for 00121 // current hit attributes. 00122 // 00123 // You can activate the Root browser by selecting the Inspect menu 00124 // in the canvas tool bar menu. Then select "Start Browser" 00125 // This will open new canvas with browser. At this point, you may want 00126 // to display some histograms (from the Trees). Go to the "File" menu 00127 // of the browser and click on "New canvas". 00128 // In the browser, click on item "ROOT files" in the left pane. 00129 // Click on gMINFast.root. 00130 // Click on TH 00131 // Click on FLS or EMU for example 00132 // Click on any variable (eg FLS.fX) to histogram the variable. 00133 // The histograms are NOT YET implemented for MINFAST. 00134 // 00135 // If lost, you can click on HELP in any Root canvas or browser. 00136 //Begin_Html 00137 /* 00138 <img src="gif/MINFdisplay.gif"> 00139 */ 00140 //End_Html 00141 00142 fPad = 0; 00143 gMINFast->SetDisplay(this); 00144 00145 // Set front view by default 00146 fTheta = 180; 00147 fPhi = 90; 00148 fPsi = 0; 00149 fDrawAllViews = kFALSE; 00150 fDrawHits = kTRUE; 00151 fDrawParticles = kTRUE; 00152 fZoomMode = 1; 00153 fHitsCuts = 0; 00154 00155 // Establish canvas size and aspect ratio. 00156 Int_t ysize = size; 00157 if (ysize < 100) ysize = 750; 00158 //gmi Int_t xsize = Int_t(size*830./ysize); 00159 Int_t xsize = ysize; 00160 00161 // Initialize display default parameters 00162 SetRange(300.,1500.); 00163 00164 fXrange = fRrange; 00165 fYrange = fRrange; 00166 fZrange = fZrange; 00167 fXcenter = 0.; 00168 fYcenter = 0.; 00169 fZcenter = 0.5*fZrange; 00170 00171 // Set up TRootEmbeddedCanvas in MINFGUIPanel 00172 fMINFGUIPanel = new MINFGUIPanel("MINFast Event Display", 00173 xsize, ysize); 00174 fCanvas = fMINFGUIPanel->GetCanvas(); 00175 fCanvas->SetEditable(kFALSE); 00176 fMINFGUIPanel->ShowStatusBar(kTRUE); 00177 00178 // Create main display pad 00179 fCanvas->cd(); 00180 fPad = new TPad("viewpad", "MINFast display", 0., 0., 1., 1.); 00181 fPad->Draw(); 00182 fPad->Modified(); 00183 fPad->SetFillColor(fBackColor); 00184 fPad->SetBorderSize(2); 00185 fPad->SetTheta(90-fTheta); 00186 fPad->SetPhi(-90-fPhi); 00187 fCanvas->Update(); 00188 }
|
|
|
Definition at line 191 of file MINFDisplay.cxx. 00192 {
00193 }
|
|
|
Definition at line 64 of file MINFDisplay.h. 00064 {return fDrawAllViews;}
|
|
|
Definition at line 202 of file MINFDisplay.cxx. References fCanvas. Referenced by Draw(), DrawAllViews(), and UnZoom(). 00203 {
00204 fCanvas->Update();
00205 }
|
|
|
Definition at line 196 of file MINFDisplay.cxx. 00197 {
00198 // Delete graphics temporary objects
00199 }
|
|
|
Definition at line 208 of file MINFDisplay.cxx. References MINFast::Detectors(), MINFDetector::Disable(), Draw(), and gMINFast. 00209 {
00210
00211 // Disable detector name from graphics views
00212 MINFDetector *detector =
00213 (MINFDetector *) gMINFast->Detectors()->FindObject(name);
00214 if (!detector) return;
00215 detector->Disable();
00216 Draw();
00217 }
|
|
||||||||||||
|
Definition at line 220 of file MINFDisplay.cxx. 00221 {
00222
00223 // Compute distance from point px,py to objects in event
00224 gPad->SetCursor(kCross);
00225
00226 const Int_t big = 9999;
00227 Int_t dist = big;
00228 Double_t xmin = gPad->GetX1();
00229 Double_t xmax = gPad->GetX2();
00230 Double_t dx = 0.02*(xmax - xmin);
00231 Double_t x = gPad->AbsPixeltoX(px);
00232 if (x < xmin+dx || x > xmax-dx) return dist;
00233
00234 if (fZoomMode) return 0;
00235 else return 7;
00236 }
|
|
|
Definition at line 239 of file MINFDisplay.cxx. References CanvasRefresh(), DrawAllViews(), DrawTitle(), DrawView(), fPad, fPhi, fPsi, fTheta, and SetUnZoomPad(). Referenced by DisableDetector(), EnableDetector(), SetView(), ShowEvent(), ToggleDetectorOutline(), and ToggleSteelEars(). 00240 {
00241 SetUnZoomPad(0); // Reset UnZoomPad
00242
00243 // Display current event
00244 if (fDrawAllViews) {
00245 DrawAllViews();
00246 return;
00247 }
00248
00249 fPad->cd();
00250 DrawView(fPhi, fTheta, fPsi);
00251
00252 // Display the event number and title
00253 fPad->cd();
00254 char viewmode[10];
00255 viewmode[0] = '+';
00256 strcpy(viewmode+1,((MINFView *) gPad->GetView())->GetLabel());
00257 DrawTitle(strcat(viewmode,": "));
00258 CanvasRefresh();
00259 }
|
|
|
Definition at line 262 of file MINFDisplay.cxx. References CanvasRefresh(), DrawTitle(), DrawView(), fBackColor, fDrawAllViews, fPad, and SetUnZoomPad(). Referenced by Draw(). 00263 {
00264
00265 // Draw front,top,side and 30 deg views
00266 fDrawAllViews = kTRUE;
00267 fPad->cd();
00268 fPad->SetFillColor(fBackColor);
00269 fPad->Clear();
00270 fPad->Divide(2,2);
00271
00272 // draw 30 deg view
00273 fPad->cd(1);
00274 //rwh:old_orientation
00275 DrawView(60, 150, 170);
00276 // DrawView(150, 150, 90);
00277 DrawTitle();
00278
00279 // draw front view
00280 fPad->cd(2);
00281 DrawView(90, 180, 0);
00282 DrawTitle("Front");
00283
00284 // draw top view
00285 fPad->cd(3);
00286 DrawView(90, 90, 90);
00287 DrawTitle("Top");
00288
00289 // draw side view
00290 fPad->cd(4);
00291 DrawView(180, 90, 90);
00292 DrawTitle("Side");
00293
00294 fPad->cd(1);
00295 CanvasRefresh();
00296 SetUnZoomPad(0); // Reset UnZoomPad
00297 }
|
|
|
Definition at line 300 of file MINFDisplay.cxx. References MINFast::Detectors(), MINFDetector::DisplayList(), fHitsCuts, MINFPoints::GetParticle(), gMINFast, MINFDetector::IsActive(), and MINFDetector::Points(). Referenced by DrawView(). 00301 {
00302
00303 // Draw hits for all MINFast detectors
00304 Int_t ntracks,track;
00305 const GParticle *particle;
00306 TObjArray *points;
00307 MINFPoints *pm;
00308
00309 TIter next(gMINFast->Detectors());
00310 MINFDetector *detector;
00311 fHitsCuts = 0;
00312 while ((detector = (MINFDetector *) next())) {
00313 if (!detector->IsActive()) continue;
00314
00315 TIter next(detector->DisplayList());
00316 TObject *dispobj;
00317 while ((dispobj = (TObject *) next())) dispobj->Draw();
00318
00319 points = detector->Points();
00320 if (!points) continue;
00321 ntracks = points->GetEntriesFast();
00322
00323 for (track=0; track<ntracks; track++) {
00324 pm = (MINFPoints *) points->UncheckedAt(track);
00325 if (!pm) continue;
00326 particle = pm->GetParticle();
00327 if (!particle) continue;
00328 pm->Draw();
00329 fHitsCuts += pm->GetN();
00330 }
00331 }
00332 }
|
|
|
Definition at line 335 of file MINFDisplay.cxx. References fHitsCuts, MINFHeader::GetEvent(), MINFast::GetHeader(), MINFHeader::GetRun(), gMINFast, option, and MINFast::Particles(). Referenced by Draw(), and DrawAllViews(). 00336 {
00337
00338 // Draw the event title
00339 Double_t xmin = gPad->GetX1();
00340 Double_t xmax = gPad->GetX2();
00341 Double_t ymin = gPad->GetY1();
00342 Double_t ymax = gPad->GetY2();
00343 Double_t dx = xmax-xmin;
00344 Double_t dy = ymax-ymin;
00345
00346 if (option[0]=='+') {
00347 }
00348
00349 if (option[0]=='+' || strlen(option)==0) {
00350 TPaveText *title = new TPaveText(xmin +0.01*dx, ymax-0.09*dy,
00351 xmin +0.55*dx, ymax-0.01*dy);
00352 title->SetBit(kCanDelete);
00353 title->SetFillColor(42);
00354 title->Draw();
00355
00356 char ptitle[100];
00357 const char *viewmode = "";
00358 if (option[0]=='+') viewmode = option+1;
00359
00360 sprintf(ptitle,"%s MINFast Run: %d, Event: %d", viewmode,
00361 gMINFast->GetHeader()->GetRun(),
00362 gMINFast->GetHeader()->GetEvent());
00363 title->AddText(ptitle);
00364 Int_t nparticles = gMINFast->Particles()->GetEntriesFast();
00365 sprintf(ptitle,"Nparticles = %d Nhits = %d",
00366 nparticles, fHitsCuts);
00367 title->AddText(ptitle);
00368 }
00369 else {
00370 TPaveLabel *label =
00371 new TPaveLabel(xmin +0.01*dx, ymax-0.07*dy,
00372 xmin +0.2*dx, ymax-0.01*dy,option);
00373 label->SetBit(kCanDelete);
00374 label->SetFillColor(42);
00375 label->Draw();
00376 }
00377 }
|
|
||||||||||||||||
|
Definition at line 380 of file MINFDisplay.cxx. References DrawHits(), fBackColor, fXcenter, fXrange, fYcenter, fYrange, fZcenter, fZrange, MINFast::GetGeometry(), and gMINFast. Referenced by Draw(), and DrawAllViews(). 00381 {
00382
00383 // Draw a view of MINFast
00384 gPad->SetCursor(kWatch);
00385 gPad->SetFillColor(fBackColor);
00386 gPad->Clear();
00387
00388 // Get VHall size from MINFast Geometry.
00389 //gmi TBRIK *vhall = (TBRIK *)
00390 //gmi gMINFast->GetGeometry()->GetNode("VHall")->GetShape();
00391
00392 Int_t iret = 0;
00393
00394 MINFView *view = new MINFView(fXcenter, fYcenter, fZcenter,
00395 fXrange, fYrange, fZrange,
00396 phi, theta, psi);
00397
00398 // Display MINFast Geometry
00399 gMINFast->GetGeometry()->Draw("same");
00400
00401 // Loop on all detectors to add their products to the pad
00402 DrawHits();
00403
00404 // add itself to the list (must be last)
00405 AppendPad();
00406
00407 view->SetView(phi, theta, psi, iret);
00408
00409 gPad->SetTheta(90-theta);
00410 gPad->SetPhi(-90-phi);
00411 }
|
|
|
Definition at line 414 of file MINFDisplay.cxx. 00415 {
00416
00417 // Draw current view using OPENGL
00418 TPad *pad = (TPad *) gPad->GetPadSave();
00419 pad->cd();
00420 TView *view = pad->GetView();
00421 if (!view) return;
00422 pad->x3d("OPENGL");
00423 }
|
|
|
Definition at line 426 of file MINFDisplay.cxx. 00427 {
00428
00429 // Draw current view using X3D
00430 TPad *pad = (TPad *) gPad->GetPadSave();
00431 pad->cd();
00432 TView *view = pad->GetView();
00433 if (!view) return;
00434 pad->x3d();
00435 }
|
|
|
Definition at line 438 of file MINFDisplay.cxx. References MINFast::Detectors(), Draw(), MINFDetector::Enable(), and gMINFast. 00439 {
00440
00441 // Enable detector name in graphics views
00442 MINFDetector *detector =
00443 (MINFDetector *) gMINFast->Detectors()->FindObject(name);
00444 if (!detector) return;
00445 detector->Enable();
00446 Draw();
00447 }
|
|
||||||||||||||||
|
Definition at line 450 of file MINFDisplay.cxx. References MINFView::SaveView(), SetUnZoomPad(), MINFView::SetViewMode(), and MINFView::Zoom(). 00451 {
00452 static Int_t px0, py0;
00453 static Int_t linedrawn;
00454 static Double_t x0, y0, x1, y1;
00455 static Int_t pxold, pyold;
00456
00457 if (fZoomMode) {
00458 if (event == kMouseMotion) {
00459 gPad->SetCursor(kCross);
00460 }
00461
00462 if (event == kButton1Down) {
00463 MINFView *view = (MINFView *) gPad->GetView();
00464 if (view) {
00465 view->SaveView(); // Need to revise pavelabel here.
00466 view->SetViewMode();
00467 }
00468 linedrawn = 0;
00469 gPad->cd();
00470 pxold = px;
00471 pyold = py;
00472 px0 = px;
00473 py0 = py;
00474 x0 = gPad->AbsPixeltoX(px);
00475 y0 = gPad->AbsPixeltoY(py);
00476 x0 = (x0>1.) ? 1. : x0;
00477 x0 = (x0<-1.) ? -1. : x0;
00478 y0 = (y0>1.) ? 1. : y0;
00479 y0 = (y0<-1.) ? -1. : y0;
00480 }
00481
00482 if (event == kButton1Motion) {
00483 if (linedrawn) gVirtualX->DrawBox(px0, py0, pxold, pyold,
00484 TVirtualX::kHollow);
00485 pxold = px;
00486 pyold = py;
00487 linedrawn = 1;
00488 gVirtualX->DrawBox(px0, py0, pxold, pyold, TVirtualX::kHollow);
00489 return;
00490 }
00491
00492 if (event == kButton1Up) {
00493 gPad->GetCanvas()->FeedbackMode(kFALSE);
00494 gPad->cd();
00495
00496 if (px == px0) return;
00497 if (py == py0) return;
00498 x1 = gPad->AbsPixeltoX(px);
00499 y1 = gPad->AbsPixeltoY(py);
00500
00501 x1 = (x1>1.) ? 1. : x1;
00502 x1 = (x1<-1.) ? -1. : x1;
00503 y1 = (y1>1.) ? 1. : y1;
00504 y1 = (y1<-1.) ? -1. : y1;
00505
00506 Double_t temp;
00507 if (x1 < x0) {temp = x0; x0 = x1; x1 = temp;}
00508 if (y1 < y0) {temp = y0; y0 = y1; y1 = temp;}
00509
00510 Double_t NewScalex, NewScaley;
00511 Double_t Xoffset;
00512 Double_t Yoffset;
00513 Double_t X1, Y1, X2, Y2;
00514 X1 = gPad->GetX1();
00515 Y1 = gPad->GetY1();
00516 X2 = gPad->GetX2();
00517 Y2 = gPad->GetY2();
00518
00519 NewScalex = (x1 - x0) / (X2 - X1);
00520 NewScaley = (y1 - y0) / (Y2 - Y1);
00521
00522 Xoffset = (x0+x1-X1-X2) / (0.58*(X2-X1));
00523 Yoffset = (y0+y1-Y1-Y2) / (0.58*(Y2-Y1));
00524
00525 MINFView *view = (MINFView *) gPad->GetView();
00526
00527 view->Zoom(Xoffset, Yoffset, NewScalex, NewScaley);
00528 SetUnZoomPad(gPad);
00529
00530 gPad->Modified(kTRUE);
00531 }
00532 }
00533
00534 else {
00535 MINFView *view = (MINFView *) gPad->GetView();
00536 if (view) {
00537 view->ExecuteRotateView(event, px, py);
00538 }
00539 }
00540 }
|
|
|
Definition at line 79 of file MINFDisplay.h. 00079 {return fBackColor;}
|
|
|
Definition at line 80 of file MINFDisplay.h. Referenced by MINFScript::init(), MINFile::openREROOTFile(), and MINFScript::SetScriptFileName(). 00080 {return fMINFGUIPanel;}
|
|
|
Definition at line 81 of file MINFDisplay.h. Referenced by MINFControlFrame::ToggleZoomPickMode(). 00081 {return fZoomMode;}
|
|
|
Definition at line 543 of file MINFDisplay.cxx. References MINFast::Detectors(), MINFast::GetNtrack(), gMINFast, MINFDetector::LoadPoints(), and MINFast::ResetPoints(). Referenced by ShowEvent(). 00544 {
00545
00546 // Read hits info and store x,y,z info in arrays fPoints.
00547 // Loop on all detectors.
00548 gMINFast->ResetPoints();
00549 TIter next(gMINFast->Detectors());
00550 MINFDetector *detector;
00551 Int_t ntracks = gMINFast->GetNtrack();
00552 for (Int_t track=0; track<ntracks; track++) {
00553 //gmigMINFast->ResetHits();
00554 //gmigMINFast->TreeH()->GetEvent(track);
00555 while ((detector = (MINFDetector *) next())) {
00556 detector->LoadPoints(track);
00557 }
00558 next.Reset();
00559 }
00560 }
|
|
|
Definition at line 83 of file MINFDisplay.h. 00083 {return fPad;}
|
|
|
Definition at line 563 of file MINFDisplay.cxx. 00564 {
00565
00566 // Paint miscellaneous items
00567 }
|
|
|
Definition at line 570 of file MINFDisplay.cxx. References gMINFast, and MINFast::RunScript(). 00571 {
00572 TPad *pad = (TPad *) gPad->GetPadSave();
00573 pad->cd();
00574 gMINFast->RunScript();
00575 }
|
|
|
Definition at line 86 of file MINFDisplay.h. References fBackColor. 00087 {fBackColor=color;} // *MENU*
|
|
||||||||||||||||
|
Definition at line 602 of file MINFDisplay.cxx. References fXcenter, fYcenter, and fZcenter. Referenced by MINFast::GetEvent(). 00603 {
00604
00605 // Set center
00606 fXcenter = xcenter;
00607 fYcenter = ycenter;
00608 fZcenter = zcenter;
00609
00610 }
|
|
|
Definition at line 88 of file MINFDisplay.h. References fDrawHits. 00088 {fDrawHits=draw;}
|
|
|
Definition at line 90 of file MINFDisplay.h. References fDrawParticles. 00091 {fDrawParticles=draw;} // *MENU*
|
|
|
Definition at line 578 of file MINFDisplay.cxx. References fZoomMode. Referenced by MINFControlFrame::ToggleZoomPickMode(). 00579 {
00580 fZoomMode = 0;
00581 }
|
|
||||||||||||
|
Definition at line 590 of file MINFDisplay.cxx. References fRrange, fXrange, fYrange, and fZrange. Referenced by MINFast::GetEvent(), and MINFDisplay(). 00591 {
00592
00593 // Set view range along R and Z
00594 fRrange = rrange;
00595 fXrange = rrange;
00596 fYrange = rrange;
00597
00598 fZrange = zrange;
00599 }
|
|
|
Definition at line 628 of file MINFDisplay.cxx. References fUnZoomPad. Referenced by Draw(), DrawAllViews(), ExecuteEvent(), MINFDisplayFrame::SetUnZoomPad(), and UnZoom(). 00629 {
00630 fUnZoomPad = pad;
00631 }
|
|
||||||||||||||||
|
Definition at line 613 of file MINFDisplay.cxx. References Draw(), fDrawAllViews, fPad, fPhi, fPsi, and fTheta. 00614 {
00615
00616 // change viewing angles for current event
00617 fPad->cd();
00618 fDrawAllViews = kFALSE;
00619 fPhi = phi;
00620 fTheta = theta;
00621 fPsi = psi;
00622
00623 fPad->Clear();
00624 Draw();
00625 }
|
|
|
Definition at line 584 of file MINFDisplay.cxx. References fZoomMode. Referenced by MINFControlFrame::ToggleZoomPickMode(). 00585 {
00586 fZoomMode = 1;
00587 }
|
|
|
Definition at line 634 of file MINFDisplay.cxx. References Draw(), fPad, and LoadPoints(). Referenced by MINFast::GetAndShowEvent(). 00635 {
00636 LoadPoints();
00637 fPad->cd();
00638 Draw();
00639 }
|
|
|
Definition at line 642 of file MINFDisplay.cxx. References MINFast::GetAndShowEvent(), MINFHeader::GetEventRecord(), MINFast::GetHeader(), gMINFast, and MINFast::TreeH(). 00643 {
00644
00645 // Display (current event_number+delta)
00646 // delta = 1 show next event
00647 // delta = -1 show previous event
00648
00649 if (delta) {
00650 gMINFast->Clear();
00651 Int_t current_event = gMINFast->GetHeader()->GetEventRecord();
00652 Int_t new_event = current_event + delta;
00653
00654 gMINFast->GetAndShowEvent(new_event);
00655 if (!gMINFast->TreeH()) return;
00656 }
00657 }
|
|
|
Definition at line 660 of file MINFDisplay.cxx. References Draw(), MINFast::GetGeometry(), and gMINFast. 00661 {
00662
00663 // Toggle disable of steel outline from graphics views
00664 TNode *Nodehall = gMINFast->GetGeometry()->GetNode("VHall");
00665 TList *inhall = Nodehall->GetListOfNodes();
00666 TIter next(inhall);
00667 TNode *node;
00668 while ((node = (TNode*)next())) {
00669
00670 const char *name = node->GetName();
00671 TString namestring = name;
00672
00673 if (namestring.Contains("FullActive") ||
00674 namestring.Contains("PartialActive") ) {
00675
00676 Int_t vis = node->GetVisibility();
00677 // toggle 0->1 1->0 new =
00678 switch (vis) {
00679 case 0: vis = 1; break;
00680 case 1: vis = 0; break;
00681 }
00682 node->SetVisibility(vis);
00683 }
00684 }
00685 Draw();
00686 }
|
|
|
Definition at line 689 of file MINFDisplay.cxx. References Draw(), MINFast::GetGeometry(), and gMINFast. 00690 {
00691
00692 // Toggle disable of steel outline from graphics views
00693 TNode *Nodehall = gMINFast->GetGeometry()->GetNode("VHall");
00694 TList *inhall = Nodehall->GetListOfNodes();
00695 TIter next(inhall);
00696 TNode *node;
00697 while ((node = (TNode*)next())) {
00698
00699 const char *name = node->GetName();
00700 TString namestring = name;
00701
00702 if (namestring.Contains("SteelNoEars") ||
00703 namestring.Contains("SteelEars") ) {
00704
00705 Int_t vis = node->GetVisibility();
00706 // toggle 0->1 1->0 new =
00707 switch (vis) {
00708 case 0: vis = 1; break;
00709 case 1: vis = 0; break;
00710 }
00711 node->SetVisibility(vis);
00712 }
00713 }
00714 Draw();
00715 }
|
|
|
Definition at line 718 of file MINFDisplay.cxx. References CanvasRefresh(), MINFView::DeZoom(), and SetUnZoomPad(). 00719 {
00720 TVirtualPad *pad = fUnZoomPad;
00721 if (pad) {
00722 MINFView *view = (MINFView *) pad->GetView();
00723 if (view && view->DeZoom()) {
00724 pad->SetTheta(90-view->GetLatitude());
00725 pad->SetPhi(-90-view->GetLongitude());
00726 pad->Modified();
00727 CanvasRefresh();
00728 } else {
00729 SetUnZoomPad(gPad->GetPadSave());
00730 }
00731 }
00732 }
|
|
|
Definition at line 58 of file MINFDisplay.h. Referenced by DrawAllViews(), DrawView(), MINFDisplay(), and SetBackColor(). |
|
|
Definition at line 54 of file MINFDisplay.h. Referenced by CanvasRefresh(), and MINFDisplay(). |
|
|
Definition at line 38 of file MINFDisplay.h. Referenced by DrawAllViews(), MINFDisplay(), and SetView(). |
|
|
Definition at line 40 of file MINFDisplay.h. Referenced by MINFDisplay(), and SetDrawHits(). |
|
|
Definition at line 39 of file MINFDisplay.h. Referenced by MINFDisplay(), and SetDrawParticles(). |
|
|
Definition at line 57 of file MINFDisplay.h. |
|
|
Definition at line 52 of file MINFDisplay.h. Referenced by DrawHits(), DrawTitle(), and MINFDisplay(). |
|
|
Definition at line 53 of file MINFDisplay.h. Referenced by MINFDisplay(). |
|
|
Definition at line 55 of file MINFDisplay.h. Referenced by Draw(), DrawAllViews(), MINFDisplay(), SetView(), and ShowEvent(). |
|
|
Definition at line 42 of file MINFDisplay.h. Referenced by Draw(), MINFDisplay(), and SetView(). |
|
|
Definition at line 43 of file MINFDisplay.h. Referenced by Draw(), MINFDisplay(), and SetView(). |
|
|
Definition at line 44 of file MINFDisplay.h. Referenced by SetRange(). |
|
|
Definition at line 41 of file MINFDisplay.h. Referenced by Draw(), MINFDisplay(), and SetView(). |
|
|
Definition at line 56 of file MINFDisplay.h. Referenced by SetUnZoomPad(). |
|
|
Definition at line 47 of file MINFDisplay.h. Referenced by DrawView(), MINFDisplay(), and SetCenter(). |
|
|
Definition at line 50 of file MINFDisplay.h. Referenced by DrawView(), MINFDisplay(), and SetRange(). |
|
|
Definition at line 48 of file MINFDisplay.h. Referenced by DrawView(), MINFDisplay(), and SetCenter(). |
|
|
Definition at line 51 of file MINFDisplay.h. Referenced by DrawView(), MINFDisplay(), and SetRange(). |
|
|
Definition at line 49 of file MINFDisplay.h. Referenced by DrawView(), MINFDisplay(), and SetCenter(). |
|
|
Definition at line 37 of file MINFDisplay.h. Referenced by MINFDisplay(), SetPickMode(), and SetZoomMode(). |
|
|
Definition at line 45 of file MINFDisplay.h. Referenced by DrawView(), MINFDisplay(), and SetRange(). |
1.3.9.1