177#include "RConfigure.h"
235 "",
"AXIS",
"HIST",
"SAME",
"CYL",
"POL",
"SPH",
"PSR",
"LEGO",
"LEGO1",
"LEGO2",
236 "SURF",
"SURF1",
"SURF2",
"SURF3",
"SURF4"
240 "",
"AH",
"B",
"C",
"E",
"E1",
"E2",
"E3",
"E4",
"L",
"P",
"*H"
244 "",
"ARR",
"BOX",
"COL",
"COL2",
"CONT",
"CONT0",
"CONT1",
"CONT2",
"CONT3",
245 "FB",
"BB",
"SCAT",
"PROF"
318 fDimension(0), fVarDraw(0), fScanMode(0),
319 fTreeIndex(0), fDefaultCursor(0), fWatchCursor(0),
320 fCounting(0), fStopMapping(0), fEnableCut(0),fNexpressions(0)
325 gROOT->ProcessLine(
"#ifndef GTV_DEFINED\n\
326 TTreeViewer *gTV = 0;\n\
327 TTree *tv__tree = 0;\n\
328 TList *tv__tree_list = 0;\n\
329 TFile *tv__tree_file = 0;\n\
330 #define GTV_DEFINED\n\
333 gROOT->ProcessLine(command);
335 gROOT->ProcessLine(
"tv__tree_list = new TList;");
346 fDimension(0), fVarDraw(0), fScanMode(0),
347 fTreeIndex(0), fDefaultCursor(0), fWatchCursor(0),
348 fCounting(0), fStopMapping(0), fEnableCut(0),fNexpressions(0)
355 gROOT->ProcessLine(
"#ifndef GTV_DEFINED\n\
356 TTreeViewer *gTV = 0;\n\
357 TTree *tv__tree = 0;\n\
358 TList *tv__tree_list = 0;\n\
359 TFile *tv__tree_file = 0;\n\
360 #define GTV_DEFINED\n\
363 gROOT->ProcessLine(command);
366 gROOT->ProcessLine(
"tv__tree_list = new TList;");
372 if (cdir) cdir->
cd();
377 cdir =
tree->GetDirectory();
381 if (dirsav) dirsav->
cd();
392 printf(
"Tree found\n");
395 while ((ftree = (
TTree*)next())) {
396 if (ftree==
tree) {printf(
"found at index %i\n", index);
break;}
435 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
454 if (diff <= 0)
return;
499 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
517 if (!treeName)
return;
521 printf(
"Tree found\n");
525 if (!strcmp(treeName,
tree->GetName())) {printf(
"found at index %i\n", index);
break;}
564 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
588 while ((obj=next())) {
594 std::cout <<
"File name : "<<
fFilename << std::endl;
620 gClient->GetColorByName(
"blue",color);
799 fBarOption->
SetToolTipText(
"Histogram graphics option. Type option here and click <Draw> (or <ENTER> to update current histogram).");
904 fSPIDER->
Connect(
"Clicked()",
"TTreeViewer",
this,
"ExecuteSpider()");
925 fREFR->
Connect(
"Clicked()",
"TTreeViewer",
this,
"DoRefresh()");
1081 entry->
SetToolTipText(
"X expression. Drag and drop expressions here");
1090 entry->
SetToolTipText(
"Y expression. Drag and drop expressions here");
1099 entry->
SetToolTipText(
"Z expression. Drag and drop expressions here");
1105 pic =
gClient->GetPicture(
"cut_t.xpm");
1106 spic =
gClient->GetPicture(
"cut_t.xpm");
1109 entry->
SetToolTipText(
"Active cut. Double-click to enable/disable");
1115 pic =
gClient->GetPicture(
"pack_t.xpm");
1116 spic =
gClient->GetPicture(
"pack-empty_t.xpm");
1119 entry->
SetToolTipText(
"Drag and drop expressions/leaves here. Double-click to scan. Check <Scan> to redirect on file.");
1128 pic =
gClient->GetPicture(
"expression_t.xpm");
1129 spic =
gClient->GetPicture(
"expression_t.xpm");
1132 entry->
SetToolTipText(
"User defined expression/cut. Double-click to edit");
1301 while (stripped.
Index(
"[", index) !=
kNPOS) {
1307 return (objstr->
String()).Data();
1310 retstr = stripped.
Remove(start+1, end-start-1);
1315 return (objstr->
String()).Data();
1334 Warning(
"Empty",
"No item selected.");
1339 Warning(
"Empty",
"Not expression type.");
1385 Int_t dimension = 0;
1395 if (alias[0].BeginsWith(
"~")) alias[0].
Remove(0, 1);
1398 if (
Ez() && strlen(
Ez())) {
1403 if (alias[2].BeginsWith(
"~")) alias[2].
Remove(0, 1);
1405 if ((
Ez() && strlen(
Ez())) && ((
Ex() &&strlen(
Ex())) || (
Ey() && strlen(
Ey())))) varexp +=
":";
1406 if (
Ey() && strlen(
Ey())) {
1411 if (alias[1].BeginsWith(
"~")) alias[1].
Remove(0, 1);
1413 if (
Ey() && strlen(
Ey()) &&
Ex() && strlen(
Ex())) varexp +=
":";
1414 if (
Ex () && strlen(
Ex())) {
1419 if (alias[0].BeginsWith(
"~")) alias[0].
Remove(0, 1);
1423 Warning(
"ExecuteDraw",
"Nothing to draw on X,Y,Z.");
1448 const char *cut =
"";
1461 command =
TString::Format(
"tv__tree->Scan(\"%s\",\"%s\",\"%s\", %lld, %lld);",
1484 if (current == last) {
1488 if (dimension == 3 && strlen(gopt)) {
1489 std::cout <<
"Graphics option " << gopt <<
" not valid for 3D histograms" << std::endl;
1492 std::cout <<
" Graphics option for current histogram changed to " << gopt << std::endl;
1506 if (dimension == 3 && strlen(gopt)) {
1507 std::cout <<
"Graphics option " << gopt <<
" not valid for 3D histograms" << std::endl;
1511 command =
TString::Format(
"tv__tree->Draw(\"%s\",\"%s\",\"%s\", %lld, %lld);",
1528 for (i=0; i<3; i++) {
1529 if (alias[i].Length()) {
1531 alias[current] = alias[i];
1542 for (
Int_t ind=0; ind<3; ind++) axis[ind]->SetTitle(alias[ind].Data());
1553 Int_t dimension = 0;
1558 if (
Ez() && strlen(
Ez())) {
1559 previousexp =
kTRUE;
1564 if (alias[2].BeginsWith(
"~")) alias[2].
Remove(0, 1);
1566 if ((
Ez() && strlen(
Ez())) && ((
Ex() && strlen(
Ex())) || (
Ey() && strlen(
Ey())))) varexp +=
":";
1567 if (
Ey() && strlen(
Ey())) {
1568 previousexp =
kTRUE;
1573 if (alias[1].BeginsWith(
"~")) alias[1].
Remove(0, 1);
1575 if (
Ey() && strlen(
Ey()) &&
Ex() && strlen(
Ex())) varexp +=
":";
1576 if (
Ex() && strlen(
Ex())) {
1577 previousexp =
kTRUE;
1582 if (alias[0].BeginsWith(
"~")) alias[0].
Remove(0, 1);
1584 for(
Int_t i=0;i<10;++i){
1585 if(
En(i+5) && strlen(
En(i+5))){
1590 }
else varexp =
En(i+5);
1591 previousexp =
kTRUE;
1595 Warning(
"ExecuteSpider",
"Need at least 3 variables");
1615 const char *cut =
"";
1661 if(
e)
return e->ConvertAliases();
1674 Warning(
"EditExpression",
"No item selected.");
1680 Warning(
"EditExpression",
"Not expression type.");
1704 if (!
fTree)
return 0;
1713 if (!
fTree)
return 0;
1750 Warning(
"RemoveItem",
"No item selected.");
1756 Warning(
"RemoveItem",
"Not removable type.");
1971 Warning(
"ProcessMessage",
"Edit expressions first.");
1975 Warning(
"ProcessMessage",
"You have only one expression active.");
1979 Warning(
"ProcessMessage",
"1D drawing options not apply to 2D histograms.");
1988 gROOT->MakeDefCanvas();
2003 std::cout <<
"Use SetTreeName() from context menu and supply a tree name" << std::endl;
2004 std::cout <<
"The context menu is activated by right-clicking the panel from right" << std::endl;
2013 event.fX =
event.fY = 1;
2031 snprintf(command,1024,
"open_session((void*)0x%lx);", (
Long_t)
this);
2113 hd =
new TRootHelpDialog(
this,
"Executing user commands...", 600, 400);
2159 while((leaf=(
TLeaf*)next())) {
2164 char* msg2 =
new char[2000];
2169 char symbol = (char)((*itemType) >> 8);
2170 snprintf(msg2,2000,
"%c expression : %s", symbol, vname);
2174 snprintf(msg2,2000,
"Cut : %s", vname);
2177 snprintf(msg2,2000,
"Box : %s", vname);
2181 snprintf(msg2,2000,
"Expression : %s", vname);
2184 snprintf(msg2,2000,
"Branch : %s", vname);
2186 snprintf(msg2,2000,
"Leaf : %s", vname);
2194 message = message(0,150);
2313 if (strlen(command) > 1999) {
2314 Warning(
"ExecuteCommand",
"Command too long: aborting.");
2317 snprintf(comm,2000,
"%s", command);
2323 gROOT->ProcessLineFast(command);
2325 gROOT->ProcessLine(command);
2420 for (
id=0;
id<
branches->GetEntries();
id++) {
2424 if (
name.Contains(
"fBits") ||
name.Contains(
"fUniqueID"))
continue;
2432 TIter nextf(
tree->GetTree()->GetListOfFriends() );
2437 for (
id=0;
id<
branches->GetEntries();
id++) {
2441 if (
name.Contains(
"fBits") ||
name.Contains(
"fUniqueID"))
continue;
2460 if (!branch)
return;
2462 if (prefix && strlen(prefix) > 0) {
2464 if (!
name.EndsWith(
"."))
name +=
".";
2472 if (
name.Contains(
"fBits") ||
name.Contains(
"fUniqueID"))
return;
2481 pic =
gClient->GetPicture(
"branch-ob_t.xpm");
2482 spic =
gClient->GetPicture(
"branch-ob_t.xpm");
2485 pic =
gClient->GetPicture(
"branch-cl_t.xpm");
2486 spic =
gClient->GetPicture(
"branch-cl_t.xpm");
2488 pic =
gClient->GetPicture(
"branch_t.xpm");
2489 spic =
gClient->GetPicture(
"branch_t.xpm");
2496 pic =
gClient->GetPicture(
"branch_t.xpm");
2497 spic =
gClient->GetPicture(
"branch_t.xpm");
2503 leaf = (
TLeaf *)leaves->
At(lf);
2508 pic =
gClient->GetPicture(
"leaf_t.xpm");
2509 spic =
gClient->GetPicture(
"leaf_t.xpm");
2514 pic =
gClient->GetPicture(
"leaf_t.xpm");
2515 spic =
gClient->GetPicture(
"leaf_t.xpm");
2537 pic =
gClient->GetPicture(
"branch-ob_t.xpm");
2538 spic =
gClient->GetPicture(
"branch-ob_t.xpm");
2541 pic =
gClient->GetPicture(
"branch-cl_t.xpm");
2542 spic =
gClient->GetPicture(
"branch-cl_t.xpm");
2544 pic =
gClient->GetPicture(
"branch_t.xpm");
2545 spic =
gClient->GetPicture(
"branch_t.xpm");
2550 entry->
SetToolTipText(
"Branch with sub-branches. Can not be dragged");
2556 if (textEntry)
delete textEntry;
2558 pic =
gClient->GetPicture(
"branch_t.xpm");
2559 spic =
gClient->GetPicture(
"branch_t.xpm");
2562 entry->
SetToolTipText(
"Branch with more than one leaf. Can not be dragged");
2571 leaf = (
TLeaf *)leaves->
At(lf);
2576 pic =
gClient->GetPicture(
"leaf_t.xpm");
2577 spic =
gClient->GetPicture(
"leaf_t.xpm");
2580 entry->
SetToolTipText(
"Double-click to draw. Drag to X, Y, Z or scan box.");
2586 pic = (
gClient->GetMimeTypeList())->GetIcon(
"TLeaf",
kFALSE);
2587 if (!pic) pic =
gClient->GetPicture(
"leaf_t.xpm");
2588 spic =
gClient->GetMimeTypeList()->GetIcon(
"TLeaf",
kTRUE);
2589 if (!spic) spic =
gClient->GetPicture(
"leaf_t.xpm");
2592 entry->
SetToolTipText(
"Double-click to draw. Drag to X, Y, Z or scan box.");
2605 for (ind=0; ind<
branches->GetEntries(); ind++) {
2608 MapBranch(branchDaughter,
"", branchItem, listIt);
2640 if (!itemType)
return;
2647 index = (
Int_t)(*itemType >> 8);
2669 static const int buf_size = 2048;
2670 char buf[buf_size], *bp;
2672 int n = vsnprintf(buf, buf_size, fmt, va);
2675 if (
n == -1 ||
n >= buf_size) {
2683 const char *title =
"";
2691 title =
"System Error";
2702 char * msg =
new char[100];
2703 snprintf(msg,100,
"First entry : %lld Last entry : %lld",
2717 Int_t lenfile = strlen(filename);
2721 lenfile = strlen(fname);
2723 fname = (
char*)filename;
2729 out.open(fname, std::ios::out);
2731 fname =
new char[13];
2732 strlcpy(fname,
"treeviewer.C",13);
2733 out.open(fname, std::ios::out);
2736 printf(
"SaveSource cannot open file : %s\n", fname);
2738 if (!lenfile)
delete [] fname;
2745 out <<
"void open_session(void *p = 0);"<<std::endl<<std::endl;
2746 out <<
"void "<<sname.
Data()<<
"() {"<<std::endl;
2747 out <<
"//=========Macro generated by ROOT version"<<
gROOT->GetVersion()<<std::endl;
2748 out <<
"//=========for tree "<<quote<<
fTree->
GetName()<<quote<<
" ("<<t.
AsString()<<
")"<<std::endl;
2749 out <<
"//===This macro can be opened from a TreeViewer session after loading"<<std::endl;
2750 out <<
"//===the corresponding tree, or by running root with the macro name argument"<<std::endl<<std::endl;
2751 out <<
" open_session();"<<std::endl;
2752 out <<
"}"<<std::endl<<std::endl;
2753 out <<
"void open_session(void *p = 0) {"<<std::endl;
2754 out <<
" gSystem->Load("<<quote<<
"libTreeViewer"<<quote<<
");"<<std::endl;
2755 out <<
" TTreeViewer *treeview = (TTreeViewer *) p;"<<std::endl;
2756 out <<
" if (!treeview) treeview = new TTreeViewer();"<<std::endl;
2757 out <<
" TTree *tv_tree = (TTree*)gROOT->FindObject("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2758 out <<
" TFile *tv_file = (TFile*)gROOT->GetListOfFiles()->FindObject("<<quote<<
fFilename<<quote<<
");"<<std::endl;
2759 out <<
" if (!tv_tree) {"<<std::endl;
2760 out <<
" if (!tv_file) tv_file = new TFile("<<quote<<
fFilename<<quote<<
");"<<std::endl;
2761 out <<
" if (tv_file) tv_tree = (TTree*)tv_file->Get("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2762 out <<
" if(!tv_tree) {"<<std::endl;
2763 out <<
" printf(\"Tree %s not found\", "<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2764 out <<
" return;"<<std::endl;
2765 out <<
" }"<<std::endl;
2766 out <<
" }"<<std::endl<<std::endl;
2767 out <<
" treeview->SetTreeName("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2768 out <<
" treeview->SetNexpressions("<<
fNexpressions<<
");"<<std::endl;
2771 out <<
"// Set expressions on axis and cut"<<std::endl;
2772 out <<
" TTVLVEntry *item;"<<std::endl;
2773 for (
Int_t i=0; i<4; i++) {
2776 out <<
"// X expression"<<std::endl;
2779 out <<
"// Y expression"<<std::endl;
2782 out <<
"// Z expression"<<std::endl;
2785 out <<
"// Cut expression"<<std::endl;
2791 out <<
" item = treeview->ExpressionItem("<<i<<
");"<<std::endl;
2792 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2793 <<
", "<<quote<<item->
GetAlias()<<quote<<
");"<<std::endl;
2795 out <<
"// Scan list"<<std::endl;
2797 out <<
" item = treeview->ExpressionItem(4);"<<std::endl;
2798 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2799 <<
", "<<quote<<
"Scan box"<<quote<<
");"<<std::endl;
2800 out <<
"// User defined expressions"<<std::endl;
2807 itemType =
"kFALSE";
2808 out <<
" item = treeview->ExpressionItem("<<crt<<
");"<<std::endl;
2809 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2810 <<
", "<<quote<<item->
GetAlias()<<quote<<
", "<<itemType.
Data()<<
");"<<std::endl;
2813 out <<
"}"<<std::endl;
2815 printf(
"C++ Macro file: %s has been generated\n", fname);
2816 if (!lenfile)
delete [] fname;
2826 Warning(
"SwitchTree",
"No tree found.");
2830 std::string command;
2832 command =
"tv__tree = (TTree *) tv__tree_list->At";
2833 command +=
Form(
"(%i)",index);
2840 command =
"Current Tree : ";
R__EXTERN const char gTVHelpLayout[]
R__EXTERN const char gTVHelpStart[]
R__EXTERN const char gTVHelpDrawing[]
R__EXTERN const char gTVHelpOpenSave[]
R__EXTERN const char gTVHelpMacros[]
R__EXTERN const char gTVHelpEditExpressions[]
R__EXTERN const char gTVHelpAbout[]
R__EXTERN const char gTVHelpDraggingItems[]
R__EXTERN const char gTVHelpUserCommands[]
R__EXTERN const char gTVHelpSession[]
R__EXTERN const char gTVHelpContext[]
R__EXTERN const char gHelpAbout[]
R__EXTERN TApplication * gApplication
const Int_t kDoNotProcess
char * Form(const char *fmt,...)
char * StrDup(const char *str)
Duplicate the string str.
R__EXTERN TSystem * gSystem
static const char * gOpt2D[14]
static const char * gOptgen[16]
static const char * gOpenTypes[]
static const char * gOpt1D[12]
static const char * gMacroTypes[]
virtual void Terminate(Int_t status=0)
Class to manage histogram axis.
A TTree is a list of TBranches.
TObjArray * GetListOfBranches()
TObjArray * GetListOfLeaves()
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsString() const
Return the date & time as a string (ctime() format).
Describe directory structure in memory.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual TFile * GetFile() const
A TEventList object is a list of selected events (entries) in a TTree.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
A TFriendElement TF describes a TTree object TF in a file.
virtual TTree * GetTree()
Return pointer to friend TTree.
virtual void SetContainer(TGFrame *f)
TGViewPort * GetViewPort() const
const TGWindow * GetRoot() const
Returns current root (i.e.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void AddEntry(TGString *s, Int_t id)
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
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...
TGCompositeFrame(const TGCompositeFrame &)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual UInt_t GetDefaultWidth() const
virtual void Layout()
Layout the elements of the composite frame.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual UInt_t GetDefaultHeight() const
virtual void Associate(const TGWindow *w)
virtual void RemoveItem(TGFrame *item)
Remove item from container.
virtual const TGFrame * GetNextSelected(void **current)
Return the next selected item.
virtual Int_t NumSelected() const
virtual void RemoveAll()
Remove all items from the container.
virtual Float_t GetMaxPosition() const
virtual Float_t GetMinPosition() const
virtual void SetRange(Float_t min, Float_t max)
virtual void SetPosition(Float_t min, Float_t max)
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual UInt_t GetDefaultHeight() const
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
virtual void DeleteWindow()
Delete window.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void SetWidth(UInt_t w)
virtual void SetHeight(UInt_t h)
void ShowPosition(Bool_t set=kTRUE, Bool_t percent=kTRUE, const char *format="%.2f")
Show postion text, either in percent or formatted according format.
void * GetUserData() const
void SetUserData(void *userData)
virtual void SetText(TGString *newText)
Set new text in label.
virtual const char * GetText() const =0
TGListTreeItem * GetParent() const
virtual void * GetUserData() const =0
void ClearHighlighted()
Un highlight items.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
TGListTreeItem * GetSelected() const
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
void HighlightItem(TGListTreeItem *item)
Highlight item.
virtual void Layout()
Layout list view components (container and contents of container).
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
virtual void SetContainer(TGFrame *f)
Set list view container.
virtual void SendCloseMessage()
Send close message to self.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
void SetPosition(Float_t pos)
Set progress position between [min,max].
void SetFillType(EFillType type)
Set fill type.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
This class represent a specialized expression editor for TTVLVEntry 'true name' and 'alias' data memb...
TTVLVEntry * EditedEntry()
void InsertText(const char *text)
Insert text in text entry.
void GrabPointer()
Just focus the cursor inside.
void SetLabel(const char *title)
Set label of selection box.
void SetEntry(TTVLVEntry *entry)
Connect one entry.
static TGSelectBox * GetInstance()
Return the pointer to the instantiated singleton.
void Draw3DCorner(Bool_t corner)
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
const char * GetString() const
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
const char * GetText() const
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
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...
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
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.
void Clear(Option_t *option="")
Clears up the text entry.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual void Draw(Option_t *option="")
Draw this histogram with options.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Each ROOT class (see TClass) has a linked list of methods.
virtual const char * GetName() const
Returns name of object.
Int_t GetEntries() const
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const
Collectable string class.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void DoError(int level, const char *location, const char *fmt, va_list va) const
Interface to ErrorHandler (protected).
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
The most important graphics class in the ROOT system.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
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.
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
void Popup()
Show help dialog.
Sequenceable collection abstract base class.
virtual void Draw(Option_t *options="")
Draw the spider.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
void ToUpper()
Change string to upper case.
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual const char * GetError()
Return system error string.
This class represent the list view container for the.
void SelectItem(const char *name)
Select an item.
void SetViewer(TTreeViewer *viewer)
TList * ExpressionList()
Return the list of user-defined expressions.
const char * Cut()
Return the cut entry.
const char * Ez()
Return the expression on Z.
const char * Ey()
Return the expression on Y.
const char * ScanList()
Return the cut entry.
virtual void AddThisItem(TTVLVEntry *item)
TTVLVEntry * ExpressionItem(Int_t index)
Return the expression item at specific position.
void SetListView(TGListView *lv)
const char * Ex()
Return the expression on X.
void EmptyAll()
Clear all names and aliases for expression type items.
void RemoveNonStatic()
Remove all non-static items from the list view, except expressions.
This class represent entries that goes into the TreeViewer listview container.
TGItemContext * GetContext()
void SetSmallPic(const TGPicture *spic)
Set small picture.
void SetAlias(const char *alias)
void SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this item.
void SetTrueName(const char *name)
const char * ConvertAliases()
Convert all aliases into true names.
void Empty()
Clear all names and alias.
const char * GetTrueName()
I/O classes for TreeViewer session handling.
void SetUserCode(const char *code, Bool_t autoexec=kTRUE)
virtual const char * GetName() const
Returns name of object.
I/O classes for TreeViewer session handling.
void SaveSource(std::ofstream &out)
Save the TTVSession in a C++ macro file.
TTVRecord * GetRecord(Int_t i)
Return record at index i.
void SetRecordName(const char *name)
Set record name.
void Show(TTVRecord *rec)
Display record rec.
void RemoveLastRecord()
Remove current record from list.
TTVRecord * AddRecord(Bool_t fromFile=kFALSE)
Add a record.
void UpdateRecord(const char *name)
Updates current record according to new X, Y, Z settings.
Handles synchronous and a-synchronous timer events.
virtual void TurnOff()
Remove timer from system timer list.
virtual void TurnOn()
Add the timer to the system timer list.
void Reset()
Reset the timer.
Implement some of the functionality of the class TTree requiring access to extra libraries (Histogram...
A graphic user interface designed to handle ROOT trees and to take advantage of TTree class features.
void SetUserCode(const char *code, Bool_t autoexec=kTRUE)
user defined command for current record
void SetCurrentRecord(Long64_t entry)
Set current record.
TGHProgressBar * fProgressBar
void SetHistogramTitle(const char *title)
Set title of Histogram.
TTreeViewer(const char *treeName=0)
TTreeViewer default constructor.
const char * Ez()
Get the expression to be drawn on Z axis.
Bool_t HandleTimer(TTimer *timer)
This function is called by the fTimer object.
void UpdateRecord(const char *name="new name")
Updates current record to new X, Y, Z items.
TGTextEntry * fBarCommand
void EditExpression()
Start the expression editor.
void SetNexpressions(Int_t expr)
Change the number of expression widgets.
TGPictureButton * fBGFirst
void MapOptions(Long_t parm1)
Scan the selected options from option menu.
Bool_t IsScanRedirected()
Return kTRUE if scan is redirected.
void NewExpression()
Create new expression.
void SaveSource(const char *filename="", Option_t *option="")
Save current session as a C++ macro file.
void SetSession(TTVSession *session)
Set current session.
void SetParentTree(TGListTreeItem *item)
Find parent tree of a clicked item.
const char * EmptyBrackets(const char *name)
Empty the bracket content of a string.
virtual ~TTreeViewer()
TTreeViewer destructor.
TTVLVEntry * ExpressionItem(Int_t index)
Get the item from a specific position.
void AppendTree(TTree *tree)
Allow geting the tree from the context menu.
void SetScanRedirect(Bool_t mode)
Set the state of Scan check button.
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.
Bool_t SwitchTree(Int_t index)
Makes current the tree at a given index in the list.
void ExecuteDraw()
Called when the DRAW button is executed.
const TGPicture * fPicRefr
void SetRecordName(const char *name)
Set record name.
const char * Cut()
Apply Cut.
void RemoveItem()
Remove the selected item from the list.
TGLayoutHints * fBarLayout
TContextMenu * fContextMenu
void EmptyAll()
Clear the content of all items in the list view.
TGPictureButton * fBGNext
void SetTreeName(const char *treeName)
Allow geting the tree from the context menu.
void Empty()
Empty the content of the selected expression.
const char * En(Int_t n)
Get the n'th expression.
TGLayoutHints * fMenuBarItemLayout
void Message(const char *msg)
Send a message on the status bar.
virtual void CloseWindow()
Close the viewer.
void ExecuteCommand(const char *command, Bool_t fast=kFALSE)
Execute all user commands.
void BuildInterface()
Create all viewer widgets.
void UpdateCombo()
Updates combo box to current session entries.
const char * GetGrOpt()
Get graph option.
TGCompositeFrame * fTreeHdr
Int_t Dimension()
Compute dimension of the histogram.
Int_t MakeSelector(const char *selector=0)
Get use of TTree::MakeSelector() via the context menu.
void SetTree(TTree *tree)
Assign the fTree member from existing tree, e.g.
TGDoubleVSlider * fSlider
void DoRefresh()
This slot is called when button REFR is clicked.
const TGPicture * fPicDraw
TGPictureButton * fBGLast
const char * Ex()
Get the expression to be drawn on X axis.
TList * ExpressionList()
Get the list of expression items.
const TGPicture * fPicStop
void ActivateButtons(Bool_t first, Bool_t previous, Bool_t next, Bool_t last)
Enable/disable session buttons.
void MapTree(TTree *tree, TGListTreeItem *parent=0, Bool_t listIt=kTRUE)
Map current tree and expand its content (including friends) in the lists.
void SetFile()
Set file name containing the tree.
TGPopupMenu * fOptionsMenu
void RemoveLastRecord()
Remove the current record.
TGLayoutHints * fMenuBarHelpLayout
TGPictureButton * fBGPrevious
void PrintEntries()
Print the number of selected entries on status-bar.
TTVLVContainer * fLVContainer
void SetGrOpt(const char *option)
Set graph option.
TGPopupMenu * fOptionsGen
TGLayoutHints * fMenuBarLayout
const char * Ey()
Get the expression to be drawn on Y axis.
TGHorizontalFrame * fBFrame
const char * ScanList()
returns scanlist
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other commands generated.
TGCompositeFrame * fListHdr
TGTextEntry * fBarListOut
void ExecuteSpider()
Draw a spider plot for the selected entries.
TGPictureButton * fBGRecord
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 SetScanFileName(const char *name="")
Set the name of the file where to redirect <Scan> output.
void DoError(int level, const char *location, const char *fmt, va_list va) const
Put error/warning into TMsgBox and also forward to console.
A TTree object has a header with a name and a title.
virtual void SetTimerInterval(Int_t msec=333)
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
virtual TObjArray * GetListOfLeaves()
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
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 void SetEventList(TEventList *list)
This function transfroms the given TEventList into a TEntryList The new TEntryList is owned by the TT...
virtual Long64_t GetEntries() const
virtual Long64_t GetReadEntry() const
virtual TObjArray * GetListOfBranches()
virtual Int_t MakeSelector(const char *selector=0, Option_t *option="")
Generate skeleton selector class for this tree.
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
UInt_t GetListOfMethods(TList &methods, TDirectory *dir=0)