#include <iostream>
class IDList {
private:
public:
IDList() : nID(0) {}
~IDList() {}
Int_t GetUnID(
void) {
return ++nID ; }
} ;
private:
IDList fIDs ;
TGTable *fTable;
TFile *fFile;
TTreeTableInterface *fInterface;
public:
~TableTest() override ;
void DoExit() ;
TGTable *GetTable() { return fTable; }
TTreeTableInterface *GetInterface() { return fInterface; }
};
:
TGMainFrame(p,
w,
h), fNTableRows(ntrows), fNTableColumns(ntcols),
fTable(nullptr)
{
Connect("CloseWindow()", "TableTest", this, "DoExit()") ;
DontCallClose() ;
fFile =
new TFile(
"$ROOTSYS/tutorials/hsimple.root");
if (!fFile || fFile->IsZombie()) {
printf("Please run <ROOT location>/tutorials/hsimple.C first.");
return;
}
TString varexp =
"px:py:pz:random:sin(px):log(px/py):log(pz)";
fTable =
new TGTable(
this, fIDs.GetUnID(), fInterface, fNTableRows,
fNTableColumns);
SetWindowName("Tree Table Test") ;
Resize(GetDefaultWidth()+20, 600) ;
MapWindow() ;
} ;
TableTest::~TableTest()
{
delete fInterface;
fFile->Close();
Cleanup() ;
}
void TableTest::DoExit()
{
DeleteWindow();
}
TableTest *test = new TableTest(nullptr, ntrows, ntcols, 500, 200);
return test->GetTable();
}
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
Create an array to hold a bunch of numbers.
ROOT GUI Window base class.
A simple TTree restricted to a list of float variables only.
const char * Data() const
TTreeTableInterface is used to interface to data that is stored in a TTree.
RooCmdArg Layout(double xmin, double xmax=0.99, double ymin=0.95)