66const char *filetypes[] = {
"ROOT files",
"*.root",
"All files",
"*",
nullptr,
nullptr};
68const char *rcfiletypes[] = {
"All files",
"*",
nullptr,
nullptr};
74 TGShapedToolTip(
const TGShapedToolTip &);
75 TGShapedToolTip &
operator=(
const TGShapedToolTip &);
78 Int_t fTextX, fTextY, fTextH;
81 TRootEmbeddedCanvas *fEc;
85 void DoRedraw()
override {}
89 Int_t ty = 0,
Int_t th = 0,
const char *col =
"#ffffff");
90 ~TGShapedToolTip()
override;
92 virtual void CloseWindow();
94 void CreateCanvas(
Int_t cw,
Int_t ch, TGLayoutHints *hints);
95 TH1 *GetHisto()
const {
return fHist; }
96 const char *GetText()
const {
return fText.
Data(); }
98 void SetHisto(TH1 *hist);
99 void SetText(
const char *
text);
101 void SetTextAttributes(
Int_t tx,
Int_t ty,
Int_t th,
const char *col =
nullptr);
102 void Show(
Int_t x,
Int_t y,
const char *
text =
nullptr, TH1 *hist =
nullptr);
108class HtmlObjTable :
public TObject {
126 ~HtmlObjTable()
override;
128 void SetLabel(
Int_t col,
const char *label) { fLabels[col] = label; }
130 TString Html()
const {
return fHtml; }
139 TOrdCollection *fObjTables;
149 HtmlSummary(
const char *title);
150 virtual ~HtmlSummary();
153 HtmlObjTable *GetTable(
Int_t at)
const {
return (HtmlObjTable *)fObjTables->
At(at); }
157 TString Html()
const {
return fHtml; }
187 TGSplitFrame *fSplitFrame;
188 TGLEmbeddedViewer *fViewer0;
189 TGLEmbeddedViewer *fViewer1;
190 TGLEmbeddedViewer *fViewer2;
191 TGLEmbeddedViewer *fActViewer;
192 static HtmlSummary *fgHtmlSummary;
193 static TGHtml *fgHtml;
195 TGPopupMenu *fMenuFile;
196 TGPopupMenu *fMenuHelp;
197 TGPopupMenu *fMenuCamera;
198 TGPopupMenu *fMenuScene;
199 TGStatusBar *fStatusBar;
200 TGShapedToolTip *fShapedToolTip;
203 TEveViewer *fViewer[3];
204 TEveProjectionManager *fRPhiMgr;
205 TEveProjectionManager *fRhoZMgr;
209 ~SplitGLView()
override;
212 void HandleMenu(
Int_t id);
213 void OnClicked(TObject *obj);
214 void OnMouseIdle(TGLPhysicalShape *shape,
UInt_t posx,
UInt_t posy);
215 void OnMouseOver(TGLPhysicalShape *shape);
216 void OnViewerActivated();
218 void SwapToMainView(TGLViewerBase *viewer);
219 void ToggleOrthoRotate();
220 void ToggleOrthoDolly();
221 void UnDock(TGLViewerBase *viewer);
222 void LoadConfig(
const char *fname);
223 void SaveConfig(
const char *fname);
224 static void UpdateSummary();
226 TEveProjectionManager *GetRPhiMgr()
const {
return fRPhiMgr; }
227 TEveProjectionManager *GetRhoZMgr()
const {
return fRhoZMgr; }
236 HtmlSummary *SplitGLView::fgHtmlSummary =
nullptr;
237TGHtml *SplitGLView::fgHtml =
nullptr;
241 Int_t th,
const char *col)
254 fTextCol =
"0x000000";
257 if ((cx > 0) && (cy > 0) && (cw > 0) && (ch > 0)) {
258 Int_t lhRight = fWidth - cx - cw;
259 Int_t lhBottom = fHeight - cy - ch;
265 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
269TGShapedToolTip::~TGShapedToolTip()
280void TGShapedToolTip::CloseWindow()
288void TGShapedToolTip::Refresh()
292 const char *str = fText.
Data();
293 char *
string = strdup(str);
296 char *s = strtok((
char *)
string,
"\n");
299 while ((s = strtok(
nullptr,
"\n"))) {
303 img->
PaintImage(fId, 0, 0, 0, 0, 0, 0,
"opaque");
314 Int_t lhRight = fWidth - cx - cw;
315 Int_t lhBottom = fHeight - cy - ch;
320 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
332 AddFrame(fEc, hints);
335 Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
342void TGShapedToolTip::SetHisto(
TH1 *hist)
364void TGShapedToolTip::SetText(
const char *
text)
376void TGShapedToolTip::SetTextColor(
const char *col)
386void TGShapedToolTip::SetTextAttributes(
Int_t tx,
Int_t ty,
Int_t th,
const char *col)
425 : fName(
name), fNValues(nvals), fNFields(nfields), fExpand(
exp)
429 fValues =
new TArrayF[fNFields];
430 for (
int i = 0; i < fNFields; i++)
431 fValues[i].
Set(nvals);
432 fLabels =
new TString[fNFields];
436HtmlObjTable::~HtmlObjTable()
445void HtmlObjTable::Build()
449 fHtml =
"<table width=100% border=1 cellspacing=0 cellpadding=0 bgcolor=f0f0f0> ",
452 if (fExpand && (fNFields > 0) && (fNValues > 0)) {
461void HtmlObjTable::BuildTitle()
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>";
471 fHtml +=
"</i></b></font></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>";
478 fHtml +=
"</td></tr>";
482void HtmlObjTable::BuildLabels()
487 fHtml +=
"<tr bgcolor=c0c0ff>";
488 fHtml +=
"<th> </th>";
489 for (i = 0; i < fNFields; i++) {
498void HtmlObjTable::BuildTable()
502 for (
int i = 0; i < fNValues; i++) {
504 fHtml +=
"<tr bgcolor=e0e0ff>";
506 fHtml +=
"<tr bgcolor=ffffff>";
509 name.ReplaceAll(
" ",
"_");
511 fHtml +=
"<td bgcolor=d0d0ff align=\"center\">";
512 fHtml +=
"<input type=\"checkbox\" name=\"";
514 fHtml +=
Form(
"[%d]\">", i);
517 for (
int j = 0; j < fNFields; j++) {
518 fHtml +=
"<td width=";
519 fHtml +=
Form(
"%d%%", 100 / fNFields);
520 fHtml +=
" align=\"center\"";
522 fHtml +=
Form(
"%1.4f", fValues[j][i]);
530HtmlSummary::HtmlSummary(
const char *title) : fNTables(0), fTitle(title)
538HtmlSummary::~HtmlSummary()
552 HtmlObjTable *table =
new HtmlObjTable(
name, nfields, nvals, exp);
557 fObjTables->
Add(table);
562void HtmlSummary::Clear(
Option_t *option)
566 if (option && option[0] ==
'D')
567 fObjTables->
Delete(option);
569 fObjTables->
Clear(option);
579 fObjTables =
nullptr;
584void HtmlSummary::Build()
589 for (
int i = 0; i < fNTables; i++) {
590 GetTable(i)->Build();
591 fHtml += GetTable(i)->Html();
597void HtmlSummary::MakeHeader()
601 fHeader =
"<html><head><title>";
603 fHeader +=
"</title></head><body>";
604 fHeader +=
"<center><h2><font color=#2222ee><i>";
606 fHeader +=
"</i></font></h2></center>";
611void HtmlSummary::MakeFooter()
615 fFooter =
"<br><p><br><center><strong><font size=2 color=#2222ee>";
616 fFooter +=
"Example of using Html widget to display tabular data";
618 fFooter +=
"(c) 2007-2010 Bertrand Bellenot";
619 fFooter +=
"</font></strong></center></body></html>";
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);
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);
659 fMenuScene->AddEntry(
"&Update Current", kSceneUpdate);
660 fMenuScene->AddEntry(
"Update &All", kSceneUpdateAll);
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)");
681 if (fIsEmbedded &&
gEve) {
683 fStatusBar =
gEve->GetBrowser()->GetStatusBar();
686 Int_t parts[] = {45, 15, 10, 30};
688 fStatusBar->SetParts(parts, 4);
694 fPad->SetFillColor(
kBlack);
700 fSplitFrame->HSplit(434);
702 fSplitFrame->GetSecond()->VSplit(266);
703 fSplitFrame->GetSecond()->GetSecond()->VSplit(266);
713 but1->
Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*)");
715 but2->
Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"UnDock(TGLViewerBase*)");
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");
748 but3->
Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*)");
750 but4->
Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"UnDock(TGLViewerBase*)");
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) {
767 fViewer[1]->AddScene(s);
768 gEve->GetViewers()->AddElement(fViewer[1]);
771 s =
gEve->SpawnNewScene(
"R-Phi Projection");
787 but5->
Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*)");
789 but6->
Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"UnDock(TGLViewerBase*)");
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) {
806 fViewer[2]->AddScene(s);
807 gEve->GetViewers()->AddElement(fViewer[2]);
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);
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)");
834 fShapedToolTip =
new TGShapedToolTip(
"Default.png", 120, 22, 160, 110, 23, 115, 12,
"#ffff80");
835 Resize(GetDefaultSize());
838 LoadConfig(
".everc");
842SplitGLView::~SplitGLView()
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)");
868 delete fShapedToolTip;
887void SplitGLView::HandleMenu(
Int_t id)
892 static TString rcfile(
".everc");
907 case kFileLoadConfig: {
920 case kFileSaveConfig: {
933 case kFileExit: CloseWindow();
break;
959 case kGLOrthoRotate: ToggleOrthoRotate();
break;
960 case kGLOrthoDolly: ToggleOrthoDolly();
break;
964 fActViewer->UpdateScene();
968 case kSceneUpdateAll:
969 fViewer0->UpdateScene();
970 fViewer1->UpdateScene();
971 fViewer2->UpdateScene();
975 case kSummaryUpdate: UpdateSummary();
break;
986 sprintf(str,
"About ROOT %s...",
gROOT->GetVersion());
999void SplitGLView::OnClicked(
TObject *obj)
1004 fStatusBar->SetText(
Form(
"User clicked on: \"%s\"", obj->
GetName()), 1);
1006 fStatusBar->SetText(
"", 1);
1019 static TH1F *h1f =
nullptr;
1021 TF1 *sqroot =
new TF1(
"sqroot",
"x*gaus(0) + [3]*form1", 0, 10);
1024 h1f =
new TH1F(
"h1f",
"", 50, 0, 10);
1030 if (fShapedToolTip) {
1031 fShapedToolTip->UnmapWindow();
1041 if (fShapedToolTip) {
1042 fShapedToolTip->Show(
x + 5,
y + 5,
1060 fStatusBar->SetText(
"", 0);
1064void SplitGLView::OnViewerActivated()
1071 if (fActViewer && fActViewer->GetFrame())
1072 fActViewer->GetFrame()->ChangeBackground(GetDefaultFrameBackground());
1078 if (fActViewer ==
nullptr) {
1079 printf(
"dyncast failed ...\n");
1085 gClient->GetColorByName(
"green", green);
1088 if (fActViewer->GetFrame())
1092 if (fActViewer->GetOrthoXOYCamera()->GetDollyToZoom() && fActViewer->GetOrthoXOZCamera()->GetDollyToZoom() &&
1093 fActViewer->GetOrthoZOYCamera()->GetDollyToZoom())
1094 fMenuCamera->UnCheckEntry(kGLOrthoDolly);
1096 fMenuCamera->CheckEntry(kGLOrthoDolly);
1098 if (fActViewer->GetOrthoXOYCamera()->GetEnableRotate() && fActViewer->GetOrthoXOYCamera()->GetEnableRotate() &&
1099 fActViewer->GetOrthoXOYCamera()->GetEnableRotate())
1100 fMenuCamera->CheckEntry(kGLOrthoRotate);
1102 fMenuCamera->UnCheckEntry(kGLOrthoRotate);
1106void SplitGLView::OpenFile(
const char *fname)
1113 new TGMsgBox(
gClient->GetRoot(),
this,
"OpenFile",
Form(
"The file \"%s\" is not a root file!", fname),
1119 new TGMsgBox(
gClient->GetRoot(),
this,
"OpenFile",
Form(
"The file \"%s\" does't contain a geometry", fname),
1125 fPad->GetListOfPrimitives()->Delete();
1127 fPad->GetListOfPrimitives()->Add(
gGeoManager->GetTopVolume());
1129 fViewer0->PadPaint(fPad);
1130 fViewer1->PadPaint(fPad);
1131 fViewer2->PadPaint(fPad);
1135void SplitGLView::ToggleOrthoRotate()
1139 if (fMenuCamera->IsEntryChecked(kGLOrthoRotate))
1140 fMenuCamera->UnCheckEntry(kGLOrthoRotate);
1142 fMenuCamera->CheckEntry(kGLOrthoRotate);
1143 Bool_t state = fMenuCamera->IsEntryChecked(kGLOrthoRotate);
1145 fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
1146 fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
1147 fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
1152void SplitGLView::ToggleOrthoDolly()
1156 if (fMenuCamera->IsEntryChecked(kGLOrthoDolly))
1157 fMenuCamera->UnCheckEntry(kGLOrthoDolly);
1159 fMenuCamera->CheckEntry(kGLOrthoDolly);
1160 Bool_t state = !fMenuCamera->IsEntryChecked(kGLOrthoDolly);
1162 fActViewer->GetOrthoXOYCamera()->SetDollyToZoom(state);
1163 fActViewer->GetOrthoXOZCamera()->SetDollyToZoom(state);
1164 fActViewer->GetOrthoZOYCamera()->SetDollyToZoom(state);
1181 if (
v->InheritsFrom(
"TGLEmbeddedViewer")) {
1189void SplitGLView::LoadConfig(
const char *fname)
1192 Int_t height, width;
1200 Int_t bottom_height = env->
GetValue(
"Bottom.Tab.Height", 0);
1202 if (fIsEmbedded &&
gEve) {
1203 Int_t sel = env->
GetValue(
"Eve.Selection",
gEve->GetSelection()->GetPickToSelect());
1205 gEve->GetBrowser()->EveMenu(9 + sel);
1206 gEve->GetBrowser()->EveMenu(13 +
hi);
1210 gEve->GetBrowser()->Resize(width, height);
1214 width = fSplitFrame->GetFirst()->GetWidth();
1215 fSplitFrame->GetFirst()->Resize(width, mainheight);
1217 height = fSplitFrame->GetSecond()->GetFirst()->GetHeight();
1218 fSplitFrame->GetSecond()->GetFirst()->Resize(blwidth, height);
1220 height = fSplitFrame->GetSecond()->GetSecond()->GetFirst()->GetHeight();
1221 fSplitFrame->GetSecond()->GetSecond()->GetFirst()->Resize(bcwidth, height);
1223 height = fSplitFrame->GetSecond()->GetSecond()->GetSecond()->GetHeight();
1224 fSplitFrame->GetSecond()->GetSecond()->GetSecond()->Resize(brwidth, height);
1226 fSplitFrame->Layout();
1228 if (fIsEmbedded &&
gEve) {
1230 ((
TGCompositeFrame *)
gEve->GetBrowser()->GetTabBottom()->GetParent())->Resize(width, bottom_height);
1232 ((
TGCompositeFrame *)
gEve->GetBrowser()->GetTabRight()->GetParent())->Resize(width, top_height);
1237void SplitGLView::SaveConfig(
const char *fname)
1240 Int_t bottom_height = 0;
1241 Int_t top_height = 0;
1245 if (fIsEmbedded &&
gEve) {
1261 if (fIsEmbedded &&
gEve) {
1263 env->
SetValue(
"Right.Tab.Height", top_height);
1265 env->
SetValue(
"Bottom.Tab.Height", bottom_height);
1267 env->
SetValue(
"Eve.Selection",
gEve->GetSelection()->GetPickToSelect());
1268 env->
SetValue(
"Eve.Highlight",
gEve->GetHighlight()->GetPickToSelect());
1273 if (!
gSystem->AccessPathName(
Form(
"%s.new", fname))) {
1286 if (!fSplitFrame->GetFirst()->GetFrame())
1288 if (viewer ==
nullptr) {
1291 while (parent && !parent->
InheritsFrom(
"TGSplitFrame")) {
1322void SplitGLView::UpdateSummary()
1330 HtmlObjTable *table;
1333 fgHtmlSummary->Clear(
"D");
1344 table = fgHtmlSummary->AddTable(ename, 0, nel);
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");
1357 for (j =
tracks->BeginChildren(); j !=
tracks->EndChildren(); ++j) {
1359 table->SetValue(0, k, p);
1361 table->SetValue(1, k,
pt);
1363 table->SetValue(2, k, phi);
1365 table->SetValue(3, k, theta);
1367 table->SetValue(4, k, eta);
1372 fgHtmlSummary->Build();
1374 fgHtml->ParseText((
char *)fgHtmlSummary->Html().Data());
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");
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
R__EXTERN const char gHelpAbout[]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
externTApplication * gApplication
externTGeoManager * gGeoManager
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Array of floats (32 bits per element).
void SetAt(Double_t v, Int_t i) override
void Set(Int_t n) override
Set size of this array to n floats.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void Update() override
Update canvas pad buffers.
The TEnv class reads config files, by default named .rootrc.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
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.
virtual void SaveLevel(EEnvLevel level)
Write the resource file for a certain level.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual void AddElement(TEveElement *el)
Add el to the list of children.
virtual TClass * IsA() const
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
Base class for event management and navigation.
Exception class thrown by TEve classes and macros.
This was intended as a TPad wrapper to allow smart updates of groups of pads.
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.
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.
A list of tracks supporting change of common attributes and selection based on track parameters.
Visual representation of a track.
Eve representation of TGLViewer.
virtual void SetParameters(const Double_t *params)
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
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.
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
A composite frame that layout their children in horizontal way.
Minimal GL-viewer that can be embedded in a standard ROOT frames.
TGCompositeFrame * GetFrame() const
TObject * GetExternal() const
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.
TGLWidget * GetGLWidget()
This class describes layout hints used by the layout classes.
virtual void * GetUserData() const =0
Defines top level windows that interact with the system Window Manager.
TGShapedFrame & operator=(const TGShapedFrame &)=delete
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.
ROOT GUI Window base class.
virtual void SetName(const char *name)
const TGWindow * GetParent() const
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
1-D histogram with a float per channel (see TH1 documentation)
void Reset(Option_t *option="") override
Reset.
TH1 is the base class of all histogram classes in ROOT.
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
void Draw(Option_t *option="") override
Draw this histogram with options.
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
virtual void SetStats(Bool_t stats=kTRUE)
Set statistics option on/off.
An abstract interface to image processing library.
virtual void DrawText(Int_t=0, Int_t=0, const char *="", Int_t=12, const char *=nullptr, const char *="fixed", EText3DType=TImage::kPlain, const char *=nullptr, Float_t=0)
TObject * Clone(const char *="") const override
Make a clone of an object using the Streamer facility.
virtual void PaintImage(Drawable_t, Int_t, Int_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0, Option_t *="")
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual TClass * IsA() const
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
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
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.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
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
void ToLower()
Change string to lower-case.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Ssiz_t First(char c) const
Find first occurrence of a character c.
const char * Data() const
TString & Remove(Ssiz_t pos)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
RVec< PromoteType< T > > exp(const RVec< T > &v)
TFile * OpenFile(const TString &fin)