Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
SplitGLView.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_eve
3/// Helper classes for the alice_esd_split.C demo.
4///
5/// \macro_code
6///
7/// \author Bertrand Bellenot
8
9#include "TApplication.h"
10#include "TSystem.h"
11#include "TGFrame.h"
12#include "TGLayout.h"
13#include "TGSplitter.h"
14#include "TGLWidget.h"
15#include "TEvePad.h"
16#include "TGeoManager.h"
17#include "TString.h"
18#include "TGMenu.h"
19#include "TGStatusBar.h"
20#include "TGFileDialog.h"
21#include "TGMsgBox.h"
22#include "TGLPhysicalShape.h"
23#include "TGLLogicalShape.h"
24#include "HelpText.h"
25#include "TClass.h"
26#include "TEnv.h"
27#include "TGListTree.h"
28#include "TOrdCollection.h"
29#include "TArrayF.h"
30#include "TGHtml.h"
31#include "TPRegexp.h"
32
33#include "TVirtualX.h"
34#include "TROOT.h"
35
36#include "TEveManager.h"
37#include "TEveViewer.h"
38#include "TEveBrowser.h"
40#include "TEveProjectionAxes.h"
41#include "TEveScene.h"
42#include "TEveGeoNode.h"
43#include "TEveEventManager.h"
44#include "TEveTrack.h"
45#include "TEveSelection.h"
46
47#include "TRootEmbeddedCanvas.h"
48#include "TGSplitFrame.h"
49#include "TGLOverlayButton.h"
50#include "TGLEmbeddedViewer.h"
51#include "TGDockableFrame.h"
52#include "TGShapedFrame.h"
53#include "TGButton.h"
54#include "TGTab.h"
55
56#include "TCanvas.h"
57#include "TFormula.h"
58#include "TF1.h"
59#include "TH1F.h"
60
61#ifdef WIN32
62#include <TWin32SplashThread.h>
63#endif
64
65const char *filetypes[] = {"ROOT files", "*.root", "All files", "*", nullptr, nullptr};
66
67const char *rcfiletypes[] = {"All files", "*", nullptr, nullptr};
68
69////////////////////////////////////////////////////////////////////////////////
70class TGShapedToolTip : public TGShapedFrame {
71
72private:
73 TGShapedToolTip(const TGShapedToolTip &); // Not implemented
74 TGShapedToolTip &operator=(const TGShapedToolTip &); // Not implemented
75
76protected:
77 Int_t fTextX, fTextY, fTextH;
78 TString fTextCol;
79
80 TRootEmbeddedCanvas *fEc; // embedded canvas for histogram
81 TH1 *fHist; // user histogram
82 TString fText; // info (as tool tip) text
83
84 void DoRedraw() override {}
85
86public:
87 TGShapedToolTip(const char *picname, Int_t cx = 0, Int_t cy = 0, Int_t cw = 0, Int_t ch = 0, Int_t tx = 0,
88 Int_t ty = 0, Int_t th = 0, const char *col = "#ffffff");
89 ~TGShapedToolTip() override;
90
91 virtual void CloseWindow();
92 void CreateCanvas(Int_t cx, Int_t cy, Int_t cw, Int_t ch);
93 void CreateCanvas(Int_t cw, Int_t ch, TGLayoutHints *hints);
94 TH1 *GetHisto() const { return fHist; }
95 const char *GetText() const { return fText.Data(); }
96 void Refresh();
97 void SetHisto(TH1 *hist);
98 void SetText(const char *text);
99 void SetTextColor(const char *col);
100 void SetTextAttributes(Int_t tx, Int_t ty, Int_t th, const char *col = nullptr);
101 void Show(Int_t x, Int_t y, const char *text = nullptr, TH1 *hist = nullptr);
102
103 ClassDefOverride(TGShapedToolTip, 0) // Shaped composite frame
104};
105
106////////////////////////////////////////////////////////////////////////////////
107class HtmlObjTable : public TObject {
108public: // make them public for shorter code
109 TString fName;
110 Int_t fNValues; // number of values
111 Int_t fNFields; // number of fields
112 TArrayF *fValues;
113 TString *fLabels;
114 Bool_t fExpand;
115
116 TString fHtml; // HTML output code
117
118 void Build();
119 void BuildTitle();
120 void BuildLabels();
121 void BuildTable();
122
123public:
124 HtmlObjTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp = kTRUE);
125 ~HtmlObjTable() override;
126
127 void SetLabel(Int_t col, const char *label) { fLabels[col] = label; }
128 void SetValue(Int_t col, Int_t row, Float_t val) { fValues[col].SetAt(val, row); }
129 TString Html() const { return fHtml; }
130
131 ClassDefOverride(HtmlObjTable, 0);
132};
133
134////////////////////////////////////////////////////////////////////////////////
135class HtmlSummary {
136public: // make them public for shorter code
137 Int_t fNTables;
138 TOrdCollection *fObjTables; // ->array of object tables
139 TString fHtml; // output HTML string
140 TString fTitle; // page title
141 TString fHeader; // HTML header
142 TString fFooter; // HTML footer
143
144 void MakeHeader();
145 void MakeFooter();
146
147public:
148 HtmlSummary(const char *title);
149 virtual ~HtmlSummary();
150
151 HtmlObjTable *AddTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp = kTRUE, Option_t *opt = "");
152 HtmlObjTable *GetTable(Int_t at) const { return (HtmlObjTable *)fObjTables->At(at); }
153 void Build();
154 void Clear(Option_t *option = "");
155 void Reset(Option_t *option = "");
156 TString Html() const { return fHtml; }
157
158 ClassDef(HtmlSummary, 0);
159};
160
161////////////////////////////////////////////////////////////////////////////////
162class SplitGLView : public TGMainFrame {
163
164public:
165 enum EMyCommands {
166 kFileOpen,
167 kFileExit,
168 kFileLoadConfig,
169 kFileSaveConfig,
171 kGLPerspYOZ,
172 kGLPerspXOZ,
173 kGLPerspXOY,
174 kGLXOY,
175 kGLXOZ,
176 kGLZOY,
177 kGLOrthoRotate,
178 kGLOrthoDolly,
179 kSceneUpdate,
180 kSceneUpdateAll,
181 kSummaryUpdate
182 };
183
184private:
185 TEvePad *fPad; // pad used as geometry container
186 TGSplitFrame *fSplitFrame; // main (first) split frame
187 TGLEmbeddedViewer *fViewer0; // main GL viewer
188 TGLEmbeddedViewer *fViewer1; // first GL viewer
189 TGLEmbeddedViewer *fViewer2; // second GL viewer
190 TGLEmbeddedViewer *fActViewer; // actual (active) GL viewer
191 static HtmlSummary *fgHtmlSummary; // summary HTML table
192 static TGHtml *fgHtml;
193 TGMenuBar *fMenuBar; // main menu bar
194 TGPopupMenu *fMenuFile; // 'File' popup menu
195 TGPopupMenu *fMenuHelp; // 'Help' popup menu
196 TGPopupMenu *fMenuCamera; // 'Camera' popup menu
197 TGPopupMenu *fMenuScene; // 'Scene' popup menu
198 TGStatusBar *fStatusBar; // status bar
199 TGShapedToolTip *fShapedToolTip; // shaped tooltip
200 Bool_t fIsEmbedded;
201
202 TEveViewer *fViewer[3];
203 TEveProjectionManager *fRPhiMgr;
204 TEveProjectionManager *fRhoZMgr;
205
206public:
207 SplitGLView(const TGWindow *p = nullptr, UInt_t w = 800, UInt_t h = 600, Bool_t embed = kFALSE);
208 ~SplitGLView() override;
209
210 void ItemClicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y);
211 void HandleMenu(Int_t id);
212 void OnClicked(TObject *obj);
213 void OnMouseIdle(TGLPhysicalShape *shape, UInt_t posx, UInt_t posy);
214 void OnMouseOver(TGLPhysicalShape *shape);
215 void OnViewerActivated();
216 void OpenFile(const char *fname);
217 void SwapToMainView(TGLViewerBase *viewer);
218 void ToggleOrthoRotate();
219 void ToggleOrthoDolly();
220 void UnDock(TGLViewerBase *viewer);
221 void LoadConfig(const char *fname);
222 void SaveConfig(const char *fname);
223 static void UpdateSummary();
224
225 TEveProjectionManager *GetRPhiMgr() const { return fRPhiMgr; }
226 TEveProjectionManager *GetRhoZMgr() const { return fRhoZMgr; }
227
228 ClassDefOverride(SplitGLView, 0)
229};
230
231TEveProjectionManager *gRPhiMgr = nullptr;
232TEveProjectionManager *gRhoZMgr = nullptr;
233
234
235 HtmlSummary *SplitGLView::fgHtmlSummary = nullptr;
236TGHtml *SplitGLView::fgHtml = nullptr;
237
238//______________________________________________________________________________
239TGShapedToolTip::TGShapedToolTip(const char *pname, Int_t cx, Int_t cy, Int_t cw, Int_t ch, Int_t tx, Int_t ty,
240 Int_t th, const char *col)
241 : TGShapedFrame(pname, gClient->GetDefaultRoot(), 400, 300, kTempFrame | kHorizontalFrame),
242 fEc(nullptr),
243 fHist(nullptr)
244{
245 // Shaped window constructor
246
247 fTextX = tx;
248 fTextY = ty;
249 fTextH = th;
250 if (col)
251 fTextCol = col;
252 else
253 fTextCol = "0x000000";
254
255 // create the embedded canvas
256 if ((cx > 0) && (cy > 0) && (cw > 0) && (ch > 0)) {
257 Int_t lhRight = fWidth - cx - cw;
258 Int_t lhBottom = fHeight - cy - ch;
259 fEc = new TRootEmbeddedCanvas("ec", this, cw, ch, 0);
260 AddFrame(fEc, new TGLayoutHints(kLHintsTop | kLHintsLeft, cx, lhRight, cy, lhBottom));
261 }
263 Resize();
264 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
265}
266
267//______________________________________________________________________________
268TGShapedToolTip::~TGShapedToolTip()
269{
270 // Destructor.
271
272 if (fHist)
273 delete fHist;
274 if (fEc)
275 delete fEc;
276}
277
278//______________________________________________________________________________
279void TGShapedToolTip::CloseWindow()
280{
281 // Close shaped window.
282
283 DeleteWindow();
284}
285
286//______________________________________________________________________________
287void TGShapedToolTip::Refresh()
288{
289 // Redraw the window with current attributes.
290
291 const char *str = fText.Data();
292 char *string = strdup(str);
293 Int_t nlines = 0, size = fTextH;
294 TString ar = "arial.ttf";
295 char *s = strtok((char *)string, "\n");
296 TImage *img = (TImage *)fImage->Clone("img");
297 img->DrawText(fTextX, fTextY + (nlines * size), s, size, fTextCol, ar);
298 while ((s = strtok(nullptr, "\n"))) {
299 nlines++;
300 img->DrawText(fTextX, fTextY + (nlines * size), s, size, fTextCol, ar);
301 }
302 // use instead deprecated img->PaintImage()
303 TASUtils::PaintImage(img, fId, 0, 0, kTRUE);
304 free(string);
305 delete img;
306 gVirtualX->Update();
307}
308
309//______________________________________________________________________________
310void TGShapedToolTip::CreateCanvas(Int_t cx, Int_t cy, Int_t cw, Int_t ch)
311{
312
313 // create the embedded canvas
314 Int_t lhRight = fWidth - cx - cw;
315 Int_t lhBottom = fHeight - cy - ch;
316 fEc = new TRootEmbeddedCanvas("ec", this, cw, ch, 0);
317 AddFrame(fEc, new TGLayoutHints(kLHintsTop | kLHintsLeft, cx, lhRight, cy, lhBottom));
319 Resize();
320 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
321 if (IsMapped()) {
322 Refresh();
323 }
324}
325
326//______________________________________________________________________________
327void TGShapedToolTip::CreateCanvas(Int_t cw, Int_t ch, TGLayoutHints *hints)
328{
329 // Create the embedded canvas.
330
331 fEc = new TRootEmbeddedCanvas("ec", this, cw, ch, 0);
332 AddFrame(fEc, hints);
334 Resize();
335 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
336 if (IsMapped()) {
337 Refresh();
338 }
339}
340
341//______________________________________________________________________________
342void TGShapedToolTip::SetHisto(TH1 *hist)
343{
344 // Set which histogram has to be displayed in the embedded canvas.
345
346 if (hist) {
347 if (fHist) {
348 delete fHist;
349 if (fEc)
350 fEc->GetCanvas()->Clear();
351 }
352 fHist = (TH1 *)hist->Clone();
353 if (fEc) {
354 fEc->GetCanvas()->SetBorderMode(0);
355 fEc->GetCanvas()->SetFillColor(10);
356 fEc->GetCanvas()->cd();
357 fHist->Draw();
358 fEc->GetCanvas()->Update();
359 }
360 }
361}
362
363//______________________________________________________________________________
364void TGShapedToolTip::SetText(const char *text)
365{
366 // Set which text has to be displayed.
367
368 if (text) {
369 fText = text;
370 }
371 if (IsMapped())
372 Refresh();
373}
374
375//______________________________________________________________________________
376void TGShapedToolTip::SetTextColor(const char *col)
377{
378 // Set text color.
379
380 fTextCol = col;
381 if (IsMapped())
382 Refresh();
383}
384
385//______________________________________________________________________________
386void TGShapedToolTip::SetTextAttributes(Int_t tx, Int_t ty, Int_t th, const char *col)
387{
388 // Set text attributes (position, size and color).
389
390 fTextX = tx;
391 fTextY = ty;
392 fTextH = th;
393 if (col)
394 fTextCol = col;
395 if (IsMapped())
396 Refresh();
397}
398
399//______________________________________________________________________________
400void TGShapedToolTip::Show(Int_t x, Int_t y, const char *text, TH1 *hist)
401{
402 // Show (popup) the shaped window at location x,y and possibly
403 // set the text and histogram to be displayed.
404
405 Move(x, y);
406 MapWindow();
407
408 if (text)
409 SetText(text);
410 if (hist)
411 SetHisto(hist);
412 // end of demo code -------------------------------------------
413 if (fHist) {
414 fEc->GetCanvas()->SetBorderMode(0);
415 fEc->GetCanvas()->SetFillColor(10);
416 fEc->GetCanvas()->cd();
417 fHist->Draw();
418 fEc->GetCanvas()->Update();
419 }
420 Refresh();
421}
422
423//______________________________________________________________________________
424HtmlObjTable::HtmlObjTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp)
425 : fName(name), fNValues(nvals), fNFields(nfields), fExpand(exp)
426{
427 // Constructor.
428
429 fValues = new TArrayF[fNFields];
430 for (int i = 0; i < fNFields; i++)
431 fValues[i].Set(nvals);
432 fLabels = new TString[fNFields];
433}
434
435//______________________________________________________________________________
436HtmlObjTable::~HtmlObjTable()
437{
438 // Destructor.
439
440 delete[] fValues;
441 delete[] fLabels;
442}
443
444//______________________________________________________________________________
445void HtmlObjTable::Build()
446{
447 // Build HTML code.
448
449 fHtml = "<table width=100% border=1 cellspacing=0 cellpadding=0 bgcolor=f0f0f0> ",
450
451 BuildTitle();
452 if (fExpand && (fNFields > 0) && (fNValues > 0)) {
453 BuildLabels();
454 BuildTable();
455 }
456
457 fHtml += "</table>";
458}
459
460//______________________________________________________________________________
461void HtmlObjTable::BuildTitle()
462{
463 // Build table title.
464
465 fHtml += "<tr><td colspan=";
466 fHtml += Form("%d>", fNFields + 1);
467 fHtml += "<table width=100% border=0 cellspacing=2 cellpadding=0 bgcolor=6e6ea0>";
468 fHtml += "<tr><td align=left>";
469 fHtml += "<font face=Verdana size=3 color=ffffff><b><i>";
470 fHtml += fName;
471 fHtml += "</i></b></font></td>";
472 fHtml += "<td>";
473 fHtml += "<td align=right> ";
474 fHtml += "<font face=Verdana size=3 color=ffffff><b><i>";
475 fHtml += Form("Size = %d", fNValues);
476 fHtml += "</i></b></font></td></tr>";
477 fHtml += "</table>";
478 fHtml += "</td></tr>";
479}
480
481//______________________________________________________________________________
482void HtmlObjTable::BuildLabels()
483{
484 // Build table labels.
485
486 Int_t i;
487 fHtml += "<tr bgcolor=c0c0ff>";
488 fHtml += "<th> </th>"; // for the check boxes
489 for (i = 0; i < fNFields; i++) {
490 fHtml += "<th> ";
491 fHtml += fLabels[i];
492 fHtml += " </th>"; // for the check boxes
493 }
494 fHtml += "</tr>";
495}
496
497//______________________________________________________________________________
498void HtmlObjTable::BuildTable()
499{
500 // Build part of table with values.
501
502 for (int i = 0; i < fNValues; i++) {
503 if (i % 2)
504 fHtml += "<tr bgcolor=e0e0ff>";
505 else
506 fHtml += "<tr bgcolor=ffffff>";
507
508 TString name = fName;
509 name.ReplaceAll(" ", "_");
510 // checkboxes
511 fHtml += "<td bgcolor=d0d0ff align=\"center\">";
512 fHtml += "<input type=\"checkbox\" name=\"";
513 fHtml += name;
514 fHtml += Form("[%d]\">", i);
515 fHtml += "</td>";
516
517 for (int j = 0; j < fNFields; j++) {
518 fHtml += "<td width=";
519 fHtml += Form("%d%%", 100 / fNFields);
520 fHtml += " align=\"center\"";
521 fHtml += ">";
522 fHtml += Form("%1.4f", fValues[j][i]);
523 fHtml += "</td>";
524 }
525 fHtml += "</tr> ";
526 }
527}
528
529//______________________________________________________________________________
530HtmlSummary::HtmlSummary(const char *title) : fNTables(0), fTitle(title)
531{
532 // Constructor.
533
534 fObjTables = new TOrdCollection();
535}
536
537//______________________________________________________________________________
538HtmlSummary::~HtmlSummary()
539{
540 // Destructor.
541
542 Reset();
543}
544
545//______________________________________________________________________________
546HtmlObjTable *HtmlSummary::AddTable(const char *name, Int_t nfields, Int_t nvals, Bool_t exp, Option_t *option)
547{
548 // Add a new table in our list of tables.
549
550 TString opt = option;
551 opt.ToLower();
552 HtmlObjTable *table = new HtmlObjTable(name, nfields, nvals, exp);
553 fNTables++;
554 if (opt.Contains("first"))
555 fObjTables->AddFirst(table);
556 else
557 fObjTables->Add(table);
558 return table;
559}
560
561//______________________________________________________________________________
562void HtmlSummary::Clear(Option_t *option)
563{
564 // Clear the table list.
565
566 if (option && option[0] == 'D')
567 fObjTables->Delete(option);
568 else
569 fObjTables->Clear(option);
570 fNTables = 0;
571}
572
573//______________________________________________________________________________
574void HtmlSummary::Reset(Option_t *)
575{
576 // Reset (delete) the table list;
577
578 delete fObjTables;
579 fObjTables = nullptr;
580 fNTables = 0;
581}
582
583//______________________________________________________________________________
584void HtmlSummary::Build()
585{
586 // Build the summary.
587
588 MakeHeader();
589 for (int i = 0; i < fNTables; i++) {
590 GetTable(i)->Build();
591 fHtml += GetTable(i)->Html();
592 }
593 MakeFooter();
594}
595
596//______________________________________________________________________________
597void HtmlSummary::MakeHeader()
598{
599 // Make HTML header.
600
601 fHeader = "<html><head><title>";
602 fHeader += fTitle;
603 fHeader += "</title></head><body>";
604 fHeader += "<center><h2><font color=#2222ee><i>";
605 fHeader += fTitle;
606 fHeader += "</i></font></h2></center>";
607 fHtml = fHeader;
608}
609
610//______________________________________________________________________________
611void HtmlSummary::MakeFooter()
612{
613 // Make HTML footer.
614
615 fFooter = "<br><p><br><center><strong><font size=2 color=#2222ee>";
616 fFooter += "Example of using Html widget to display tabular data";
617 fFooter += "<br>";
618 fFooter += "(c) 2007-2010 Bertrand Bellenot";
619 fFooter += "</font></strong></center></body></html>";
620 fHtml += fFooter;
621}
622
623//______________________________________________________________________________
624SplitGLView::SplitGLView(const TGWindow *p, UInt_t w, UInt_t h, Bool_t embed)
625 : TGMainFrame(p, w, h), fActViewer(nullptr), fShapedToolTip(nullptr), fIsEmbedded(embed)
626{
627 // Main frame constructor.
628
629 TGSplitFrame *frm;
630 TEveScene *s = nullptr;
631 TGHorizontalFrame *hfrm;
632 TGDockableFrame *dfrm;
634
635 // create the "file" popup menu
636 fMenuFile = new TGPopupMenu(gClient->GetRoot());
637 fMenuFile->AddEntry("&Open...", kFileOpen);
638 fMenuFile->AddSeparator();
639 fMenuFile->AddEntry("&Update Summary", kSummaryUpdate);
640 fMenuFile->AddSeparator();
641 fMenuFile->AddEntry("&Load Config...", kFileLoadConfig);
642 fMenuFile->AddEntry("&Save Config...", kFileSaveConfig);
643 fMenuFile->AddSeparator();
644 fMenuFile->AddEntry("E&xit", kFileExit);
645
646 // create the "camera" popup menu
647 fMenuCamera = new TGPopupMenu(gClient->GetRoot());
648 fMenuCamera->AddEntry("Perspective (Floor XOZ)", kGLPerspXOZ);
649 fMenuCamera->AddEntry("Perspective (Floor YOZ)", kGLPerspYOZ);
650 fMenuCamera->AddEntry("Perspective (Floor XOY)", kGLPerspXOY);
651 fMenuCamera->AddEntry("Orthographic (XOY)", kGLXOY);
652 fMenuCamera->AddEntry("Orthographic (XOZ)", kGLXOZ);
653 fMenuCamera->AddEntry("Orthographic (ZOY)", kGLZOY);
654 fMenuCamera->AddSeparator();
655 fMenuCamera->AddEntry("Ortho allow rotate", kGLOrthoRotate);
656 fMenuCamera->AddEntry("Ortho allow dolly", kGLOrthoDolly);
657
658 fMenuScene = new TGPopupMenu(gClient->GetRoot());
659 fMenuScene->AddEntry("&Update Current", kSceneUpdate);
660 fMenuScene->AddEntry("Update &All", kSceneUpdateAll);
661
662 // create the "help" popup menu
663 fMenuHelp = new TGPopupMenu(gClient->GetRoot());
664 fMenuHelp->AddEntry("&About", kHelpAbout);
665
666 // create the main menu bar
667 fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
668 fMenuBar->AddPopup("&File", fMenuFile, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
669 fMenuBar->AddPopup("&Camera", fMenuCamera, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
670 fMenuBar->AddPopup("&Scene", fMenuScene, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
671 fMenuBar->AddPopup("&Help", fMenuHelp, new TGLayoutHints(kLHintsTop | kLHintsRight));
672
673 AddFrame(fMenuBar, new TGLayoutHints(kLHintsTop | kLHintsExpandX));
674
675 // connect menu signals to our menu handler slot
676 fMenuFile->Connect("Activated(Int_t)", "SplitGLView", this, "HandleMenu(Int_t)");
677 fMenuCamera->Connect("Activated(Int_t)", "SplitGLView", this, "HandleMenu(Int_t)");
678 fMenuScene->Connect("Activated(Int_t)", "SplitGLView", this, "HandleMenu(Int_t)");
679 fMenuHelp->Connect("Activated(Int_t)", "SplitGLView", this, "HandleMenu(Int_t)");
680
681 if (fIsEmbedded && gEve) {
682 // use status bar from the browser
683 fStatusBar = gEve->GetBrowser()->GetStatusBar();
684 } else {
685 // create the status bar
686 Int_t parts[] = {45, 15, 10, 30};
687 fStatusBar = new TGStatusBar(this, 50, 10);
688 fStatusBar->SetParts(parts, 4);
689 AddFrame(fStatusBar, new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 0, 0, 10, 0));
690 }
691
692 // create eve pad (our geometry container)
693 fPad = new TEvePad();
694 fPad->SetFillColor(kBlack);
695
696 // create the split frames
697 fSplitFrame = new TGSplitFrame(this, 800, 600);
698 AddFrame(fSplitFrame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
699 // split it once
700 fSplitFrame->HSplit(434);
701 // then split each part again (this will make four parts)
702 fSplitFrame->GetSecond()->VSplit(266);
703 fSplitFrame->GetSecond()->GetSecond()->VSplit(266);
704
705 TGLOverlayButton *but1, *but2, *but3, *but4, *but5, *but6;
706 // get top (main) split frame
707 frm = fSplitFrame->GetFirst();
708 frm->SetName("Main_View");
709
710 // create (embed) a GL viewer inside
711 fViewer0 = new TGLEmbeddedViewer(frm, fPad);
712 but1 = new TGLOverlayButton(fViewer0, "Swap", 10.0, -10.0, 55.0, 16.0);
713 but1->Connect("Clicked(TGLViewerBase*)", "SplitGLView", this, "SwapToMainView(TGLViewerBase*)");
714 but2 = new TGLOverlayButton(fViewer0, "Undock", 70.0, -10.0, 55.0, 16.0);
715 but2->Connect("Clicked(TGLViewerBase*)", "SplitGLView", this, "UnDock(TGLViewerBase*)");
716 frm->AddFrame(fViewer0->GetFrame(), new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
717 // set the camera to perspective (XOZ) for this viewer
718 fViewer0->SetCurrentCamera(TGLViewer::kCameraPerspXOZ);
719 // connect signal we are interested to
720 fViewer0->Connect("MouseOver(TGLPhysicalShape*)", "SplitGLView", this, "OnMouseOver(TGLPhysicalShape*)");
721 fViewer0->Connect("Activated()", "SplitGLView", this, "OnViewerActivated()");
722 fViewer0->Connect("MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)", "SplitGLView", this,
723 "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
724 fViewer0->Connect("Clicked(TObject*)", "SplitGLView", this, "OnClicked(TObject*)");
725 fViewer[0] = new TEveViewer("SplitGLViewer[0]");
726 fViewer[0]->SetGLViewer(fViewer0, fViewer0->GetFrame());
727 fViewer[0]->IncDenyDestroy();
728 if (fIsEmbedded && gEve) {
729 fViewer[0]->AddScene(gEve->GetGlobalScene());
730 fViewer[0]->AddScene(gEve->GetEventScene());
731 gEve->GetViewers()->AddElement(fViewer[0]);
732 s = gEve->SpawnNewScene("Rho-Z Projection");
733 // projections
735 s->AddElement(fRhoZMgr);
736 gEve->AddToListTree(fRhoZMgr, kTRUE);
737 TEveProjectionAxes *a = new TEveProjectionAxes(fRhoZMgr);
738 s->AddElement(a);
739 }
740
741 // get bottom left split frame
742 frm = fSplitFrame->GetSecond()->GetFirst();
743 frm->SetName("Bottom_Left");
744
745 // create (embed) a GL viewer inside
746 fViewer1 = new TGLEmbeddedViewer(frm, fPad);
747 but3 = new TGLOverlayButton(fViewer1, "Swap", 10.0, -10.0, 55.0, 16.0);
748 but3->Connect("Clicked(TGLViewerBase*)", "SplitGLView", this, "SwapToMainView(TGLViewerBase*)");
749 but4 = new TGLOverlayButton(fViewer1, "Undock", 70.0, -10.0, 55.0, 16.0);
750 but4->Connect("Clicked(TGLViewerBase*)", "SplitGLView", this, "UnDock(TGLViewerBase*)");
751 frm->AddFrame(fViewer1->GetFrame(), new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
752
753 // set the camera to orthographic (XOY) for this viewer
754 fViewer1->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
755 // connect signal we are interested to
756 fViewer1->Connect("MouseOver(TGLPhysicalShape*)", "SplitGLView", this, "OnMouseOver(TGLPhysicalShape*)");
757 fViewer1->Connect("Activated()", "SplitGLView", this, "OnViewerActivated()");
758 fViewer1->Connect("MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)", "SplitGLView", this,
759 "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
760 fViewer1->Connect("Clicked(TObject*)", "SplitGLView", this, "OnClicked(TObject*)");
761 fViewer[1] = new TEveViewer("SplitGLViewer[1]");
762 fViewer[1]->SetGLViewer(fViewer1, fViewer1->GetFrame());
763 fViewer[1]->IncDenyDestroy();
764 if (fIsEmbedded && gEve) {
765 fRhoZMgr->ImportElements((TEveElement *)gEve->GetGlobalScene());
766 fRhoZMgr->ImportElements((TEveElement *)gEve->GetEventScene());
767 fViewer[1]->AddScene(s);
768 gEve->GetViewers()->AddElement(fViewer[1]);
769 gRhoZMgr = fRhoZMgr;
770
771 s = gEve->SpawnNewScene("R-Phi Projection");
772 // projections
774 s->AddElement(fRPhiMgr);
775 gEve->AddToListTree(fRPhiMgr, kTRUE);
776 TEveProjectionAxes *a = new TEveProjectionAxes(fRPhiMgr);
777 s->AddElement(a);
778 }
779
780 // get bottom center split frame
781 frm = fSplitFrame->GetSecond()->GetSecond()->GetFirst();
782 frm->SetName("Bottom_Center");
783
784 // create (embed) a GL viewer inside
785 fViewer2 = new TGLEmbeddedViewer(frm, fPad);
786 but5 = new TGLOverlayButton(fViewer2, "Swap", 10.0, -10.0, 55.0, 16.0);
787 but5->Connect("Clicked(TGLViewerBase*)", "SplitGLView", this, "SwapToMainView(TGLViewerBase*)");
788 but6 = new TGLOverlayButton(fViewer2, "Undock", 70.0, -10.0, 55.0, 16.0);
789 but6->Connect("Clicked(TGLViewerBase*)", "SplitGLView", this, "UnDock(TGLViewerBase*)");
790 frm->AddFrame(fViewer2->GetFrame(), new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
791
792 // set the camera to orthographic (XOY) for this viewer
793 fViewer2->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
794 // connect signal we are interested to
795 fViewer2->Connect("MouseOver(TGLPhysicalShape*)", "SplitGLView", this, "OnMouseOver(TGLPhysicalShape*)");
796 fViewer2->Connect("Activated()", "SplitGLView", this, "OnViewerActivated()");
797 fViewer2->Connect("MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)", "SplitGLView", this,
798 "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
799 fViewer2->Connect("Clicked(TObject*)", "SplitGLView", this, "OnClicked(TObject*)");
800 fViewer[2] = new TEveViewer("SplitGLViewer[2]");
801 fViewer[2]->SetGLViewer(fViewer2, fViewer2->GetFrame());
802 fViewer[2]->IncDenyDestroy();
803 if (fIsEmbedded && gEve) {
804 fRPhiMgr->ImportElements((TEveElement *)gEve->GetGlobalScene());
805 fRPhiMgr->ImportElements((TEveElement *)gEve->GetEventScene());
806 fViewer[2]->AddScene(s);
807 gEve->GetViewers()->AddElement(fViewer[2]);
808 gRPhiMgr = fRPhiMgr;
809 }
810
811 // get bottom right split frame
812 frm = fSplitFrame->GetSecond()->GetSecond()->GetSecond();
813 frm->SetName("Bottom_Right");
814
815 dfrm = new TGDockableFrame(frm);
816 dfrm->SetFixedSize(kFALSE);
817 dfrm->EnableHide(kFALSE);
818 hfrm = new TGHorizontalFrame(dfrm);
819 button = new TGPictureButton(hfrm, gClient->GetPicture("swap.png"));
820 button->SetToolTipText("Swap to big view");
821 hfrm->AddFrame(button);
822 button->Connect("Clicked()", "SplitGLView", this, "SwapToMainView(TGLViewerBase*=0)");
823 fgHtmlSummary = new HtmlSummary("Alice Event Display Summary Table");
824 fgHtml = new TGHtml(hfrm, 100, 100, -1);
828
829 if (fIsEmbedded && gEve) {
830 gEve->GetListTree()->Connect("Clicked(TGListTreeItem*, Int_t, Int_t, Int_t)", "SplitGLView", this,
831 "ItemClicked(TGListTreeItem*, Int_t, Int_t, Int_t)");
832 }
833
834 fShapedToolTip = new TGShapedToolTip("Default.png", 120, 22, 160, 110, 23, 115, 12, "#ffff80");
835 Resize(GetDefaultSize());
837 MapWindow();
838 LoadConfig(".everc");
839}
840
841//______________________________________________________________________________
842SplitGLView::~SplitGLView()
843{
844 // Clean up main frame...
845 // Cleanup();
846
847 fMenuFile->Disconnect("Activated(Int_t)", this, "HandleMenu(Int_t)");
848 fMenuCamera->Disconnect("Activated(Int_t)", this, "HandleMenu(Int_t)");
849 fMenuScene->Disconnect("Activated(Int_t)", this, "HandleMenu(Int_t)");
850 fMenuHelp->Disconnect("Activated(Int_t)", this, "HandleMenu(Int_t)");
851 fViewer0->Disconnect("MouseOver(TGLPhysicalShape*)", this, "OnMouseOver(TGLPhysicalShape*)");
852 fViewer0->Disconnect("Activated()", this, "OnViewerActivated()");
853 fViewer0->Disconnect("MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)", this,
854 "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
855 fViewer1->Disconnect("MouseOver(TGLPhysicalShape*)", this, "OnMouseOver(TGLPhysicalShape*)");
856 fViewer1->Disconnect("Activated()", this, "OnViewerActivated()");
857 fViewer1->Disconnect("MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)", this,
858 "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
859 fViewer2->Disconnect("MouseOver(TGLPhysicalShape*)", this, "OnMouseOver(TGLPhysicalShape*)");
860 fViewer2->Disconnect("Activated()", this, "OnViewerActivated()");
861 fViewer2->Disconnect("MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)", this,
862 "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
863 if (!fIsEmbedded) {
864 delete fViewer[0];
865 delete fViewer[1];
866 delete fViewer[2];
867 }
868 delete fShapedToolTip;
869 delete fMenuFile;
870 delete fMenuScene;
871 delete fMenuCamera;
872 delete fMenuHelp;
873 if (!fIsEmbedded)
874 delete fMenuBar;
875 delete fViewer0;
876 delete fViewer1;
877 delete fViewer2;
878 delete fSplitFrame;
879 delete fPad;
880 if (!fIsEmbedded) {
881 delete fStatusBar;
883 }
884}
885
886//______________________________________________________________________________
887void SplitGLView::HandleMenu(Int_t id)
888{
889 // Handle menu items.
890
891 static TString rcdir(".");
892 static TString rcfile(".everc");
893
894 switch (id) {
895
896 case kFileOpen: {
897 static TString dir(".");
898 TGFileInfo fi;
899 fi.fFileTypes = filetypes;
900 fi.SetIniDir(dir);
901 new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
902 if (fi.fFilename)
904 dir = fi.fIniDir;
905 } break;
906
907 case kFileLoadConfig: {
908 TGFileInfo fi;
909 fi.fFileTypes = rcfiletypes;
910 fi.SetIniDir(rcdir);
911 fi.SetFilename(rcfile);
912 new TGFileDialog(gClient->GetRoot(), this, kFDOpen, &fi);
913 if (fi.fFilename) {
914 rcfile = fi.fFilename;
915 LoadConfig(fi.fFilename);
916 }
917 rcdir = fi.fIniDir;
918 } break;
919
920 case kFileSaveConfig: {
921 TGFileInfo fi;
922 fi.fFileTypes = rcfiletypes;
923 fi.SetIniDir(rcdir);
924 fi.SetFilename(rcfile);
925 new TGFileDialog(gClient->GetRoot(), this, kFDSave, &fi);
926 if (fi.fFilename) {
927 rcfile = fi.fFilename;
928 SaveConfig(fi.fFilename);
929 }
930 rcdir = fi.fIniDir;
931 } break;
932
933 case kFileExit: CloseWindow(); break;
934
935 case kGLPerspYOZ:
936 if (fActViewer)
937 fActViewer->SetCurrentCamera(TGLViewer::kCameraPerspYOZ);
938 break;
939 case kGLPerspXOZ:
940 if (fActViewer)
941 fActViewer->SetCurrentCamera(TGLViewer::kCameraPerspXOZ);
942 break;
943 case kGLPerspXOY:
944 if (fActViewer)
945 fActViewer->SetCurrentCamera(TGLViewer::kCameraPerspXOY);
946 break;
947 case kGLXOY:
948 if (fActViewer)
949 fActViewer->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
950 break;
951 case kGLXOZ:
952 if (fActViewer)
953 fActViewer->SetCurrentCamera(TGLViewer::kCameraOrthoXOZ);
954 break;
955 case kGLZOY:
956 if (fActViewer)
957 fActViewer->SetCurrentCamera(TGLViewer::kCameraOrthoZOY);
958 break;
959 case kGLOrthoRotate: ToggleOrthoRotate(); break;
960 case kGLOrthoDolly: ToggleOrthoDolly(); break;
961
962 case kSceneUpdate:
963 if (fActViewer)
964 fActViewer->UpdateScene();
965 UpdateSummary();
966 break;
967
968 case kSceneUpdateAll:
969 fViewer0->UpdateScene();
970 fViewer1->UpdateScene();
971 fViewer2->UpdateScene();
972 UpdateSummary();
973 break;
974
975 case kSummaryUpdate: UpdateSummary(); break;
976
977 case kHelpAbout: {
978#ifdef R__UNIX
979 TString rootx = TROOT::GetBinDir() + "/root -a &";
980 gSystem->Exec(rootx);
981#else
982#ifdef WIN32
984#else
985 char str[32];
986 sprintf(str, "About ROOT %s...", gROOT->GetVersion());
987 hd = new TRootHelpDialog(this, str, 600, 400);
988 hd->SetText(gHelpAbout);
989 hd->Popup();
990#endif
991#endif
992 } break;
993
994 default: break;
995 }
996}
997
998//______________________________________________________________________________
999void SplitGLView::OnClicked(TObject *obj)
1000{
1001 // Handle click events in GL viewer
1002
1003 if (obj)
1004 fStatusBar->SetText(Form("User clicked on: \"%s\"", obj->GetName()), 1);
1005 else
1006 fStatusBar->SetText("", 1);
1007}
1008
1009//______________________________________________________________________________
1010void SplitGLView::OnMouseIdle(TGLPhysicalShape *shape, UInt_t posx, UInt_t posy)
1011{
1012 // Slot used to handle "OnMouseIdle" signal coming from any GL viewer.
1013 // We receive a pointer on the physical shape in which the mouse cursor is
1014 // and the actual cursor position (x,y)
1015
1016 Window_t wtarget;
1017 Int_t x = 0, y = 0;
1018
1019 static TH1F *h1f = nullptr;
1020 TFormula *form1 = new TFormula("form1", "abs(sin(x)/x)");
1021 TF1 *sqroot = new TF1("sqroot", "x*gaus(0) + [3]*form1", 0, 10);
1022 sqroot->SetParameters(10, 4, 1, 20);
1023 if (h1f == nullptr)
1024 h1f = new TH1F("h1f", "", 50, 0, 10);
1025 h1f->Reset();
1026 h1f->SetFillColor(45);
1027 h1f->SetStats(false);
1028 h1f->FillRandom("sqroot", 200);
1029
1030 if (fShapedToolTip) {
1031 fShapedToolTip->UnmapWindow();
1032 }
1033 if (shape && shape->GetLogical() && shape->GetLogical()->GetExternal()) {
1034 // get the actual viewer who actually emitted the signal
1035 TGLEmbeddedViewer *actViewer = dynamic_cast<TGLEmbeddedViewer *>((TQObject *)gTQSender);
1036 // then translate coordinates from the root (screen) coordinates
1037 // to the actual frame (viewer) ones
1038 gVirtualX->TranslateCoordinates(actViewer->GetFrame()->GetId(), gClient->GetDefaultRoot()->GetId(), posx, posy, x,
1039 y, wtarget);
1040 // Then display our tooltip at this x,y location
1041 if (fShapedToolTip) {
1042 fShapedToolTip->Show(x + 5, y + 5,
1043 Form("%s\n \n%s", shape->GetLogical()->GetExternal()->IsA()->GetName(),
1044 shape->GetLogical()->GetExternal()->GetName()),
1045 h1f);
1046 }
1047 }
1048}
1049
1050//______________________________________________________________________________
1051void SplitGLView::OnMouseOver(TGLPhysicalShape *shape)
1052{
1053 // Slot used to handle "OnMouseOver" signal coming from any GL viewer.
1054 // We receive a pointer on the physical shape in which the mouse cursor is.
1055
1056 // display information on the physical shape in the status bar
1057 if (shape && shape->GetLogical() && shape->GetLogical()->GetExternal())
1058 fStatusBar->SetText(Form("Mouse Over: \"%s\"", shape->GetLogical()->GetExternal()->GetName()), 0);
1059 else
1060 fStatusBar->SetText("", 0);
1061}
1062
1063//______________________________________________________________________________
1064void SplitGLView::OnViewerActivated()
1065{
1066 // Slot used to handle "Activated" signal coming from any GL viewer.
1067 // Used to know which GL viewer is active.
1068
1069 static Pixel_t green = 0;
1070 // set the actual GL viewer frame to default color
1071 if (fActViewer && fActViewer->GetFrame())
1072 fActViewer->GetFrame()->ChangeBackground(GetDefaultFrameBackground());
1073
1074 // change the actual GL viewer to the one who emitted the signal
1075 // fActViewer = (TGLEmbeddedViewer *)gTQSender;
1076 fActViewer = dynamic_cast<TGLEmbeddedViewer *>((TQObject *)gTQSender);
1077
1078 if (fActViewer == nullptr) {
1079 printf("dyncast failed ...\n");
1080 return;
1081 }
1082
1083 // get the highlight color (only once)
1084 if (green == 0) {
1085 gClient->GetColorByName("green", green);
1086 }
1087 // set the new actual GL viewer frame to highlight color
1088 if (fActViewer->GetFrame())
1089 fActViewer->GetFrame()->ChangeBackground(green);
1090
1091 // update menu entries to match actual viewer's options
1092 if (fActViewer->GetOrthoXOYCamera()->GetDollyToZoom() && fActViewer->GetOrthoXOZCamera()->GetDollyToZoom() &&
1093 fActViewer->GetOrthoZOYCamera()->GetDollyToZoom())
1094 fMenuCamera->UnCheckEntry(kGLOrthoDolly);
1095 else
1096 fMenuCamera->CheckEntry(kGLOrthoDolly);
1097
1098 if (fActViewer->GetOrthoXOYCamera()->GetEnableRotate() && fActViewer->GetOrthoXOYCamera()->GetEnableRotate() &&
1099 fActViewer->GetOrthoXOYCamera()->GetEnableRotate())
1100 fMenuCamera->CheckEntry(kGLOrthoRotate);
1101 else
1102 fMenuCamera->UnCheckEntry(kGLOrthoRotate);
1103}
1104
1105//______________________________________________________________________________
1106void SplitGLView::OpenFile(const char *fname)
1107{
1108 // Open a Root file to display a geometry in the GL viewers.
1109
1110 TString filename = fname;
1111 // check if the file type is correct
1112 if (!filename.EndsWith(".root")) {
1113 new TGMsgBox(gClient->GetRoot(), this, "OpenFile", Form("The file \"%s\" is not a root file!", fname),
1115 return;
1116 }
1117 // check if the root file contains a geometry
1118 if (TGeoManager::Import(fname) == nullptr) {
1119 new TGMsgBox(gClient->GetRoot(), this, "OpenFile", Form("The file \"%s\" does't contain a geometry", fname),
1121 return;
1122 }
1124 // delete previous primitives (if any)
1125 fPad->GetListOfPrimitives()->Delete();
1126 // and add the geometry to eve pad (container)
1127 fPad->GetListOfPrimitives()->Add(gGeoManager->GetTopVolume());
1128 // paint the geometry in each GL viewer
1129 fViewer0->PadPaint(fPad);
1130 fViewer1->PadPaint(fPad);
1131 fViewer2->PadPaint(fPad);
1132}
1133
1134//______________________________________________________________________________
1135void SplitGLView::ToggleOrthoRotate()
1136{
1137 // Toggle state of the 'Ortho allow rotate' menu entry.
1138
1139 if (fMenuCamera->IsEntryChecked(kGLOrthoRotate))
1140 fMenuCamera->UnCheckEntry(kGLOrthoRotate);
1141 else
1142 fMenuCamera->CheckEntry(kGLOrthoRotate);
1143 Bool_t state = fMenuCamera->IsEntryChecked(kGLOrthoRotate);
1144 if (fActViewer) {
1145 fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
1146 fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
1147 fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
1148 }
1149}
1150
1151//______________________________________________________________________________
1152void SplitGLView::ToggleOrthoDolly()
1153{
1154 // Toggle state of the 'Ortho allow dolly' menu entry.
1155
1156 if (fMenuCamera->IsEntryChecked(kGLOrthoDolly))
1157 fMenuCamera->UnCheckEntry(kGLOrthoDolly);
1158 else
1159 fMenuCamera->CheckEntry(kGLOrthoDolly);
1160 Bool_t state = !fMenuCamera->IsEntryChecked(kGLOrthoDolly);
1161 if (fActViewer) {
1162 fActViewer->GetOrthoXOYCamera()->SetDollyToZoom(state);
1163 fActViewer->GetOrthoXOZCamera()->SetDollyToZoom(state);
1164 fActViewer->GetOrthoZOYCamera()->SetDollyToZoom(state);
1165 }
1166}
1167
1168//______________________________________________________________________________
1169void SplitGLView::ItemClicked(TGListTreeItem *item, Int_t, Int_t, Int_t)
1170{
1171 // Item has been clicked, based on mouse button do:
1172
1173 static const TEveException eh("SplitGLView::ItemClicked ");
1174 TEveElement *re = (TEveElement *)item->GetUserData();
1175 if (re == nullptr)
1176 return;
1177 TObject *obj = re->GetObject(eh);
1178 if (obj->InheritsFrom("TEveViewer")) {
1179 TGLViewer *v = ((TEveViewer *)obj)->GetGLViewer();
1180 // v->Activated();
1181 if (v->InheritsFrom("TGLEmbeddedViewer")) {
1183 gVirtualX->SetInputFocus(ev->GetGLWidget()->GetId());
1184 }
1185 }
1186}
1187
1188//______________________________________________________________________________
1189void SplitGLView::LoadConfig(const char *fname)
1190{
1191
1193 TEnv *env = new TEnv(fname);
1194
1195 Int_t mainheight = env->GetValue("MainView.Height", 434);
1196 Int_t blwidth = env->GetValue("Bottom.Left.Width", 266);
1197 Int_t bcwidth = env->GetValue("Bottom.Center.Width", 266);
1198 Int_t brwidth = env->GetValue("Bottom.Right.Width", 266);
1199 Int_t top_height = env->GetValue("Right.Tab.Height", 0);
1200 Int_t bottom_height = env->GetValue("Bottom.Tab.Height", 0);
1201
1202 if (fIsEmbedded && gEve) {
1203 Int_t sel = env->GetValue("Eve.Selection", gEve->GetSelection()->GetPickToSelect());
1204 Int_t hi = env->GetValue("Eve.Highlight", gEve->GetHighlight()->GetPickToSelect());
1205 gEve->GetBrowser()->EveMenu(9 + sel);
1206 gEve->GetBrowser()->EveMenu(13 + hi);
1207
1208 width = env->GetValue("Eve.Width", (Int_t)gEve->GetBrowser()->GetWidth());
1209 height = env->GetValue("Eve.Height", (Int_t)gEve->GetBrowser()->GetHeight());
1211 }
1212
1213 // top (main) split frame
1214 width = fSplitFrame->GetFirst()->GetWidth();
1215 fSplitFrame->GetFirst()->Resize(width, mainheight);
1216 // bottom left split frame
1217 height = fSplitFrame->GetSecond()->GetFirst()->GetHeight();
1218 fSplitFrame->GetSecond()->GetFirst()->Resize(blwidth, height);
1219 // bottom center split frame
1220 height = fSplitFrame->GetSecond()->GetSecond()->GetFirst()->GetHeight();
1221 fSplitFrame->GetSecond()->GetSecond()->GetFirst()->Resize(bcwidth, height);
1222 // bottom right split frame
1223 height = fSplitFrame->GetSecond()->GetSecond()->GetSecond()->GetHeight();
1224 fSplitFrame->GetSecond()->GetSecond()->GetSecond()->Resize(brwidth, height);
1225
1226 fSplitFrame->Layout();
1227
1228 if (fIsEmbedded && gEve) {
1229 width = ((TGCompositeFrame *)gEve->GetBrowser()->GetTabBottom()->GetParent())->GetWidth();
1230 ((TGCompositeFrame *)gEve->GetBrowser()->GetTabBottom()->GetParent())->Resize(width, bottom_height);
1231 width = ((TGCompositeFrame *)gEve->GetBrowser()->GetTabRight()->GetParent())->GetWidth();
1232 ((TGCompositeFrame *)gEve->GetBrowser()->GetTabRight()->GetParent())->Resize(width, top_height);
1233 }
1234}
1235
1236//______________________________________________________________________________
1237void SplitGLView::SaveConfig(const char *fname)
1238{
1239
1240 Int_t bottom_height = 0;
1241 Int_t top_height = 0;
1242 TGSplitFrame *frm;
1243 TEnv *env = new TEnv(fname);
1244
1245 if (fIsEmbedded && gEve) {
1246 env->SetValue("Eve.Width", (Int_t)gEve->GetBrowser()->GetWidth());
1247 env->SetValue("Eve.Height", (Int_t)gEve->GetBrowser()->GetHeight());
1248 }
1249 // get top (main) split frame
1250 frm = fSplitFrame->GetFirst();
1251 env->SetValue("MainView.Height", (Int_t)frm->GetHeight());
1252 // get bottom left split frame
1253 frm = fSplitFrame->GetSecond()->GetFirst();
1254 env->SetValue("Bottom.Left.Width", (Int_t)frm->GetWidth());
1255 // get bottom center split frame
1256 frm = fSplitFrame->GetSecond()->GetSecond()->GetFirst();
1257 env->SetValue("Bottom.Center.Width", (Int_t)frm->GetWidth());
1258 // get bottom right split frame
1259 frm = fSplitFrame->GetSecond()->GetSecond()->GetSecond();
1260 env->SetValue("Bottom.Right.Width", (Int_t)frm->GetWidth());
1261 if (fIsEmbedded && gEve) {
1262 top_height = (Int_t)((TGCompositeFrame *)gEve->GetBrowser()->GetTabRight()->GetParent())->GetHeight();
1263 env->SetValue("Right.Tab.Height", top_height);
1264 bottom_height = (Int_t)((TGCompositeFrame *)gEve->GetBrowser()->GetTabBottom()->GetParent())->GetHeight();
1265 env->SetValue("Bottom.Tab.Height", bottom_height);
1266
1267 env->SetValue("Eve.Selection", gEve->GetSelection()->GetPickToSelect());
1268 env->SetValue("Eve.Highlight", gEve->GetHighlight()->GetPickToSelect());
1269 }
1270
1271 env->SaveLevel(kEnvLocal);
1272#ifdef R__WIN32
1273 if (!gSystem->AccessPathName(Form("%s.new", fname))) {
1274 gSystem->Exec(Form("del %s", fname));
1275 gSystem->Rename(Form("%s.new", fname), fname);
1276 }
1277#endif
1278}
1279
1280//______________________________________________________________________________
1281void SplitGLView::SwapToMainView(TGLViewerBase *viewer)
1282{
1283 // Swap frame embedded in a splitframe to the main view (slot method).
1284
1285 TGCompositeFrame *parent = nullptr;
1286 if (!fSplitFrame->GetFirst()->GetFrame())
1287 return;
1288 if (viewer == nullptr) {
1290 parent = (TGCompositeFrame *)src->GetParent();
1291 while (parent && !parent->InheritsFrom("TGSplitFrame")) {
1292 parent = (TGCompositeFrame *)parent->GetParent();
1293 }
1294 } else {
1295 TGCompositeFrame *src = ((TGLEmbeddedViewer *)viewer)->GetFrame();
1296 if (!src)
1297 return;
1299 but->ResetState();
1300 parent = (TGCompositeFrame *)src->GetParent();
1301 }
1302 if (parent && parent->InheritsFrom("TGSplitFrame"))
1303 ((TGSplitFrame *)parent)->SwitchToMain();
1304}
1305
1306//______________________________________________________________________________
1307void SplitGLView::UnDock(TGLViewerBase *viewer)
1308{
1309 // Undock frame embedded in a splitframe (slot method).
1310
1311 TGCompositeFrame *src = ((TGLEmbeddedViewer *)viewer)->GetFrame();
1312 if (!src)
1313 return;
1315 but->ResetState();
1316 TGCompositeFrame *parent = (TGCompositeFrame *)src->GetParent();
1317 if (parent && parent->InheritsFrom("TGSplitFrame"))
1318 ((TGSplitFrame *)parent)->ExtractFrame();
1319}
1320
1321//______________________________________________________________________________
1322void SplitGLView::UpdateSummary()
1323{
1324 // Update summary of current event.
1325
1328 Int_t k;
1329 TEveElement *el;
1330 HtmlObjTable *table;
1331 TEveEventManager *mgr = gEve ? gEve->GetCurrentEvent() : nullptr;
1332 if (mgr) {
1333 fgHtmlSummary->Clear("D");
1334 for (i = mgr->BeginChildren(); i != mgr->EndChildren(); ++i) {
1335 el = ((TEveElement *)(*i));
1336 if (el->IsA() == TEvePointSet::Class()) {
1337 TEvePointSet *ps = (TEvePointSet *)el;
1338 TString ename = ps->GetElementName();
1339 TString etitle = ps->GetElementTitle();
1340 if (ename.First('\'') != kNPOS)
1341 ename.Remove(ename.First('\''));
1342 etitle.Remove(0, 2);
1343 Int_t nel = atoi(etitle.Data());
1344 table = fgHtmlSummary->AddTable(ename, 0, nel);
1345 } else if (el->IsA() == TEveTrackList::Class()) {
1346 TEveTrackList *tracks = (TEveTrackList *)el;
1347 TString ename = tracks->GetElementName();
1348 if (ename.First('\'') != kNPOS)
1349 ename.Remove(ename.First('\''));
1350 table = fgHtmlSummary->AddTable(ename.Data(), 5, tracks->NumChildren(), kTRUE, "first");
1351 table->SetLabel(0, "Momentum");
1352 table->SetLabel(1, "P_t");
1353 table->SetLabel(2, "Phi");
1354 table->SetLabel(3, "Theta");
1355 table->SetLabel(4, "Eta");
1356 k = 0;
1357 for (j = tracks->BeginChildren(); j != tracks->EndChildren(); ++j) {
1358 Float_t p = ((TEveTrack *)(*j))->GetMomentum().Mag();
1359 table->SetValue(0, k, p);
1360 Float_t pt = ((TEveTrack *)(*j))->GetMomentum().Perp();
1361 table->SetValue(1, k, pt);
1362 Float_t phi = ((TEveTrack *)(*j))->GetMomentum().Phi();
1363 table->SetValue(2, k, phi);
1364 Float_t theta = ((TEveTrack *)(*j))->GetMomentum().Theta();
1365 table->SetValue(3, k, theta);
1366 Float_t eta = ((TEveTrack *)(*j))->GetMomentum().Eta();
1367 table->SetValue(4, k, eta);
1368 ++k;
1369 }
1370 }
1371 }
1372 fgHtmlSummary->Build();
1373 fgHtml->Clear();
1374 fgHtml->ParseText((char *)fgHtmlSummary->Html().Data());
1375 fgHtml->Layout();
1376 }
1377}
1378
1379#ifdef __CLING__
1380void SplitGLView()
1381{
1382 printf("This script is used via ACLiC by the macro \"alice_esd_split.C\"\n");
1383 printf("To see it in action, just run \".x alice_esd_split.C\"\n");
1384 return;
1385}
1386#endif
free(fBuffer)
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
@ kTempFrame
Definition GuiTypes.h:394
@ kHorizontalFrame
Definition GuiTypes.h:383
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:41
R__EXTERN const char gHelpAbout[]
Definition HelpText.h:17
#define a(i)
Definition RSha256.hxx:99
#define h(i)
Definition RSha256.hxx:106
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:78
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:60
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:61
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:72
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
Definition RtypesCore.h:132
constexpr Bool_t kTRUE
Definition RtypesCore.h:108
const char Option_t
Option string (const char)
Definition RtypesCore.h:81
#define ClassDef(name, id)
Definition Rtypes.h:343
@ kBlack
Definition Rtypes.h:65
#define ClassDefOverride(name, id)
Definition Rtypes.h:347
R__EXTERN TApplication * gApplication
@ kEnvLocal
Definition TEnv.h:27
R__EXTERN TEveManager * gEve
#define gClient
Definition TGClient.h:157
@ kFDOpen
@ kFDSave
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
@ kMBOk
Definition TGMsgBox.h:33
@ kMBIconExclamation
Definition TGMsgBox.h:24
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
Option_t Option_t TPoint TPoint const char text
char name[80]
Definition TGX11.cxx:142
R__EXTERN TGeoManager * gGeoManager
#define hi
R__EXTERN void * gTQSender
Definition TQObject.h:46
#define gROOT
Definition TROOT.h:417
@ kHelpAbout
@ kFileOpen
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2571
R__EXTERN TSystem * gSystem
Definition TSystem.h:582
#define gVirtualX
Definition TVirtualX.h:379
static Bool_t PaintImage(TImage *timg, Drawable_t wid, Int_t x, Int_t y, Bool_t opaque=kFALSE)
Paint image on specified window.
Definition TASUtils.cxx:317
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
Array of floats (32 bits per element).
Definition TArrayF.h:27
void SetAt(Double_t v, Int_t i) override
Definition TArrayF.h:51
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition TAttFill.h:40
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition TCanvas.cxx:750
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition TCanvas.cxx:732
void Update() override
Update canvas pad buffers.
Definition TCanvas.cxx:2519
The TEnv class reads config files, by default named .rootrc.
Definition TEnv.h:79
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition TEnv.cxx:511
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
Definition TEnv.cxx:753
virtual void SaveLevel(EEnvLevel level)
Write the resource file for a certain level.
Definition TEnv.cxx:684
void EveMenu(Int_t id)
Handle events from Eve menu.
const char * GetElementName() const override
Virtual function for retrieving name of the element.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual TClass * IsA() const
List_i EndChildren()
Int_t NumChildren() const
List_i BeginChildren()
List_t::iterator List_i
Definition TEveElement.h:72
Base class for event management and navigation.
Exception class thrown by TEve classes and macros.
Definition TEveUtil.h:102
TGListTree * GetListTree() const
Get default list-tree widget.
TEveViewerList * GetViewers() const
TEveSelection * GetSelection() const
TEveScene * GetGlobalScene() const
TEveBrowser * GetBrowser() const
TGListTreeItem * AddToListTree(TEveElement *re, Bool_t open, TGListTree *lt=nullptr)
TEveScene * SpawnNewScene(const char *name, const char *title="")
Create a new scene.
TEveSelection * GetHighlight() const
TEveScene * GetEventScene() const
TEveEventManager * GetCurrentEvent() const
This was intended as a TPad wrapper to allow smart updates of groups of pads.
Definition TEvePad.h:18
TEvePointSet is a render-element holding a collection of 3D points with optional per-point TRef and a...
const char * GetElementTitle() const override
Virtual function for retrieving title of the render-element.
static TClass * Class()
const char * GetElementName() const override
Virtual function for retrieving name of the element.
Axes for non-linear projections.
Manager class for steering of projections and managing projected objects.
Eve representation of TGLScene.
Definition TEveScene.h:27
Int_t GetPickToSelect() const
A list of tracks supporting change of common attributes and selection based on track parameters.
Definition TEveTrack.h:140
static TClass * Class()
Visual representation of a track.
Definition TEveTrack.h:33
void AddElement(TEveElement *el) override
Call base-class implementation.
Eve representation of TGLViewer.
Definition TEveViewer.h:31
1-Dim function class
Definition TF1.h:182
virtual void SetParameters(const Double_t *params)
Definition TF1.h:618
The Formula class.
Definition TFormula.h:89
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1111
A frame with handles that allow it to be undocked (i.e.
void AddFrame(TGFrame *f, TGLayoutHints *hints) override
Add frame to dockable frame container. Frame and hints are NOT adopted.
void SetFixedSize(Bool_t fixed)
void EnableHide(Bool_t onoff)
Enable hiding.
This class creates a file selection dialog.
char * fFilename
selected file name
const char ** fFileTypes
file types used to filter selectable files
char * fIniDir
on input: initial directory, on output: new directory
void SetFilename(const char *fname)
Set file name.
void SetIniDir(const char *inidir)
Set directory name.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:599
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
Definition TGFrame.cxx:287
UInt_t GetHeight() const
Definition TGFrame.h:227
UInt_t GetWidth() const
Definition TGFrame.h:226
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
The ROOT HTML widget.
Definition TGHtml.h:873
Minimal GL-viewer that can be embedded in a standard ROOT frames.
TGCompositeFrame * GetFrame() const
TObject * GetExternal() const
GL-overlay button.
virtual void ResetState()
Concrete physical shape - a GL drawable.
const TGLLogicalShape * GetLogical() const
Base class for GL viewers.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition TGLViewer.h:55
@ kCameraPerspXOY
Definition TGLViewer.h:61
@ kCameraPerspXOZ
Definition TGLViewer.h:61
@ kCameraPerspYOZ
Definition TGLViewer.h:61
@ kCameraOrthoZOY
Definition TGLViewer.h:62
@ kCameraOrthoXOY
Definition TGLViewer.h:62
@ kCameraOrthoXOZ
Definition TGLViewer.h:62
TGLWidget * GetGLWidget()
Definition TGLViewer.h:223
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
virtual void * GetUserData() const =0
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:399
The TGMenu.h header contains all different menu classes.
Definition TGMenu.h:282
Handle_t GetId() const
Definition TGObject.h:41
Yield an action as soon as it is clicked.
Definition TGButton.h:228
This class creates a popup menu object.
Definition TGMenu.h:110
A Shaped window.
TGShapedFrame & operator=(const TGShapedFrame &)=delete
A split frame.
void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr) override
Add a frame in the split frame using layout hints l.
TGSplitFrame * GetFirst() const
TGSplitFrame * GetSecond() const
Provides a StatusBar widget.
Definition TGStatusBar.h:21
ROOT GUI Window base class.
Definition TGWindow.h:23
virtual void SetName(const char *name)
Definition TGWindow.h:121
const TGWindow * GetParent() const
Definition TGWindow.h:83
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
void DefaultColors(const TGeoColorScheme *cs=nullptr)
Set default volume colors according to A of material.
TGeoVolume * GetTopVolume() const
1-D histogram with a float per channel (see TH1 documentation)
Definition TH1.h:878
void Reset(Option_t *option="") override
Reset.
Definition TH1.cxx:10516
TH1 is the base class of all histogram classes in ROOT.
Definition TH1.h:109
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
Definition TH1.cxx:3673
void Draw(Option_t *option="") override
Draw this histogram with options.
Definition TH1.cxx:3193
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
Definition TH1.cxx:2882
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
Definition TH1.cxx:9223
An abstract interface to image processing library.
Definition TImage.h:30
TObject * Clone(const char *="") const override
Make a clone of an object using the Streamer facility.
Definition TImage.h:115
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
void Clear(Option_t *option="") override
Set name and title to empty strings ("").
Definition TNamed.cxx:63
Mother of all ROOT objects.
Definition TObject.h:42
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:461
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:548
virtual TClass * IsA() const
Definition TObject.h:248
Ordered collection.
void AddFirst(TObject *obj) override
Insert object at beginning of collection.
void Clear(Option_t *option="") override
Remove all objects from the collection.
void Delete(Option_t *option="") override
Remove all objects from the collection AND delete all heap based objects.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
void SetBorderMode(Short_t bordermode) override
Definition TPad.h:343
/**
Definition TQObject.h:48
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:865
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Definition TROOT.cxx:3165
TGTab * GetTabBottom() const
TGStatusBar * GetStatusBar() const
TGTab * GetTabRight() const
This class creates a TGCanvas in which a TCanvas is created.
TCanvas * GetCanvas() const
A TRootHelpDialog is used to display help text (or any text in a dialog window).
void Add(TObject *obj) override
Basic string class.
Definition TString.h:137
void ToLower()
Change string to lower-case.
Definition TString.cxx:1190
Ssiz_t First(char c) const
Find first occurrence of a character c.
Definition TString.cxx:546
const char * Data() const
Definition TString.h:385
TString & Remove(Ssiz_t pos)
Definition TString.h:695
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:642
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition TSystem.cxx:656
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition TSystem.cxx:1318
virtual int Rename(const char *from, const char *to)
Rename a file.
Definition TSystem.cxx:1372
pt SetTextColor(4)
TPaveText * pt
RVec< PromoteType< T > > exp(const RVec< T > &v)
Definition RVec.hxx:1817
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
TFile * OpenFile(const TString &fin)
Definition tmvaglob.cxx:192