ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Viewer Class Reference

#include <trackplotter.h>

Inheritance diagram for Viewer:
Collaboration diagram for Viewer:

Public Member Functions

 Viewer (const TGWindow *win, PlotValNtuple *ntuplePlotter)
 
virtual ~Viewer ()
 
void DoButton ()
 
void DoRadioButton ()
 
void DoSlider ()
 
void DoCheckButton ()
 
void SetRange (Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax, Bool_t move_slider=kTRUE)
 

Private Attributes

PlotValNtuplem_ntuplePlotter
 
bool m_singleTrackMode
 
bool m_equalScaling
 
bool m_showDAFinfo
 
TList * fCleanup
 
TCanvas * fCanvas
 
TRootEmbeddedCanvas * fMainEmbeddedCanvas
 
TRootEmbeddedCanvas * fHScaleCanvas
 
TRootEmbeddedCanvas * fVScaleCanvas
 
TGaxis * fHScale
 
TGaxis * fVScale
 
TGDoubleSlider * fHSlider
 
TGDoubleSlider * fVSlider
 
TGRadioButton * fRadioSingleTrackMode [2]
 

Detailed Description

Definition at line 23 of file trackplotter.h.

Constructor & Destructor Documentation

◆ Viewer()

Viewer::Viewer ( const TGWindow *  win,
PlotValNtuple ntuplePlotter 
)

Definition at line 32 of file trackplotter.cxx.

32  : TGMainFrame(win,800,800),
33  //m_trackNtuple(trackNtuple),
34  //m_rioNtuple(rioNtuple),
35  m_ntuplePlotter(ntuplePlotter),
36  //m_entryNumber(0),
37  m_singleTrackMode(true),
38  m_equalScaling(false),
39  m_showDAFinfo(false) {
40  const UInt_t max_size = 800;
41 
42  // Memory management isn't the best in this class, but make a half
43  // hearted attempts not to gush too much....
44  fCleanup = new TList;
45 
46  TGCompositeFrame *table = new TGCompositeFrame(this,350,350,kSunkenFrame);
47  fCleanup->Add(table);
48 
49  TGTableLayout* tlo = new TGTableLayout(table, 10, 6);
50  //TGTableLayout* tlo = new TGTableLayout(table, 9, 6);
51  table->SetLayoutManager(tlo);
52  TGLayoutHints* loh = new TGLayoutHints(kLHintsTop|kLHintsLeft|
53  kLHintsExpandX|kLHintsExpandY);
54  AddFrame(table,loh);
55 
56  TGTableLayoutHints* tloh;
57 
58  // The Canvas
60  new TRootEmbeddedCanvas("Shapes",table,max_size,max_size);
61  tloh = new TGTableLayoutHints(2,5,2,6,
62  kLHintsExpandX|kLHintsExpandY |
63  kLHintsShrinkX|kLHintsShrinkY |
64  kLHintsFillX|kLHintsFillY);
65  table->AddFrame(fMainEmbeddedCanvas,tloh);
66 
67  fCanvas = fMainEmbeddedCanvas->GetCanvas();
68 
69  // The sliders
70  fHSlider = new TGDoubleHSlider(table,max_size,kDoubleScaleBoth,100,
71  kHorizontalFrame,GetDefaultFrameBackground(),
72  kFALSE, kTRUE);
73 
74  tloh = new TGTableLayoutHints(2,5,0,1,
75  kLHintsExpandX|kLHintsShrinkX|kLHintsFillX);
76  table->AddFrame(fHSlider,tloh);
77  fHSlider->Connect("PositionChanged()","Viewer",this,"DoSlider()");
78 
79  fVSlider = new TGDoubleVSlider(table,max_size,kDoubleScaleBoth,200,
80  kVerticalFrame,GetDefaultFrameBackground(),
81  kTRUE,kTRUE);
82  Float_t RangeMin=-1100.; Float_t RangeMax=1100.;
83  fVSlider->SetRange(RangeMin, RangeMax);
84  fHSlider->SetRange(RangeMin, RangeMax);
85  tloh = new TGTableLayoutHints(0,1,2,6,
86  kLHintsExpandY|kLHintsShrinkY|kLHintsFillY);
87  table->AddFrame(fVSlider,tloh);
88  fVSlider->Connect("PositionChanged()","Viewer",this,"DoSlider()");
89 
90  // The scales
92  new TRootEmbeddedCanvas("H Scale",table,max_size,50);
93  tloh = new TGTableLayoutHints(2,5,1,2,
94  kLHintsExpandX|kLHintsShrinkX|kLHintsFillX);
95  table->AddFrame(fHScaleCanvas,tloh);
96  fHScaleCanvas->GetCanvas()->cd();
97 
98  fHScaleCanvas->GetCanvas()->Range(0,0,1,1);
99  fHScale = new TGaxis(0.0,0.5, 1.0,0.5, 0.0,100.0, 510, "-");
100  fHScale->SetLabelSize(0.4);
101  fHScale->SetName("X Scale");
102  fHScale->Draw();
103  fHScaleCanvas->GetCanvas()->SetEditable(kFALSE);
104 
105  fVScaleCanvas =
106  new TRootEmbeddedCanvas("V Scale",table,50,max_size);
107  tloh = new TGTableLayoutHints(1,2,2,6,
108  kLHintsExpandY|kLHintsShrinkY|kLHintsFillY);
109  table->AddFrame(fVScaleCanvas,tloh);
110  fVScaleCanvas->GetCanvas()->cd();
111 
112  fVScaleCanvas->GetCanvas()->Range(0,0,1,1);
113  fVScale = new TGaxis(0.5,0.0, 0.50001,1.0, 0.0,100.0, 510, "-");
114  fVScale->SetLabelSize(0.4);
115  fVScale->SetName("Y Scale");
116  fVScale->Draw();
117  fVScaleCanvas->GetCanvas()->SetEditable(kFALSE);
118 
119  // Call this after scales/sliders are setup
120  SetRange(-1100,-1100,1100,1100);
121 
122  // The shape buttons
123  const char* shape_button_name[] = {
124  "Barrel", "EndCap", "", "", "Zoom Out", "Zoom In", "Close"
125  };
126  UInt_t ind;
127  for (ind = 0; ind < 7; ++ind) {
128  TGTextButton* button =
129  new TGTextButton(table,shape_button_name[ind],ind);
130  tloh = new TGTableLayoutHints(5,6,ind+2,ind+1+2,
131  kLHintsExpandX|kLHintsExpandY |
132  kLHintsShrinkX|kLHintsShrinkY |
133  kLHintsFillX|kLHintsFillY);
134  table->AddFrame(button,tloh);
135  button->Resize(100,button->GetDefaultHeight());
136  button->Connect("Clicked()","Viewer",this,"DoButton()");
137  }
138 
139  const char* ctrl_button_name[2][3] = {{"Prev", "Next", ""},
140  { "Create EPS File" , "Create PNG File", "Reset View" }};
141  // { "W" , "C", "E" },
142  // { "SW", "S", "SE" }
143 
144  UInt_t indx, indy;
145  for (indx = 0; indx < 3; ++indx) {
146  for (indy = 0; indy < 2; ++indy) {
147 
148  TGTextButton* button = new TGTextButton(table,
149  ctrl_button_name[indy][indx],
150  (indy+1)*10 + indx +1);
151  tloh = new TGTableLayoutHints(indx+2,indx+1+2, 6+indy,6+indy+1,
152  kLHintsExpandX|kLHintsExpandY |
153  kLHintsShrinkX|kLHintsShrinkY |
154  kLHintsFillX|kLHintsFillY);
155  table->AddFrame(button,tloh);
156  button->Resize(100,button->GetDefaultHeight());
157  button->Connect("Clicked()","Viewer",this,"DoButton()");
158  }
159  }
160  //--------- radio buttons for mode
161 
162  //TGLayoutHints *fL3, *fL4;
163  //TGRadioButton *fR[2];
164  TGGroupFrame *fG2 = new TGGroupFrame(table, new TGString("DisplayMode"),kVerticalFrame|kRaisedFrame);
165 
166  TGLayoutHints* fL4 = new TGLayoutHints(kLHintsTop | kLHintsLeft,
167  0, 0, 5, 0);
168 // fL3 = new TGLayoutHints(kLHintsTop | kLHintsLeft |
169 // kLHintsExpandX | kLHintsExpandY,
170 // 2, 2, 2, 2);
171 
172  fRadioSingleTrackMode[0] = new TGRadioButton(fG2, new TGHotString("single track mode"), 21);
173  fRadioSingleTrackMode[1] = new TGRadioButton(fG2, new TGHotString("event mode"), 22);
174 
175  for (int i = 0; i < 2; ++i) {
176  fG2->AddFrame(fRadioSingleTrackMode[i], fL4);
177  //fR[i]->Associate(this);
178  fRadioSingleTrackMode[i]->Connect("Clicked()","Viewer",this,"DoRadioButton()");
179  }
180 
181  fRadioSingleTrackMode[0]->SetState(kButtonDown);
182  TGTableLayoutHints* RadioFrameLayoutHint = new TGTableLayoutHints(3,4, 9, 10,
183  kLHintsExpandX|kLHintsExpandY |
184  kLHintsShrinkX|kLHintsShrinkY |
185  kLHintsFillX|kLHintsFillY);
186  //table->AddFrame(fG2, new TGLayoutHints(kLHintsLeft | kLHintsTop,0,1,5,5));*/
187  table->AddFrame(fG2, RadioFrameLayoutHint);
188 
189  //--------- check buttons for whatever (options)
190  TGGroupFrame *fCheckGroup = new TGGroupFrame(table, new TGString("Options"),kVerticalFrame|kRaisedFrame);
191 
192  TGLayoutHints* CheckButtonsLayoutHint = new TGLayoutHints(kLHintsTop | kLHintsLeft,
193  0, 0, 5, 0);
194  TGCheckButton* checkEqualScaling = new TGCheckButton(fCheckGroup, new TGHotString("equal scaling along axis"), 21);
195  checkEqualScaling->SetState(kButtonUp);
196  TGCheckButton* checkAssgnProbs = new TGCheckButton(fCheckGroup, new TGHotString("show assgn probs for DAF tracks"), 22);
197  checkAssgnProbs->SetState(kButtonUp);
198 
199  fCheckGroup->AddFrame(checkEqualScaling, CheckButtonsLayoutHint);
200  checkEqualScaling->Connect("Clicked()","Viewer",this,"DoCheckButton()");
201  fCheckGroup->AddFrame(checkAssgnProbs, CheckButtonsLayoutHint);
202  checkAssgnProbs->Connect("Clicked()","Viewer",this,"DoCheckButton()");
203 
204  TGTableLayoutHints* CheckFrameLayoutHint = new TGTableLayoutHints(4,5, 9, 10,
205  kLHintsExpandX|kLHintsExpandY |
206  kLHintsShrinkX|kLHintsShrinkY |
207  kLHintsFillX|kLHintsFillY);
208  table->AddFrame(fCheckGroup, CheckFrameLayoutHint);
209 
210  table->Layout();
211 
212  // exit on close window
213  Connect("CloseWindow()","TApplication",gApplication,"Terminate(=0)");
214 
215  MapSubwindows();
216  Layout();
217  MapWindow();
218 
219 /* // get the ntuple now
220  char *filename = new char[80];
221  filename = "TrkValidation.root";
222  TFile *f = new TFile(filename);
223  if (!f) {
224  std::cout << "ERROR: could not find " << filename << std::endl;
225  //return 1;
226  } else {
227  f->cd("TrkValidation.root:/FitterValidation");
228  //}
229  TTree *tree = (TTree*)gDirectory->Get("OutputTrack");
230  if (!tree) {
231  std::cout << "ERROR: could not get the tree." << std::endl;
232  //return 1;
233  } else {
234  //int numberOfEntries = tree->GetEntriesFast();
235  // get the ntuple with the track data
236  m_trackNtuple = new TrackDataNtupleTree(tree);*/
237  //m_ntuplePlotter = new PlotValNtuple();
238 /* }
239  }*/
240 
241 }

◆ ~Viewer()

Viewer::~Viewer ( )
virtual

Definition at line 243 of file trackplotter.cxx.

243  {
244  fCanvas->Clear();
245  delete fCanvas;
246  fCleanup->Delete();
247  delete fCleanup;
248  //delete m_trackNtuple;
249  //delete m_ntuplePlotter;
250 }

Member Function Documentation

◆ DoButton()

void Viewer::DoButton ( )

Definition at line 252 of file trackplotter.cxx.

252  {
253  TGButton* button = (TGButton*)gTQSender;
254  UInt_t id = button->WidgetId();
255 
256  double xmin, ymin, xmax, ymax;
257  double xdiff, ydiff;
258  fCanvas->GetRange(xmin,ymin,xmax,ymax);
259  xdiff = xmax - xmin;
260  ydiff = ymax - ymin;
261 
262  fCanvas->cd();
263  //fprintf(stdout, "Button ID: %d \n", int(id));
264  switch (id) {
265  case 0: // Barrel view
266  if (m_ntuplePlotter) {
268  fCanvas->Clear();
269  Float_t RangeMin=-1100.; Float_t RangeMax=1100.;
270  fVSlider->SetRange(RangeMin, RangeMax);
271  fHSlider->SetRange(RangeMin, RangeMax);
272  SetRange(-1100., -1100., 1100., 1100.);
273 
274  if (!m_singleTrackMode) {
275  std::vector<TObject*>* rioObjects = m_ntuplePlotter->getRIOGraphics();
276  std::vector<TObject*>::const_iterator rioit = rioObjects->begin();
277  //std::cout << "Got " << rioObjects.size() << " graphic objects for RIOs "<< std::endl;
278  for( ; rioit!=rioObjects->end();++rioit) {
279  (*rioit)->Draw();
280  }
281  }
282  std::vector<TObject*>* trackObjects = m_ntuplePlotter->getTrackGraphics();
283  std::vector<TObject*>::const_iterator oit = trackObjects->begin();
284  for( ; oit!=trackObjects->end();++oit) {
285  (*oit)->Draw();
286  }
287  if (m_showDAFinfo){
288  std::vector<TObject*>* compRotObjects = m_ntuplePlotter->getCompetingROTsGraphics();
289  oit = compRotObjects->begin();
290  for( ; oit!=compRotObjects->end();++oit) {
291  (*oit)->Draw();
292  }
293  }
294 
295  fCanvas->Modified();
296  fCanvas->Update();
297  }
298  break;
299  case 1: // Endcap view
300  if (m_ntuplePlotter) {
302  fCanvas->Clear();
303  fVSlider->SetRange(-3500., 3500.);
304  fHSlider->SetRange(-2700., 2700.);
305  SetRange(-2700., -3500., 2700., 3500.);
306 
307  if (!m_singleTrackMode) {
308  std::vector<TObject*>* rioObjects = m_ntuplePlotter->getRIOGraphics();
309  std::vector<TObject*>::const_iterator rioit = rioObjects->begin();
310  //std::cout << "Got " << rioObjects.size() << " graphic objects for RIOs "<< std::endl;
311  for( ; rioit!=rioObjects->end();++rioit) {
312  (*rioit)->Draw();
313  }
314  }
315  std::vector<TObject*>* trackObjects = m_ntuplePlotter->getTrackGraphics();
316  std::vector<TObject*>::const_iterator oit = trackObjects->begin();
317  for( ; oit!=trackObjects->end();++oit) {
318  (*oit)->Draw();
319  }
320  if (m_showDAFinfo){
321  std::vector<TObject*>* compRotObjects = m_ntuplePlotter->getCompetingROTsGraphics();
322  oit = compRotObjects->begin();
323  for( ; oit!=compRotObjects->end();++oit) {
324  (*oit)->Draw();
325  }
326  }
327 
328  fCanvas->Modified();
329  fCanvas->Update();
330  }
331  break;
332  case 4: // Zoom out
333  SetRange(xmin-xdiff*.1, ymin-ydiff*.1, xmax+xdiff*.1, ymax+ydiff*.1);
334  break;
335  case 5: // Zoom in
336  SetRange(xmin+xdiff*.1, ymin+ydiff*.1, xmax-xdiff*.1, ymax-ydiff*.1);
337  break;
338  case 6:
339  gApplication->Terminate(0);
340  break;
341  case 11: // prev
342  if (m_ntuplePlotter) {
343  fCanvas->Clear();
344 
345  if (m_singleTrackMode) {
346  int eventNumber, trackNumber, InterationNumber;
348  } else {
349  int eventNumber;
351  }
352  if (!m_singleTrackMode) {
353  std::vector<TObject*>* rioObjects = m_ntuplePlotter->getRIOGraphics();
354  std::vector<TObject*>::const_iterator rioit = rioObjects->begin();
355  //std::cout << "Got " << rioObjects.size() << " graphic objects for RIOs "<< std::endl;
356  for( ; rioit!=rioObjects->end();++rioit) {
357  (*rioit)->Draw();
358  }
359  }
360  std::vector<TObject*>* trackObjects = m_ntuplePlotter->getTrackGraphics();
361  std::vector<TObject*>::const_iterator oit = trackObjects->begin();
362  for( ; oit!=trackObjects->end();++oit) {
363  (*oit)->Draw();
364  }
365  if (m_showDAFinfo){
366  std::vector<TObject*>* compRotObjects = m_ntuplePlotter->getCompetingROTsGraphics();
367  oit = compRotObjects->begin();
368  for( ; oit!=compRotObjects->end();++oit) {
369  (*oit)->Draw();
370  }
371  }
372 
373  fCanvas->Modified();
374  fCanvas->Update();
375  }
376  //fprintf(stdout, "entry %d \n", int(m_entryNumber));
377  break;
378  case 12: // next
379  if (m_ntuplePlotter) {
380  fCanvas->Clear();
381 
382  if (m_singleTrackMode) {
383  int eventNumber, trackNumber, InterationNumber;
385  } else {
386  int eventNumber;
388  }
389  if (!m_singleTrackMode) {
390  std::vector<TObject*>* rioObjects = m_ntuplePlotter->getRIOGraphics();
391  std::vector<TObject*>::const_iterator rioit = rioObjects->begin();
392  //std::cout << "Got " << rioObjects.size() << " graphic objects for RIOs "<< std::endl;
393  for( ; rioit!=rioObjects->end();++rioit) {
394  (*rioit)->Draw();
395  }
396  }
397  std::vector<TObject*>* trackObjects = m_ntuplePlotter->getTrackGraphics();
398  std::vector<TObject*>::const_iterator oit = trackObjects->begin();
399  for( ; oit!=trackObjects->end();++oit) {
400  (*oit)->Draw();
401  }
402  if (m_showDAFinfo){
403  std::vector<TObject*>* compRotObjects = m_ntuplePlotter->getCompetingROTsGraphics();
404  oit = compRotObjects->begin();
405  for( ; oit!=compRotObjects->end();++oit) {
406  (*oit)->Draw();
407  }
408  }
409 
410  fCanvas->Modified();
411  fCanvas->Update();
412  }
413  //fprintf(stdout, "entry %d \n", int(m_entryNumber));
414  break;
415  case 21: // create EPS
416  {
417  //if(fCanvas)
418  char epsFileName[50]="BarrelTrack.eps";
419  //sprintf(epsFileName,"BarrelTrack%d.eps",int(m_entryNumber));
420  fCanvas->Print( epsFileName,"eps");
421  //}
422  break;}
423  case 22: // create PNG
424  {//if(fCanvas)
425  char pngFileName[50]="BarrelTrack.png";
426  //sprintf(pngFileName,"BarrelTrack%d.png",int(m_entryNumber));
427  fCanvas->Print( pngFileName,"png");
428  //}
429  break;}
430  case 23: // reset view
431  SetRange(-1100., -1100., 1100., 1100.);
432  break;
433 // case 33: // se
434 // SetRange(xmin+xdiff*.1, ymin-ydiff*.1, xmax+xdiff*.1, ymax-ydiff*.1);
435 // break;
436 // case 32: // e
437 // SetRange(xmin+xdiff*.1, ymin, xmax+xdiff*.1, ymax);
438 // break;
439 // case 31: // ne
440 // SetRange(xmin+xdiff*.1, ymin+ydiff*.1, xmax+xdiff*.1, ymax+ydiff*.1);
441 // break;
442 // case 21: // n
443 // SetRange(xmin, ymin+ydiff*.1, xmax, ymax+ydiff*.1);
444 // break;
445 // case 22: // c
446 // SetRange(50.0-xdiff/2,50-ydiff/2,50+xdiff/2,50+ydiff/2);
447 // break;
448  } // end switch(id)
449 }

◆ DoCheckButton()

void Viewer::DoCheckButton ( )

Definition at line 472 of file trackplotter.cxx.

472  {
473  TGButton* button = (TGButton*)gTQSender;
474  TGCheckButton* checkButton = dynamic_cast<TGCheckButton*> (button);
475  if (!checkButton){
476  fprintf(stderr, "did not get the button\n");
477  return;
478  }
479  UInt_t id = button->WidgetId();
480 
481  fCanvas->cd();
482  //fprintf(stdout, "CheckButton ID: %d \n", int(id));
483  switch (id) {
484  case 21: // equal scaling
485  if (checkButton->IsOn()){
486  //fprintf(stdout, "CheckButton ID %d is on\n", int(id));
487  m_equalScaling = true;
488  // force rescaling:
489  double xmin, ymin, xmax, ymax;
490  fCanvas->GetRange(xmin,ymin,xmax,ymax);
491  //SetRange(xmin, ymin, xmax, ymax);
492  } else {
493  m_equalScaling = false;
494  }
495  break;
496  case 22: // draw assignment probabilities for DAF tracks
497  if (checkButton->IsOn()){
498  m_showDAFinfo = true;
499  std::vector<TObject*>* compRotObjects = m_ntuplePlotter->getCompetingROTsGraphics();
500  std::vector<TObject*>::const_iterator oit = compRotObjects->begin();
501  for( ; oit!=compRotObjects->end();++oit) {
502  (*oit)->Draw();
503  }
504  fCanvas->Modified();
505  fCanvas->Update();
506  } else {
507  m_showDAFinfo = false;
508  }
509  break;
510  }
511 }

◆ DoRadioButton()

void Viewer::DoRadioButton ( )

Definition at line 451 of file trackplotter.cxx.

451  {
452  TGButton* button = (TGButton*)gTQSender;
453  UInt_t id = button->WidgetId();
454 
455 
456  fCanvas->cd();
457  fprintf(stdout, "RadioButton ID: %d \n", int(id));
458  switch (id) {
459  case 21: // single track mode
460  m_singleTrackMode = true;
461  fRadioSingleTrackMode[0]->SetState(kButtonDown);
462  fRadioSingleTrackMode[1]->SetState(kButtonUp);
463  break;
464  case 22: // event mode
465  m_singleTrackMode = false;
466  fRadioSingleTrackMode[0]->SetState(kButtonUp);
467  fRadioSingleTrackMode[1]->SetState(kButtonDown);
468  break;
469  }
470 }

◆ DoSlider()

void Viewer::DoSlider ( )

Definition at line 513 of file trackplotter.cxx.

513  {
514  float xmin, ymin, xmax, ymax;
515  fHSlider->GetPosition(xmin,xmax);
516  fVSlider->GetPosition(ymin,ymax);
517  //std::cout << "Slider: X=(" << xmin<< "," << xmax<< "), Y=(" << ymin<< "," << ymax << ")"<< std::endl;
518 /* float xmin2 = xmin-2000.;
519  float ymin2 = ymin-2000.;
520  float xmax2 = xmax-2000.;
521  float ymax2 = ymax-2000.;*/
522  SetRange(xmin,ymin,xmax,ymax, kFALSE);
523 }

◆ SetRange()

void Viewer::SetRange ( Float_t  xmin,
Float_t  ymin,
Float_t  xmax,
Float_t  ymax,
Bool_t  move_slider = kTRUE 
)

Definition at line 525 of file trackplotter.cxx.

526  {
527 
528  if (m_equalScaling) {
529  //fprintf(stdout, "before scaling: x: [%f,%f] y: [%f, %f]\n", xmin, xmax, ymin, ymax );
530  double ratio = double(fMainEmbeddedCanvas->GetWidth())/double(fMainEmbeddedCanvas->GetHeight());
531  xmax = xmin + (ymax - ymin)*ratio;
532  //fprintf(stdout, "width: %d, height: %d, ratio: %f\n", fMainEmbeddedCanvas->GetWidth(), fMainEmbeddedCanvas->GetHeight(), ratio);
533  //fprintf(stdout, "after scaling: x: [%f,%f] y: [%f, %f]\n", xmin, xmax, ymin, ymax );
534  }
535  fCanvas->Range(xmin,ymin,xmax,ymax);
536 
537  //cerr << "x=[" << xmin << " - " << xmax << "], "
538  // << "y=[" << ymin << " - " << ymax << "]\n";
539 
540  fHScale->SetWmin(xmin);
541  fHScale->SetWmax(xmax);
542  fVScale->SetWmin(ymin);
543  fVScale->SetWmax(ymax);
544 
545  // Set position of slider - don't if DoSlider called SetRange
546  //if (move_slider) {
547 /* float xmin2 = xmin+2000.;
548  float ymin2 = ymin+2000.;
549  float xmax2 = xmax+2000.;
550  float ymax2 = ymax+2000.;*/
551  //xmin+=2000.; ymin+=2000.; xmax+=2000., ymax+=2000.;
552  fHSlider->SetPosition(xmin,xmax);
553  fVSlider->SetPosition(ymin,ymax);
554  //}
555 
556  fCanvas->Modified();
557  fHScaleCanvas->GetCanvas()->Modified();
558  fVScaleCanvas->GetCanvas()->Modified();
559  fCanvas->Update();
560  fHScaleCanvas->GetCanvas()->Update();
561  fVScaleCanvas->GetCanvas()->Update();
562  fClient->ForceRedraw(); //prevent GUI from being starved of redraws
563 
564 }

Member Data Documentation

◆ fCanvas

TCanvas* Viewer::fCanvas
private

Definition at line 34 of file trackplotter.h.

◆ fCleanup

TList* Viewer::fCleanup
private

Definition at line 33 of file trackplotter.h.

◆ fHScale

TGaxis* Viewer::fHScale
private

Definition at line 37 of file trackplotter.h.

◆ fHScaleCanvas

TRootEmbeddedCanvas* Viewer::fHScaleCanvas
private

Definition at line 36 of file trackplotter.h.

◆ fHSlider

TGDoubleSlider* Viewer::fHSlider
private

Definition at line 38 of file trackplotter.h.

◆ fMainEmbeddedCanvas

TRootEmbeddedCanvas* Viewer::fMainEmbeddedCanvas
private

Definition at line 35 of file trackplotter.h.

◆ fRadioSingleTrackMode

TGRadioButton* Viewer::fRadioSingleTrackMode[2]
private

Definition at line 40 of file trackplotter.h.

◆ fVScale

TGaxis * Viewer::fVScale
private

Definition at line 37 of file trackplotter.h.

◆ fVScaleCanvas

TRootEmbeddedCanvas * Viewer::fVScaleCanvas
private

Definition at line 36 of file trackplotter.h.

◆ fVSlider

TGDoubleSlider* Viewer::fVSlider
private

Definition at line 39 of file trackplotter.h.

◆ m_equalScaling

bool Viewer::m_equalScaling
private

Definition at line 31 of file trackplotter.h.

◆ m_ntuplePlotter

PlotValNtuple* Viewer::m_ntuplePlotter
private

Definition at line 28 of file trackplotter.h.

◆ m_showDAFinfo

bool Viewer::m_showDAFinfo
private

Definition at line 32 of file trackplotter.h.

◆ m_singleTrackMode

bool Viewer::m_singleTrackMode
private

Definition at line 30 of file trackplotter.h.


The documentation for this class was generated from the following files:
PlotValNtuple::setNextTrack
void setNextTrack(int &eventNumber, int &trackNumber, int &InterationNumber)
Definition: PlotValNtuple.cxx:23
Viewer::fHSlider
TGDoubleSlider * fHSlider
Definition: trackplotter.h:38
ymin
double ymin
Definition: listroot.cxx:63
get_generator_info.stdout
stdout
Definition: get_generator_info.py:40
Viewer::fRadioSingleTrackMode
TGRadioButton * fRadioSingleTrackMode[2]
Definition: trackplotter.h:40
PlotValNtuple::setPrevEvent
void setPrevEvent(int &eventNumber)
Definition: PlotValNtuple.cxx:130
Viewer::m_singleTrackMode
bool m_singleTrackMode
Definition: trackplotter.h:30
get_generator_info.stderr
stderr
Definition: get_generator_info.py:40
Viewer::m_ntuplePlotter
PlotValNtuple * m_ntuplePlotter
Definition: trackplotter.h:28
Viewer::fVScaleCanvas
TRootEmbeddedCanvas * fVScaleCanvas
Definition: trackplotter.h:36
PlotValNtuple::getTrackGraphics
std::vector< TObject * > * getTrackGraphics()
Definition: PlotValNtuple.h:60
PlotValNtuple::setNextEvent
void setNextEvent(int &eventNumber)
Definition: PlotValNtuple.cxx:92
BarrelXY
@ BarrelXY
Definition: PlotValNtuple.h:24
lumiFormat.i
int i
Definition: lumiFormat.py:85
xmin
double xmin
Definition: listroot.cxx:60
Viewer::fCanvas
TCanvas * fCanvas
Definition: trackplotter.h:34
Viewer::fCleanup
TList * fCleanup
Definition: trackplotter.h:33
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
Viewer::fHScaleCanvas
TRootEmbeddedCanvas * fHScaleCanvas
Definition: trackplotter.h:36
Viewer::fMainEmbeddedCanvas
TRootEmbeddedCanvas * fMainEmbeddedCanvas
Definition: trackplotter.h:35
python.ext.table_printer.table
list table
Definition: table_printer.py:81
Viewer::m_equalScaling
bool m_equalScaling
Definition: trackplotter.h:31
Viewer::fVSlider
TGDoubleSlider * fVSlider
Definition: trackplotter.h:39
PlotValNtuple::getRIOGraphics
std::vector< TObject * > * getRIOGraphics()
Definition: PlotValNtuple.h:71
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
StateLessPT_NewConfig.Layout
Layout
Definition: StateLessPT_NewConfig.py:159
Viewer::m_showDAFinfo
bool m_showDAFinfo
Definition: trackplotter.h:32
PlotValNtuple::setMode
void setMode(DisplayMode mode)
Definition: PlotValNtuple.h:41
TRT::Track::trackNumber
@ trackNumber
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:75
Viewer::fHScale
TGaxis * fHScale
Definition: trackplotter.h:37
xmax
double xmax
Definition: listroot.cxx:61
Viewer::SetRange
void SetRange(Float_t xmin, Float_t ymin, Float_t xmax, Float_t ymax, Bool_t move_slider=kTRUE)
Definition: trackplotter.cxx:525
PlotValNtuple::getCompetingROTsGraphics
std::vector< TObject * > * getCompetingROTsGraphics()
Definition: PlotValNtuple.h:93
Viewer::fVScale
TGaxis * fVScale
Definition: trackplotter.h:37
EndCapPhiZ
@ EndCapPhiZ
Definition: PlotValNtuple.h:24
PlotValNtuple::setPrevTrack
void setPrevTrack(int &eventNumber, int &trackNumber, int &InterationNumber)
Definition: PlotValNtuple.cxx:58
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
ymax
double ymax
Definition: listroot.cxx:64