#include "TFormula.h"
#ifdef WIN32
#endif
"ROOT files", "*.root",
"All files", "*",
nullptr, nullptr
};
"All files", "*",
nullptr, nullptr
};
private:
protected:
void DoRedraw() override {}
public:
const char *col="#ffffff");
virtual void CloseWindow();
TH1 *GetHisto()
const {
return fHist; }
const char *GetText()
const {
return fText.
Data(); }
void Refresh();
void SetHisto(
TH1 *hist);
void SetText(
const char *
text);
};
public:
void Build();
void BuildTitle();
public:
void SetLabel(
Int_t col,
const char *label) { fLabels[col] = label; }
};
public:
public:
void Build();
};
public:
kHelpAbout, kGLPerspYOZ, kGLPerspXOZ, kGLPerspXOY, kGLXOY,
kGLXOZ, kGLZOY, kGLOrthoRotate, kGLOrthoDolly,
kSceneUpdate,
};
private:
public:
void HandleMenu(
Int_t id);
void ToggleOrthoRotate();
void ToggleOrthoDolly();
};
TGHtml *SplitGLView::fgHtml =
nullptr;
const char *col) :
{
if (col)
else
if ((
cx > 0) && (
cy > 0) && (cw > 0) && (ch > 0)) {
}
Resize();
Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
}
TGShapedToolTip::~TGShapedToolTip()
{
if (fHist)
delete fHist;
}
void TGShapedToolTip::CloseWindow()
{
DeleteWindow();
}
void TGShapedToolTip::Refresh()
{
const char *str = fText.
Data();
char *s =
strtok((
char *)
string,
"\n");
while ((s =
strtok(
nullptr,
"\n"))) {
}
img->PaintImage(fId, 0, 0, 0, 0, 0, 0,
"opaque");
}
{
Resize();
Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
if (IsMapped()) {
Refresh();
}
}
{
Resize();
Resize(fBgnd->GetWidth(), fBgnd->GetHeight());
if (IsMapped()) {
Refresh();
}
}
void TGShapedToolTip::SetHisto(
TH1 *hist)
{
if (hist) {
if (fHist) {
delete fHist;
fEc->GetCanvas()->Clear();
}
fEc->GetCanvas()->SetBorderMode(0);
fEc->GetCanvas()->SetFillColor(10);
fEc->GetCanvas()->Update();
}
}
}
void TGShapedToolTip::SetText(
const char *
text)
{
}
if (IsMapped())
Refresh();
}
void TGShapedToolTip::SetTextColor(const char *col)
{
if (IsMapped())
Refresh();
}
const char *col)
{
if (col)
if (IsMapped())
Refresh();
}
{
MapWindow();
if (hist)
SetHisto(hist);
if (fHist) {
fEc->GetCanvas()->SetBorderMode(0);
fEc->GetCanvas()->SetFillColor(10);
fEc->GetCanvas()->Update();
}
Refresh();
}
{
for (int i=0;i<fNFields;i++)
}
HtmlObjTable::~HtmlObjTable()
{
delete [] fValues;
delete [] fLabels;
}
void HtmlObjTable::Build()
{
fHtml = "<table width=100% border=1 cellspacing=0 cellpadding=0 bgcolor=f0f0f0> ",
BuildTitle();
if (fExpand && (fNFields > 0) && (
fNValues > 0)) {
}
fHtml += "</table>";
}
void HtmlObjTable::BuildTitle()
{
fHtml += "<tr><td colspan=";
fHtml +=
Form(
"%d>", fNFields+1);
fHtml += "<table width=100% border=0 cellspacing=2 cellpadding=0 bgcolor=6e6ea0>";
fHtml += "<tr><td align=left>";
fHtml += "<font face=Verdana size=3 color=ffffff><b><i>";
fHtml += fName;
fHtml += "</i></b></font></td>";
fHtml += "<td>";
fHtml += "<td align=right> ";
fHtml += "<font face=Verdana size=3 color=ffffff><b><i>";
fHtml += "</i></b></font></td></tr>";
fHtml += "</table>";
fHtml += "</td></tr>";
}
void HtmlObjTable::BuildLabels()
{
fHtml += "<tr bgcolor=c0c0ff>";
fHtml += "<th> </th>";
for (i=0;i<fNFields;i++) {
fHtml += "<th> ";
fHtml += fLabels[i];
fHtml += " </th>";
}
fHtml += "</tr>";
}
void HtmlObjTable::BuildTable()
{
if (i%2)
fHtml += "<tr bgcolor=e0e0ff>";
else
fHtml += "<tr bgcolor=ffffff>";
name.ReplaceAll(
" ",
"_");
fHtml += "<td bgcolor=d0d0ff align=\"center\">";
fHtml += "<input type=\"checkbox\" name=\"";
fHtml +=
Form(
"[%d]\">",i);
fHtml += "</td>";
for (
int j = 0;
j < fNFields;
j++) {
fHtml += "<td width=";
fHtml +=
Form(
"%d%%", 100/fNFields);
fHtml += " align=\"center\"";
fHtml += ">";
fHtml +=
Form(
"%1.4f", fValues[
j][i]);
fHtml += "</td>";
}
fHtml += "</tr> ";
}
}
HtmlSummary::HtmlSummary(
const char *title) :
fNTables(0), fTitle(title)
{
}
HtmlSummary::~HtmlSummary()
{
Reset();
}
{
else
return table;
}
void HtmlSummary::Clear(
Option_t *option)
{
if (option && option[0] == 'D')
else
}
{
}
void HtmlSummary::Build()
{
GetTable(i)->Build();
fHtml += GetTable(i)->Html();
}
}
void HtmlSummary::MakeHeader()
{
fHeader = "<html><head><title>";
fHeader += fTitle;
fHeader += "</title></head><body>";
fHeader += "<center><h2><font color=#2222ee><i>";
fHeader += fTitle;
fHeader += "</i></font></h2></center>";
fHtml = fHeader;
}
void HtmlSummary::MakeFooter()
{
fFooter = "<br><p><br><center><strong><font size=2 color=#2222ee>";
fFooter += "Example of using Html widget to display tabular data";
fFooter += "<br>";
fFooter += "(c) 2007-2010 Bertrand Bellenot";
fFooter += "</font></strong></center></body></html>";
fHtml += fFooter;
}
{
fMenuFile->AddSeparator();
fMenuFile->AddSeparator();
fMenuFile->AddSeparator();
fMenuCamera->AddEntry(
"Perspective (Floor XOZ)", kGLPerspXOZ);
fMenuCamera->AddEntry(
"Perspective (Floor YOZ)", kGLPerspYOZ);
fMenuCamera->AddEntry(
"Perspective (Floor XOY)", kGLPerspXOY);
fMenuCamera->AddEntry(
"Ortho allow rotate", kGLOrthoRotate);
fMenuCamera->AddEntry(
"Ortho allow dolly", kGLOrthoDolly);
fMenuFile->Connect("Activated(Int_t)", "SplitGLView", this,
"HandleMenu(Int_t)");
fMenuCamera->Connect(
"Activated(Int_t)",
"SplitGLView",
this,
"HandleMenu(Int_t)");
fMenuScene->Connect(
"Activated(Int_t)",
"SplitGLView",
this,
"HandleMenu(Int_t)");
fMenuHelp->Connect("Activated(Int_t)", "SplitGLView", this,
"HandleMenu(Int_t)");
}
else {
fStatusBar->SetParts(
parts, 4);
0, 0, 10, 0));
}
frm->SetName(
"Main_View");
but1->Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*)");
but2->Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"UnDock(TGLViewerBase*)");
fViewer0->Connect(
"MouseOver(TGLPhysicalShape*)",
"SplitGLView",
this,
"OnMouseOver(TGLPhysicalShape*)");
fViewer0->Connect(
"Activated()",
"SplitGLView",
this,
"OnViewerActivated()");
fViewer0->Connect(
"MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)",
"SplitGLView", this,
"OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
fViewer0->Connect(
"Clicked(TObject*)",
"SplitGLView",
this,
"OnClicked(TObject*)");
fViewer[0]->IncDenyDestroy();
}
frm->SetName(
"Bottom_Left");
but3->Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*)");
but4->Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"UnDock(TGLViewerBase*)");
fViewer1->Connect(
"MouseOver(TGLPhysicalShape*)",
"SplitGLView",
this,
"OnMouseOver(TGLPhysicalShape*)");
fViewer1->Connect(
"Activated()",
"SplitGLView",
this,
"OnViewerActivated()");
fViewer1->Connect(
"MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)",
"SplitGLView", this,
"OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
fViewer1->Connect(
"Clicked(TObject*)",
"SplitGLView",
this,
"OnClicked(TObject*)");
fViewer[1]->IncDenyDestroy();
fViewer[1]->AddScene(s);
}
frm->SetName(
"Bottom_Center");
but5->Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*)");
but6->Connect(
"Clicked(TGLViewerBase*)",
"SplitGLView",
this,
"UnDock(TGLViewerBase*)");
fViewer2->Connect(
"MouseOver(TGLPhysicalShape*)",
"SplitGLView",
this,
"OnMouseOver(TGLPhysicalShape*)");
fViewer2->Connect(
"Activated()",
"SplitGLView",
this,
"OnViewerActivated()");
fViewer2->Connect(
"MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)",
"SplitGLView", this,
"OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
fViewer2->Connect(
"Clicked(TObject*)",
"SplitGLView",
this,
"OnClicked(TObject*)");
fViewer[2]->IncDenyDestroy();
fViewer[2]->AddScene(s);
}
frm->SetName(
"Bottom_Right");
button->SetToolTipText(
"Swap to big view");
button->Connect(
"Clicked()",
"SplitGLView",
this,
"SwapToMainView(TGLViewerBase*=0)");
"SplitGLView", this, "ItemClicked(TGListTreeItem*, Int_t, Int_t, Int_t)");
}
23, 115, 12, "#ffff80");
Resize(GetDefaultSize());
MapWindow();
}
SplitGLView::~SplitGLView()
{
fMenuFile->Disconnect("Activated(Int_t)", this, "HandleMenu(Int_t)");
fMenuCamera->Disconnect(
"Activated(Int_t)",
this,
"HandleMenu(Int_t)");
fMenuScene->Disconnect(
"Activated(Int_t)",
this,
"HandleMenu(Int_t)");
fMenuHelp->Disconnect("Activated(Int_t)", this, "HandleMenu(Int_t)");
fViewer0->Disconnect(
"MouseOver(TGLPhysicalShape*)",
this,
"OnMouseOver(TGLPhysicalShape*)");
fViewer0->Disconnect(
"Activated()",
this,
"OnViewerActivated()");
fViewer0->Disconnect(
"MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)",
this, "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
fViewer1->Disconnect(
"MouseOver(TGLPhysicalShape*)",
this,
"OnMouseOver(TGLPhysicalShape*)");
fViewer1->Disconnect(
"Activated()",
this,
"OnViewerActivated()");
fViewer1->Disconnect(
"MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)",
this, "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
fViewer2->Disconnect(
"MouseOver(TGLPhysicalShape*)",
this,
"OnMouseOver(TGLPhysicalShape*)");
fViewer2->Disconnect(
"Activated()",
this,
"OnViewerActivated()");
fViewer2->Disconnect(
"MouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)",
this, "OnMouseIdle(TGLPhysicalShape*,UInt_t,UInt_t)");
delete fViewer[0];
delete fViewer[1];
delete fViewer[2];
}
delete fMenuFile;
delete fMenuHelp;
delete fMenuBar;
delete fPad;
delete fStatusBar;
}
}
void SplitGLView::HandleMenu(
Int_t id)
{
switch (id) {
{
}
break;
{
}
}
break;
{
}
}
break;
CloseWindow();
break;
case kGLPerspYOZ:
break;
case kGLPerspXOZ:
break;
case kGLPerspXOY:
break;
case kGLXOY:
break;
case kGLXOZ:
break;
case kGLZOY:
break;
case kGLOrthoRotate:
ToggleOrthoRotate();
break;
case kGLOrthoDolly:
ToggleOrthoDolly();
break;
break;
break;
break;
{
#ifdef R__UNIX
#else
#ifdef WIN32
#else
char str[32];
#endif
#endif
}
break;
default:
break;
}
}
void SplitGLView::OnClicked(
TObject *obj)
{
if (obj)
fStatusBar->SetText(
Form(
"User clicked on: \"%s\"", obj->
GetName()), 1);
else
fStatusBar->SetText("", 1);
}
{
TF1 *
sqroot =
new TF1(
"sqroot",
"x*gaus(0) + [3]*form1",0,10);
sqroot->SetParameters(10,4,1,20);
h1f->FillRandom(
"sqroot",200);
}
shape->
GetLogical()->GetExternal()->IsA()->GetName(),
}
}
}
{
fStatusBar->SetText(
Form(
"Mouse Over: \"%s\"",
shape->
GetLogical()->GetExternal()->GetName()), 0);
else
fStatusBar->SetText("", 0);
}
void SplitGLView::OnViewerActivated()
{
fActViewer->GetFrame()->ChangeBackground(GetDefaultFrameBackground());
printf (
"dyncast failed ...\n");
return;
}
}
if (
fActViewer->GetOrthoXOYCamera()->GetDollyToZoom() &&
fActViewer->GetOrthoXOZCamera()->GetDollyToZoom() &&
fActViewer->GetOrthoZOYCamera()->GetDollyToZoom())
else
if (
fActViewer->GetOrthoXOYCamera()->GetEnableRotate() &&
fActViewer->GetOrthoXOYCamera()->GetEnableRotate() &&
fActViewer->GetOrthoXOYCamera()->GetEnableRotate())
else
}
void SplitGLView::OpenFile(
const char *
fname)
{
Form(
"The file \"%s\" is not a root file!",
fname),
return;
}
Form(
"The file \"%s\" does't contain a geometry",
fname),
return;
}
fPad->GetListOfPrimitives()->Delete();
}
void SplitGLView::ToggleOrthoRotate()
{
else
fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
fActViewer->GetOrthoXOYCamera()->SetEnableRotate(state);
}
}
void SplitGLView::ToggleOrthoDolly()
{
else
fActViewer->GetOrthoXOYCamera()->SetDollyToZoom(state);
fActViewer->GetOrthoXOZCamera()->SetDollyToZoom(state);
fActViewer->GetOrthoZOYCamera()->SetDollyToZoom(state);
}
}
{
if(re == nullptr) return;
if (
v->InheritsFrom(
"TGLEmbeddedViewer")) {
}
}
}
void SplitGLView::LoadConfig(
const char *
fname)
{
}
}
}
void SplitGLView::SaveConfig(
const char *
fname)
{
}
}
#ifdef R__WIN32
}
#endif
}
{
return;
}
}
else {
}
}
{
}
void SplitGLView::UpdateSummary()
{
for (i=
mgr->BeginChildren(); i!=
mgr->EndChildren(); ++i) {
}
table->SetLabel(0, "Momentum");
table->SetLabel(1, "P_t");
table->SetLabel(2, "Phi");
table->SetLabel(3, "Theta");
table->SetLabel(4, "Eta");
k=0;
table->SetValue(0, k,
p);
table->SetValue(1, k,
pt);
table->SetValue(2, k, phi);
table->SetValue(3, k, theta);
table->SetValue(4, k, eta);
++k;
}
}
}
}
}
#ifdef __CINT__
{
printf(
"This script is used via ACLiC by the macro \"alice_esd_split.C\"\n");
printf(
"To see it in action, just run \".x alice_esd_split.C\"\n");
return;
}
#endif
Handle_t Window_t
Window handle.
ULong_t Pixel_t
Pixel value.
R__EXTERN const char gHelpAbout[]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
R__EXTERN TApplication * gApplication
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TEveManager * gEve
winID h TVirtualViewer3D TVirtualGLPainter p
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 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
R__EXTERN TGeoManager * gGeoManager
R__EXTERN void * gTQSender
Binding & operator=(OUT(*fun)(void))
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
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).
void SetAt(Double_t v, Int_t i) override
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.
void EveMenu(Int_t id)
Handle events from Eve menu.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Base class for event management and navigation.
Exception class thrown by TEve classes and macros.
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.
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.
Int_t GetPickToSelect() const
A list of tracks supporting change of common attributes and selection based on track parameters.
Visual representation of a track.
void AddElement(TEveElement *el) override
Call base-class implementation.
Eve representation of TGLViewer.
The base class for composite widgets (menu bars, list boxes, etc.).
A frame with handles that allow it to be undocked (i.e.
This class creates a file selection dialog.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
A composite frame that layout their children in horizontal way.
Minimal GL-viewer that can be embedded in a standard ROOT frames.
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.
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.
Provides a StatusBar widget.
ROOT GUI Window base class.
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
void DefaultColors()
Set default volume colors according to A of material.
TGeoVolume * GetTopVolume() const
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
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.
An abstract interface to image processing library.
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".
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.
TGTab * GetTabBottom() const
TGStatusBar * GetStatusBar() const
TGTab * GetTabRight() const
This class creates a TGCanvas in which a TCanvas is created.
A TRootHelpDialog is used to display help text (or any text in a dialog window).
void ToLower()
Change string to lower-case.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual int Rename(const char *from, const char *to)
Rename a file.
TFile * OpenFile(const TString &fin)