|
ROOT
Reference Guide |
|
Go to the documentation of this file.
177 #include "RConfigure.h"
227 #include "snprintf.h"
236 "",
"AXIS",
"HIST",
"SAME",
"CYL",
"POL",
"SPH",
"PSR",
"LEGO",
"LEGO1",
"LEGO2",
237 "SURF",
"SURF1",
"SURF2",
"SURF3",
"SURF4"
241 "",
"AH",
"B",
"C",
"E",
"E1",
"E2",
"E3",
"E4",
"L",
"P",
"*H"
245 "",
"ARR",
"BOX",
"COL",
"COL2",
"CONT",
"CONT0",
"CONT1",
"CONT2",
"CONT3",
246 "FB",
"BB",
"SCAT",
"PROF"
319 fDimension(0), fVarDraw(0), fScanMode(0),
320 fTreeIndex(0), fDefaultCursor(0), fWatchCursor(0),
321 fCounting(0), fStopMapping(0), fEnableCut(0),fNexpressions(0)
326 gROOT->ProcessLine(
"#ifndef GTV_DEFINED\n\
327 TTreeViewer *gTV = 0;\n\
328 TTree *tv__tree = 0;\n\
329 TList *tv__tree_list = 0;\n\
330 TFile *tv__tree_file = 0;\n\
331 #define GTV_DEFINED\n\
334 gROOT->ProcessLine(command);
336 gROOT->ProcessLine(
"tv__tree_list = new TList;");
347 fDimension(0), fVarDraw(0), fScanMode(0),
348 fTreeIndex(0), fDefaultCursor(0), fWatchCursor(0),
349 fCounting(0), fStopMapping(0), fEnableCut(0),fNexpressions(0)
356 gROOT->ProcessLine(
"#ifndef GTV_DEFINED\n\
357 TTreeViewer *gTV = 0;\n\
358 TTree *tv__tree = 0;\n\
359 TList *tv__tree_list = 0;\n\
360 TFile *tv__tree_file = 0;\n\
361 #define GTV_DEFINED\n\
364 gROOT->ProcessLine(command);
367 gROOT->ProcessLine(
"tv__tree_list = new TList;");
373 if (cdir) cdir->
cd();
378 cdir =
tree->GetDirectory();
382 if (dirsav) dirsav->
cd();
393 printf(
"Tree found\n");
396 while ((ftree = (
TTree*)next())) {
397 if (ftree==
tree) {printf(
"found at index %i\n", index);
break;}
436 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
455 if (diff <= 0)
return;
500 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
518 if (!treeName)
return;
522 printf(
"Tree found\n");
526 if (!strcmp(treeName,
tree->GetName())) {printf(
"found at index %i\n", index);
break;}
565 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
589 while ((obj=next())) {
595 std::cout <<
"File name : "<<
fFilename << std::endl;
621 gClient->GetColorByName(
"blue",color);
800 fBarOption->
SetToolTipText(
"Histogram graphics option. Type option here and click <Draw> (or <ENTER> to update current histogram).");
905 fSPIDER->
Connect(
"Clicked()",
"TTreeViewer",
this,
"ExecuteSpider()");
926 fREFR->
Connect(
"Clicked()",
"TTreeViewer",
this,
"DoRefresh()");
1082 entry->
SetToolTipText(
"X expression. Drag and drop expressions here");
1091 entry->
SetToolTipText(
"Y expression. Drag and drop expressions here");
1100 entry->
SetToolTipText(
"Z expression. Drag and drop expressions here");
1106 pic =
gClient->GetPicture(
"cut_t.xpm");
1107 spic =
gClient->GetPicture(
"cut_t.xpm");
1110 entry->
SetToolTipText(
"Active cut. Double-click to enable/disable");
1116 pic =
gClient->GetPicture(
"pack_t.xpm");
1117 spic =
gClient->GetPicture(
"pack-empty_t.xpm");
1120 entry->
SetToolTipText(
"Drag and drop expressions/leaves here. Double-click to scan. Check <Scan> to redirect on file.");
1129 pic =
gClient->GetPicture(
"expression_t.xpm");
1130 spic =
gClient->GetPicture(
"expression_t.xpm");
1133 entry->
SetToolTipText(
"User defined expression/cut. Double-click to edit");
1302 while (stripped.
Index(
"[", index) !=
kNPOS) {
1308 return (objstr->
String()).Data();
1311 retstr = stripped.
Remove(start+1, end-start-1);
1316 return (objstr->
String()).Data();
1335 Warning(
"Empty",
"No item selected.");
1340 Warning(
"Empty",
"Not expression type.");
1386 Int_t dimension = 0;
1399 if (
Ez() && strlen(
Ez())) {
1406 if ((
Ez() && strlen(
Ez())) && ((
Ex() &&strlen(
Ex())) || (
Ey() && strlen(
Ey())))) varexp +=
":";
1407 if (
Ey() && strlen(
Ey())) {
1414 if (
Ey() && strlen(
Ey()) &&
Ex() && strlen(
Ex())) varexp +=
":";
1415 if (
Ex () && strlen(
Ex())) {
1424 Warning(
"ExecuteDraw",
"Nothing to draw on X,Y,Z.");
1442 auto pad =
gROOT->GetSelectedPad();
1449 const char *cut =
"";
1462 command =
TString::Format(
"tv__tree->Scan(\"%s\",\"%s\",\"%s\", %lld, %lld);",
1485 if (current == last) {
1489 if (dimension == 3 && strlen(gopt)) {
1490 std::cout <<
"Graphics option " << gopt <<
" not valid for 3D histograms" << std::endl;
1493 std::cout <<
" Graphics option for current histogram changed to " << gopt << std::endl;
1507 if (dimension == 3 && strlen(gopt)) {
1508 std::cout <<
"Graphics option " << gopt <<
" not valid for 3D histograms" << std::endl;
1512 command =
TString::Format(
"tv__tree->Draw(\"%s\",\"%s\",\"%s\", %lld, %lld);",
1529 for (i=0; i<3; i++) {
1530 if (alias[i].Length()) {
1532 alias[current] = alias[i];
1543 for (
Int_t ind=0; ind<3; ind++) axis[ind]->SetTitle(alias[ind].Data());
1554 Int_t dimension = 0;
1559 if (
Ez() && strlen(
Ez())) {
1560 previousexp =
kTRUE;
1567 if ((
Ez() && strlen(
Ez())) && ((
Ex() && strlen(
Ex())) || (
Ey() && strlen(
Ey())))) varexp +=
":";
1568 if (
Ey() && strlen(
Ey())) {
1569 previousexp =
kTRUE;
1576 if (
Ey() && strlen(
Ey()) &&
Ex() && strlen(
Ex())) varexp +=
":";
1577 if (
Ex() && strlen(
Ex())) {
1578 previousexp =
kTRUE;
1585 for(
Int_t i=0;i<10;++i){
1586 if(
En(i+5) && strlen(
En(i+5))){
1591 }
else varexp =
En(i+5);
1592 previousexp =
kTRUE;
1596 Warning(
"ExecuteSpider",
"Need at least 3 variables");
1609 auto pad =
gROOT->GetSelectedPad();
1616 const char *cut =
"";
1662 if(
e)
return e->ConvertAliases();
1675 Warning(
"EditExpression",
"No item selected.");
1681 Warning(
"EditExpression",
"Not expression type.");
1705 if (!
fTree)
return 0;
1714 if (!
fTree)
return 0;
1751 Warning(
"RemoveItem",
"No item selected.");
1757 Warning(
"RemoveItem",
"Not removable type.");
1972 Warning(
"ProcessMessage",
"Edit expressions first.");
1976 Warning(
"ProcessMessage",
"You have only one expression active.");
1980 Warning(
"ProcessMessage",
"1D drawing options not apply to 2D histograms.");
1989 gROOT->MakeDefCanvas();
2004 std::cout <<
"Use SetTreeName() from context menu and supply a tree name" << std::endl;
2005 std::cout <<
"The context menu is activated by right-clicking the panel from right" << std::endl;
2014 event.fX =
event.fY = 1;
2032 snprintf(command,1024,
"open_session((void*)0x%lx);", (
Long_t)
this);
2114 hd =
new TRootHelpDialog(
this,
"Executing user commands...", 600, 400);
2160 while((leaf=(
TLeaf*)next())) {
2165 char* msg2 =
new char[2000];
2170 char symbol = (char)((*itemType) >> 8);
2171 snprintf(msg2,2000,
"%c expression : %s", symbol, vname);
2175 snprintf(msg2,2000,
"Cut : %s", vname);
2178 snprintf(msg2,2000,
"Box : %s", vname);
2182 snprintf(msg2,2000,
"Expression : %s", vname);
2185 snprintf(msg2,2000,
"Branch : %s", vname);
2187 snprintf(msg2,2000,
"Leaf : %s", vname);
2195 message = message(0,150);
2314 if (strlen(command) > 1999) {
2315 Warning(
"ExecuteCommand",
"Command too long: aborting.");
2318 snprintf(comm,2000,
"%s", command);
2324 gROOT->ProcessLineFast(command);
2326 gROOT->ProcessLine(command);
2417 if (!branches)
return;
2421 for (
id=0;
id<branches->
GetEntries();
id++) {
2425 if (
name.Contains(
"fBits") ||
name.Contains(
"fUniqueID"))
continue;
2433 TIter nextf(
tree->GetTree()->GetListOfFriends() );
2438 for (
id=0;
id<branches->
GetEntries();
id++) {
2442 if (
name.Contains(
"fBits") ||
name.Contains(
"fUniqueID"))
continue;
2461 if (!branch)
return;
2463 if (prefix && strlen(prefix) > 0) {
2465 if (!
name.EndsWith(
"."))
name +=
".";
2473 if (
name.Contains(
"fBits") ||
name.Contains(
"fUniqueID"))
return;
2482 pic =
gClient->GetPicture(
"branch-ob_t.xpm");
2483 spic =
gClient->GetPicture(
"branch-ob_t.xpm");
2486 pic =
gClient->GetPicture(
"branch-cl_t.xpm");
2487 spic =
gClient->GetPicture(
"branch-cl_t.xpm");
2489 pic =
gClient->GetPicture(
"branch_t.xpm");
2490 spic =
gClient->GetPicture(
"branch_t.xpm");
2497 pic =
gClient->GetPicture(
"branch_t.xpm");
2498 spic =
gClient->GetPicture(
"branch_t.xpm");
2504 leaf = (
TLeaf *)leaves->
At(lf);
2509 pic =
gClient->GetPicture(
"leaf_t.xpm");
2510 spic =
gClient->GetPicture(
"leaf_t.xpm");
2515 pic =
gClient->GetPicture(
"leaf_t.xpm");
2516 spic =
gClient->GetPicture(
"leaf_t.xpm");
2538 pic =
gClient->GetPicture(
"branch-ob_t.xpm");
2539 spic =
gClient->GetPicture(
"branch-ob_t.xpm");
2542 pic =
gClient->GetPicture(
"branch-cl_t.xpm");
2543 spic =
gClient->GetPicture(
"branch-cl_t.xpm");
2545 pic =
gClient->GetPicture(
"branch_t.xpm");
2546 spic =
gClient->GetPicture(
"branch_t.xpm");
2551 entry->
SetToolTipText(
"Branch with sub-branches. Can not be dragged");
2557 if (textEntry)
delete textEntry;
2559 pic =
gClient->GetPicture(
"branch_t.xpm");
2560 spic =
gClient->GetPicture(
"branch_t.xpm");
2563 entry->
SetToolTipText(
"Branch with more than one leaf. Can not be dragged");
2572 leaf = (
TLeaf *)leaves->
At(lf);
2577 pic =
gClient->GetPicture(
"leaf_t.xpm");
2578 spic =
gClient->GetPicture(
"leaf_t.xpm");
2581 entry->
SetToolTipText(
"Double-click to draw. Drag to X, Y, Z or scan box.");
2587 pic = (
gClient->GetMimeTypeList())->GetIcon(
"TLeaf",
kFALSE);
2588 if (!pic) pic =
gClient->GetPicture(
"leaf_t.xpm");
2589 spic =
gClient->GetMimeTypeList()->GetIcon(
"TLeaf",
kTRUE);
2590 if (!spic) spic =
gClient->GetPicture(
"leaf_t.xpm");
2593 entry->
SetToolTipText(
"Double-click to draw. Drag to X, Y, Z or scan box.");
2606 for (ind=0; ind<branches->
GetEntries(); ind++) {
2609 MapBranch(branchDaughter,
"", branchItem, listIt);
2641 if (!itemType)
return;
2648 index = (
Int_t)(*itemType >> 8);
2670 static const int buf_size = 2048;
2671 char buf[buf_size], *bp;
2673 int n = vsnprintf(buf, buf_size, fmt, va);
2676 if (
n == -1 ||
n >= buf_size) {
2684 const char *title =
"";
2692 title =
"System Error";
2703 char * msg =
new char[100];
2704 snprintf(msg,100,
"First entry : %lld Last entry : %lld",
2718 Int_t lenfile = strlen(filename);
2722 lenfile = strlen(fname);
2724 fname = (
char*)filename;
2730 out.open(fname, std::ios::out);
2732 fname =
new char[13];
2733 strlcpy(fname,
"treeviewer.C",13);
2734 out.open(fname, std::ios::out);
2737 printf(
"SaveSource cannot open file : %s\n", fname);
2739 if (!lenfile)
delete [] fname;
2746 out <<
"void open_session(void *p = 0);"<<std::endl<<std::endl;
2747 out <<
"void "<<sname.
Data()<<
"() {"<<std::endl;
2748 out <<
"//=========Macro generated by ROOT version"<<
gROOT->GetVersion()<<std::endl;
2749 out <<
"//=========for tree "<<quote<<
fTree->
GetName()<<quote<<
" ("<<t.
AsString()<<
")"<<std::endl;
2750 out <<
"//===This macro can be opened from a TreeViewer session after loading"<<std::endl;
2751 out <<
"//===the corresponding tree, or by running root with the macro name argument"<<std::endl<<std::endl;
2752 out <<
" open_session();"<<std::endl;
2753 out <<
"}"<<std::endl<<std::endl;
2754 out <<
"void open_session(void *p = 0) {"<<std::endl;
2755 out <<
" gSystem->Load("<<quote<<
"libTreeViewer"<<quote<<
");"<<std::endl;
2756 out <<
" TTreeViewer *treeview = (TTreeViewer *) p;"<<std::endl;
2757 out <<
" if (!treeview) treeview = new TTreeViewer();"<<std::endl;
2758 out <<
" TTree *tv_tree = (TTree*)gROOT->FindObject("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2759 out <<
" TFile *tv_file = (TFile*)gROOT->GetListOfFiles()->FindObject("<<quote<<
fFilename<<quote<<
");"<<std::endl;
2760 out <<
" if (!tv_tree) {"<<std::endl;
2761 out <<
" if (!tv_file) tv_file = new TFile("<<quote<<
fFilename<<quote<<
");"<<std::endl;
2762 out <<
" if (tv_file) tv_tree = (TTree*)tv_file->Get("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2763 out <<
" if(!tv_tree) {"<<std::endl;
2764 out <<
" printf(\"Tree %s not found\", "<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2765 out <<
" return;"<<std::endl;
2766 out <<
" }"<<std::endl;
2767 out <<
" }"<<std::endl<<std::endl;
2768 out <<
" treeview->SetTreeName("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2769 out <<
" treeview->SetNexpressions("<<
fNexpressions<<
");"<<std::endl;
2772 out <<
"// Set expressions on axis and cut"<<std::endl;
2773 out <<
" TTVLVEntry *item;"<<std::endl;
2774 for (
Int_t i=0; i<4; i++) {
2777 out <<
"// X expression"<<std::endl;
2780 out <<
"// Y expression"<<std::endl;
2783 out <<
"// Z expression"<<std::endl;
2786 out <<
"// Cut expression"<<std::endl;
2792 out <<
" item = treeview->ExpressionItem("<<i<<
");"<<std::endl;
2793 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2794 <<
", "<<quote<<item->
GetAlias()<<quote<<
");"<<std::endl;
2796 out <<
"// Scan list"<<std::endl;
2798 out <<
" item = treeview->ExpressionItem(4);"<<std::endl;
2799 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2800 <<
", "<<quote<<
"Scan box"<<quote<<
");"<<std::endl;
2801 out <<
"// User defined expressions"<<std::endl;
2808 itemType =
"kFALSE";
2809 out <<
" item = treeview->ExpressionItem("<<crt<<
");"<<std::endl;
2810 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2811 <<
", "<<quote<<item->
GetAlias()<<quote<<
", "<<itemType.
Data()<<
");"<<std::endl;
2814 out <<
"}"<<std::endl;
2816 printf(
"C++ Macro file: %s has been generated\n", fname);
2817 if (!lenfile)
delete [] fname;
2827 Warning(
"SwitchTree",
"No tree found.");
2831 std::string command;
2833 command =
"tv__tree = (TTree *) tv__tree_list->At";
2834 command +=
Form(
"(%i)",index);
2841 command =
"Current Tree : ";
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
void Popup()
Show help dialog.
void RemoveNonStatic()
Remove all non-static items from the list view, except expressions.
I/O classes for TreeViewer session handling.
EGEventType fType
of event (see EGEventType)
TGLayoutHints * fMenuBarLayout
Class to manage histogram axis.
This class represent a specialized expression editor for TTVLVEntry 'true name' and 'alias' data memb...
virtual void Associate(const TGWindow *w)
void InsertText(const char *text)
Insert text in text entry.
TGLayoutHints * fBarLayout
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
virtual void Draw(Option_t *options="")
Draw the spider.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
const char * ScanList()
returns scanlist
virtual void AppendText(const char *text)
Appends text to the end of text entry, clears the selection and moves the cursor to the end of the li...
A TEventList object is a list of selected events (entries) in a TTree.
void SetPosition(Float_t pos)
Set progress position between [min,max].
R__EXTERN const char gTVHelpUserCommands[]
virtual void SetRange(Float_t min, Float_t max)
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other commands generated.
void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this item.
void SetUserCode(const char *code, Bool_t autoexec=kTRUE)
TTVRecord * GetRecord(Int_t i)
Return record at index i.
const char * EmptyBrackets(const char *name)
Empty the bracket content of a string.
void EditExpression()
Start the expression editor.
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
void SetEntry(TTVLVEntry *entry)
Connect one entry.
void SetAlias(const char *alias)
void SetUserCode(const char *code, Bool_t autoexec=kTRUE)
user defined command for current record
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
const char * Data() const
void DoRefresh()
This slot is called when button REFR is clicked.
void SetParentTree(TGListTreeItem *item)
Find parent tree of a clicked item.
void UpdateRecord(const char *name)
Updates current record according to new X, Y, Z settings.
TGHorizontalFrame * fBFrame
void ClearHighlighted()
Un highlight items.
char * Form(const char *fmt,...)
static const char * gOpt1D[12]
TGPopupMenu * fOptionsGen
void SetTreeName(const char *treeName)
Allow geting the tree from the context menu.
const char * Ey()
Return the expression on Y.
virtual void AddEntry(TGString *s, Int_t id)
void SetRecordName(const char *name)
Set record name.
R__EXTERN const char gTVHelpOpenSave[]
This class represent the list view container for the.
TObjArray * GetListOfBranches()
Bool_t SwitchTree(Int_t index)
Makes current the tree at a given index in the list.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
void HighlightItem(TGListTreeItem *item)
Highlight item.
A TTree represents a columnar dataset.
virtual Int_t NumSelected() const
virtual UInt_t GetDefaultHeight() const
void ExecuteSpider()
Draw a spider plot for the selected entries.
virtual const char * GetText() const =0
void Message(const char *msg)
Send a message on the status bar.
TGListTreeItem * GetSelected() const
R__EXTERN const char gTVHelpEditExpressions[]
R__EXTERN const char gTVHelpAbout[]
const char * AsString() const
Return the date & time as a string (ctime() format).
void SetUserData(void *userData)
void ActivateButtons(Bool_t first, Bool_t previous, Bool_t next, Bool_t last)
Enable/disable session buttons.
void SetIniDir(const char *inidir)
Set directory name.
void ExecuteDraw()
Called when the DRAW button is executed.
const TGPicture * fPicStop
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
virtual const char * GetError()
Return system error string.
const TGPicture * fPicRefr
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void TurnOff()
Remove timer from system timer list.
TGCompositeFrame * fListHdr
TGPictureButton * fBGNext
TGHProgressBar * fProgressBar
void NewExpression()
Create new expression.
TTVLVEntry * EditedEntry()
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
TGPopupMenu * fOptionsMenu
A graphic user interface designed to handle ROOT trees and to take advantage of TTree class features.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
A TFriendElement TF describes a TTree object TF in a file.
virtual Bool_t cd(const char *path=nullptr)
Change current directory to "this" directory.
const char * Cut()
Apply Cut.
void SaveSource(const char *filename="", Option_t *option="")
Save current session as a C++ macro file.
TList * ExpressionList()
Return the list of user-defined expressions.
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)
void PrintEntries()
Print the number of selected entries on status-bar.
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
void * GetUserData() const
TObject * UncheckedAt(Int_t i) const
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
TObject * At(Int_t idx) const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
static TGSelectBox * GetInstance()
Return the pointer to the instantiated singleton.
void GrabPointer()
Just focus the cursor inside.
EMouseButton
Button names.
R__EXTERN const char gTVHelpSession[]
void UpdateCombo()
Updates combo box to current session entries.
const char * Ex()
Get the expression to be drawn on X axis.
virtual void AddThisItem(TTVLVEntry *item)
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
const Int_t kDoNotProcess
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SetHeight(UInt_t h)
virtual void SetText(TGString *newText)
Set new text in label.
const char * GetGrOpt()
Get graph option.
virtual void MapWindow()
map window
TString & ReplaceAll(const TString &s1, const TString &s2)
void SetSmallPic(const TGPicture *spic)
Set small picture.
void SetCurrentRecord(Long64_t entry)
Set current record.
TList * ExpressionList()
Get the list of expression items.
I/O classes for TreeViewer session handling.
TTVRecord * AddRecord(Bool_t fromFile=kFALSE)
Add a record.
virtual TObjArray * GetListOfBranches()
void SetViewer(TTreeViewer *viewer)
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
void MapOptions(Long_t parm1)
Scan the selected options from option menu.
const char * Ez()
Get the expression to be drawn on Z axis.
Int_t Dimension()
Compute dimension of the histogram.
void SetScanFileName(const char *name="")
Set the name of the file where to redirect <Scan> output.
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual void RemoveItem(TGFrame *item)
Remove item from container.
void ToUpper()
Change string to upper case.
Int_t MakeSelector(const char *selector=0)
Get use of TTree::MakeSelector() via the context menu.
static const char * gOpenTypes[]
static const char * gMacroTypes[]
Collectable string class.
virtual void SetEventList(TEventList *list)
This function transfroms the given TEventList into a TEntryList The new TEntryList is owned by the TT...
static const char * gOptgen[16]
Implement some of the functionality of the class TTree requiring access to extra libraries (Histogram...
A TTree is a list of TBranches.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
static const char * gOpt2D[14]
virtual void DeleteWindow()
Delete window.
const char * Ez()
Return the expression on Z.
void RemoveLastRecord()
Remove the current record.
Handles synchronous and a-synchronous timer events.
TContextMenu * fContextMenu
virtual Double_t GetMinPositionD() const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
virtual void SendCloseMessage()
Send close message to self.
TTreeViewer(const char *treeName=0)
TTreeViewer default constructor.
void SetFillType(EFillType type)
Set fill type.
R__EXTERN const char gTVHelpContext[]
void Empty()
Clear all names and alias.
TGTextEntry * fBarCommand
TTVLVEntry * ExpressionItem(Int_t index)
Get the item from a specific position.
virtual void DoError(int level, const char *location, const char *fmt, va_list va) const
Interface to ErrorHandler (protected).
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Process this tree executing the TSelector code in the specified filename.
virtual Long64_t GetReadEntry() const
void SetTree(TTree *tree)
Assign the fTree member from existing tree, e.g.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual TTree * GetTree()
Return pointer to friend TTree.
void SetLabel(const char *title)
Set label of selection box.
void SetFile()
Set file name containing the tree.
void SelectItem(const char *name)
Select an item.
TString & Remove(Ssiz_t pos)
TTVLVContainer * fLVContainer
void Show(TTVRecord *rec)
Display record rec.
R__EXTERN const char gTVHelpMacros[]
TString & Append(const char *cs)
virtual Int_t Exec(const char *shellcmd)
Execute a command.
const TGPicture * fPicDraw
Each ROOT class (see TClass) has a linked list of methods.
TGPictureButton * fBGLast
R__EXTERN const char gTVHelpDrawing[]
Bool_t HandleTimer(TTimer *timer)
This function is called by the fTimer object.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
R__EXTERN TApplication * gApplication
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void BuildInterface()
Create all viewer widgets.
virtual void SetContainer(TGFrame *f)
Set list view container.
void EmptyAll()
Clear all names and aliases for expression type items.
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
virtual Double_t GetMaxPositionD() const
virtual void Terminate(Int_t status=0)
void SetSession(TTVSession *session)
Set current session.
void SetGrOpt(const char *option)
Set graph option.
TGTextEntry * fBarListOut
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void UpdateRecord(const char *name="new name")
Updates current record to new X, Y, Z items.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
const char * GetTrueName()
virtual Int_t MakeSelector(const char *selector=0, Option_t *option="")
Generate skeleton selector class for this tree.
const char * ConvertAliases()
Convert all aliases into true names.
TGItemContext * GetContext()
virtual UInt_t GetDefaultHeight() const
TGDoubleVSlider * fSlider
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
R__EXTERN TSystem * gSystem
virtual ~TTreeViewer()
TTreeViewer destructor.
virtual const char * GetName() const
Returns name of object.
Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=TTree::kMaxEntries, Long64_t firstentry=0)
Get use of TTree::Process() via the context menu.
void AppendTree(TTree *tree)
Allow geting the tree from the context menu.
Sequenceable collection abstract base class.
void RemoveItem()
Remove the selected item from the list.
void MapBranch(TBranch *branch, const char *prefix="", TGListTreeItem *parent=0, Bool_t listIt=kTRUE)
Map current branch and expand its content in the list view.
void SetRecordName(const char *name)
Set record name.
TGPictureButton * fBGFirst
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
virtual Long64_t GetMaxPositionL() const
const char * En(Int_t n)
Get the n'th expression.
TGLayoutHints * fMenuBarItemLayout
virtual void SetTimerInterval(Int_t msec=333)
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void Layout()
Layout list view components (container and contents of container).
void EmptyAll()
Clear the content of all items in the list view.
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.
R__EXTERN const char gTVHelpLayout[]
const char * Cut()
Return the cut entry.
virtual void CloseWindow()
Close the viewer.
void DoError(int level, const char *location, const char *fmt, va_list va) const
Put error/warning into TMsgBox and also forward to console.
void SetScanRedirect(Bool_t mode)
Set the state of Scan check button.
void SetTrueName(const char *name)
virtual void SetWidth(UInt_t w)
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
void SetListView(TGListView *lv)
R__EXTERN const char gHelpAbout[]
virtual void * GetUserData() const =0
This class represent entries that goes into the TreeViewer listview container.
Bool_t IsScanRedirected()
Return kTRUE if scan is redirected.
void SetHistogramTitle(const char *title)
Set title of Histogram.
TGLayoutHints * fMenuBarHelpLayout
virtual void Add(TObject *obj)
Mother of all ROOT objects.
const char * Ey()
Get the expression to be drawn on Y axis.
TH1 is the base class of all histogram classes in ROOT.
virtual Long64_t GetMinPositionL() const
virtual TFile * GetFile() const
void ExecuteCommand(const char *command, Bool_t fast=kFALSE)
Execute all user commands.
virtual void SetContainer(TGFrame *f)
static Pixel_t GetWhitePixel()
Get white pixel value.
Describe directory structure in memory.
const char * ScanList()
Return the cut entry.
const char * GetText() const
const char * GetString() const
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
void RemoveLastRecord()
Remove current record from list.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
TGCompositeFrame * fTreeHdr
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
virtual const char * GetName() const
Returns name of object.
TGPictureButton * fBGPrevious
void Empty()
Empty the content of the selected expression.
virtual UInt_t GetDefaultWidth() const
R__EXTERN const char gTVHelpStart[]
virtual void TurnOn()
Add the timer to the system timer list.
TGViewPort * GetViewPort() const
void MapTree(TTree *tree, TGListTreeItem *parent=0, Bool_t listIt=kTRUE)
Map current tree and expand its content (including friends) in the lists.
TObjArray * GetListOfLeaves()
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
void SetNexpressions(Int_t expr)
Change the number of expression widgets.
const TGWindow * GetRoot() const
Returns current root (i.e.
void Reset()
Reset the timer.
virtual void RemoveAll()
Remove all items from the container.
TGPictureButton * fBGRecord
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual TObjArray * GetListOfLeaves()
virtual Long64_t GetEntries() const
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
virtual void Layout()
Layout the elements of the composite frame.
TTVLVEntry * ExpressionItem(Int_t index)
Return the expression item at specific position.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
TGListTreeItem * GetParent() const
void SaveSource(std::ofstream &out)
Save the TTVSession in a C++ macro file.
void Clear(Option_t *option="")
Clears up the text entry.
R__EXTERN const char gTVHelpDraggingItems[]
virtual void SetPosition(Float_t min, Float_t max)
virtual void Draw(Option_t *option="")
Draw this histogram with options.
const char * Ex()
Return the expression on X.
virtual const TGFrame * GetNextSelected(void **current)
Return the next selected item.
void Draw3DCorner(Bool_t corner)