Public Member Functions | Private Attributes | List of all members
gar::evd::Display3DView Class Reference

View of event shoing the XZ and YZ readout planes. More...

#include <Display3DView.h>

Inheritance diagram for gar::evd::Display3DView:

Public Member Functions

 Display3DView (TGMainFrame *mf)
 
 ~Display3DView ()
 
const char * Description () const
 
const char * PrintTag () const
 
void Draw (const char *opt="")
 
void CloseWindow ()
 
void SetRawReco ()
 
void SetMCInfo ()
 

Private Attributes

Display3DPadfDisplay3DPad
 
HeaderPadfHeaderPad
 Pad showing 3D view of the detector. More...
 
MCBriefPadfMC
 Short summary of MC event. More...
 
TGCheckButton * fMCOn
 Display MC truth information. More...
 
TGRadioButton * fRawDraw
 Draw Raw information only. More...
 
TGRadioButton * fRecoDraw
 Draw Reconstructed information only. More...
 

Detailed Description

View of event shoing the XZ and YZ readout planes.

Definition at line 23 of file Display3DView.h.

Constructor & Destructor Documentation

gar::evd::Display3DView::Display3DView ( TGMainFrame *  mf)

Definition at line 26 of file Display3DView.cxx.

27  : evdb::Canvas(mf)
28  , fMCOn (nullptr)
29  , fRawDraw (nullptr)
30  , fRecoDraw (nullptr)
31  {
34 
35  fHeaderPad = new HeaderPad ("fHeaderPad", "Header", 0.00, 0.00, 0.15, 0.13, "");
36  evdb::Canvas::fCanvas->cd();
37 
38  fMC = new MCBriefPad("fMCPad", "MC Info.", 0.15, 0.13, 1.00, 0.17, "");
39 
40  evdb::Canvas::fCanvas->cd();
41  fHeaderPad->Draw();
42 
43  evdb::Canvas::fCanvas->cd();
44  fMC->Draw();
45 
46  if(evdlayoutopt->fEnableMCTruthCheckBox){
47  fMCOn = new TGCheckButton(fFrame,"MC Truth",5);
48  fMCOn->Connect("Clicked()", "gar::evd::Display3DView", this, "SetMCInfo()");
49  if(sdo->fShowMCTruthText == 1) fMCOn->SetState(kButtonDown);
50  }
51 
52  // radio buttons to toggle drawing raw vs calibrated information
53  fRecoDraw = new TGRadioButton(fFrame,"Reconstructed", 3);
54  fRawDraw = new TGRadioButton(fFrame,"Raw", 4);
55  fRawDraw ->Connect("Clicked()", "gar::evd::Display3DView", this, "SetRawReco()");
56  fRecoDraw ->Connect("Clicked()", "gar::evd::Display3DView", this, "SetRawReco()");
57 
58  if(evdlayoutopt->fEnableMCTruthCheckBox){
59  fFrame->AddFrame(fMCOn, new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1 ) );
60  }
61  fFrame->AddFrame(fRecoDraw, new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1 ) );
62  fFrame->AddFrame(fRawDraw, new TGLayoutHints(kLHintsBottom | kLHintsRight, 0, 0, 5, 1 ) );
63  evdb::Canvas::fCanvas->cd();
64  fDisplay3DPad = new Display3DPad("fDisplay3DPad","3D Display",
65  0.0, 0.0, 1.0, 1.0, "");
66 
67  this->Connect("CloseWindow()",
68  "gar::evd::Display3DView",
69  this,
70  "CloseWindow()");
71 
73 
74  evdb::Canvas::fCanvas->Update();
75  }
int fEnableMCTruthCheckBox
1 to have the check box appear, 0 otherwise
Display3DPad * fDisplay3DPad
Definition: Display3DView.h:42
void Draw(const char *opt="")
Definition: HeaderPad.cxx:44
TGRadioButton * fRecoDraw
Draw Reconstructed information only.
Definition: Display3DView.h:47
HeaderPad * fHeaderPad
Pad showing 3D view of the detector.
Definition: Display3DView.h:43
TGRadioButton * fRawDraw
Draw Raw information only.
Definition: Display3DView.h:46
TGCheckButton * fMCOn
Display MC truth information.
Definition: Display3DView.h:45
MCBriefPad * fMC
Short summary of MC event.
Definition: Display3DView.h:44
gar::evd::Display3DView::~Display3DView ( )

Definition at line 78 of file Display3DView.cxx.

79  {
80  if (fHeaderPad) { delete fHeaderPad; fHeaderPad = nullptr; }
81  if (fMC) { delete fMC; fMC = nullptr; }
82  }
HeaderPad * fHeaderPad
Pad showing 3D view of the detector.
Definition: Display3DView.h:43
MCBriefPad * fMC
Short summary of MC event.
Definition: Display3DView.h:44

Member Function Documentation

void gar::evd::Display3DView::CloseWindow ( )

Definition at line 85 of file Display3DView.cxx.

86  {
87  delete this;
88  }
const char* gar::evd::Display3DView::Description ( ) const
inline

Definition at line 33 of file Display3DView.h.

33 { return "3D Detector Display"; }
void gar::evd::Display3DView::Draw ( const char *  opt = "")

Definition at line 91 of file Display3DView.cxx.

92  {
93 
95  evdb::Canvas::fCanvas->Update();
96 
97  TVirtualViewer3D *viewer = fDisplay3DPad->Pad()->GetViewer3D("pad");
98  viewer->PreferLocalFrame();
99  viewer->ResetCameras();
100  viewer->PadPaint(fDisplay3DPad->Pad());
101 
102  }
Display3DPad * fDisplay3DPad
Definition: Display3DView.h:42
const char* gar::evd::Display3DView::PrintTag ( ) const
inline

Definition at line 34 of file Display3DView.h.

34 { return "duneNDMPD3d"; }
void gar::evd::Display3DView::SetMCInfo ( )

Definition at line 136 of file Display3DView.cxx.

137  {
139 
140  //TGButton *b = (TGButton *)gTQSender;
141  //int id = b->WidgetId();
142  // set button states TODO
143 
144  TVirtualPad *ori = gPad;
145 
146  evdb::Canvas::fCanvas->cd();
147  evdb::Canvas::fCanvas->Modified();
148  evdb::Canvas::fCanvas->Update();
149 
150  ori->cd();
151 
152  return;
153  }
void gar::evd::Display3DView::SetRawReco ( )

Definition at line 105 of file Display3DView.cxx.

106  {
108 
109  TGButton *b = (TGButton *)gTQSender;
110  int id = b->WidgetId();
111 
112  // id values are set in lines 41 - 42
113  if(id == 4){
114  rawopt->fDrawRawOrReco = 0;
115  fRawDraw->SetState(kButtonDown);
116  fRecoDraw->SetState(kButtonUp);
117  }
118  else if(id == 3){
119  rawopt->fDrawRawOrReco = 1;
120  fRawDraw->SetState(kButtonUp);
121  fRecoDraw->SetState(kButtonDown);
122  }
123 
124  TVirtualPad *ori = gPad;
125 
126  evdb::Canvas::fCanvas->cd();
127  evdb::Canvas::fCanvas->Modified();
128  evdb::Canvas::fCanvas->Update();
129 
130  ori->cd();
131 
132  return;
133  }
TGRadioButton * fRecoDraw
Draw Reconstructed information only.
Definition: Display3DView.h:47
TGRadioButton * fRawDraw
Draw Raw information only.
Definition: Display3DView.h:46
static bool * b
Definition: config.cpp:1043

Member Data Documentation

Display3DPad* gar::evd::Display3DView::fDisplay3DPad
private

Definition at line 42 of file Display3DView.h.

HeaderPad* gar::evd::Display3DView::fHeaderPad
private

Pad showing 3D view of the detector.

Show header information

Definition at line 43 of file Display3DView.h.

MCBriefPad* gar::evd::Display3DView::fMC
private

Short summary of MC event.

Definition at line 44 of file Display3DView.h.

TGCheckButton* gar::evd::Display3DView::fMCOn
private

Display MC truth information.

Definition at line 45 of file Display3DView.h.

TGRadioButton* gar::evd::Display3DView::fRawDraw
private

Draw Raw information only.

Definition at line 46 of file Display3DView.h.

TGRadioButton* gar::evd::Display3DView::fRecoDraw
private

Draw Reconstructed information only.

Definition at line 47 of file Display3DView.h.


The documentation for this class was generated from the following files: