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 snprintf(command,128,
"TTreeViewer *gTV = (TTreeViewer*)0x%lx", (
ULong_t)
this);
326 gROOT->ProcessLine(command);
327 gROOT->ProcessLine(
"TTree *tv__tree = 0;");
328 fTreeList =
new TList;
329 gROOT->ProcessLine(
"TList *tv__tree_list = new TList;");
331 gROOT->ProcessLine(
"TFile *tv__tree_file = 0;");
334 SetTreeName(treeName);
341 fDimension(0), fVarDraw(0), fScanMode(0),
342 fTreeIndex(0), fDefaultCursor(0), fWatchCursor(0),
343 fCounting(0), fStopMapping(0), fEnableCut(0),fNexpressions(0)
350 snprintf(command,128,
"TTreeViewer *gTV = (TTreeViewer*)0x%lx", (
ULong_t)
this);
351 gROOT->ProcessLine(command);
353 gROOT->ProcessLine(
"TTree *tv__tree = 0;");
355 gROOT->ProcessLine(
"TList *tv__tree_list = new TList;");
357 gROOT->ProcessLine(
"TFile *tv__tree_file = 0;");
362 if (cdir) cdir->
cd();
371 if (dirsav) dirsav->
cd();
386 if (ftree==tree) {
printf(
"found at index %i\n", index);
break;}
412 snprintf(command,100,
"tv__tree = (TTree *)0x%lx;", (
ULong_t)tree);
425 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
444 if (diff <= 0)
return;
489 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
507 if (!treeName)
return;
515 if (!strcmp(treeName, tree->
GetName())) {
printf(
"found at index %i\n", index);
break;}
554 gClient->GetPicture(
"tree_t.xpm"),
gClient->GetPicture(
"tree_t.xpm"));
578 while ((obj=
next())) {
584 std::cout <<
"File name : "<<
fFilename << std::endl;
610 gClient->GetColorByName(
"blue",color);
789 fBarOption->
SetToolTipText(
"Histogram graphics option. Type option here and click <Draw> (or <ENTER> to update current histogram).");
865 fLt->Associate(
this);
894 fSPIDER->
Connect(
"Clicked()",
"TTreeViewer",
this,
"ExecuteSpider()");
915 fREFR->
Connect(
"Clicked()",
"TTreeViewer",
this,
"DoRefresh()");
1071 entry->
SetToolTipText(
"X expression. Drag and drop expressions here");
1080 entry->
SetToolTipText(
"Y expression. Drag and drop expressions here");
1089 entry->
SetToolTipText(
"Z expression. Drag and drop expressions here");
1095 pic =
gClient->GetPicture(
"cut_t.xpm");
1096 spic =
gClient->GetPicture(
"cut_t.xpm");
1099 entry->
SetToolTipText(
"Active cut. Double-click to enable/disable");
1105 pic =
gClient->GetPicture(
"pack_t.xpm");
1106 spic =
gClient->GetPicture(
"pack-empty_t.xpm");
1109 entry->
SetToolTipText(
"Drag and drop expressions/leaves here. Double-click to scan. Check <Scan> to redirect on file.");
1118 pic =
gClient->GetPicture(
"expression_t.xpm");
1119 spic =
gClient->GetPicture(
"expression_t.xpm");
1122 entry->
SetToolTipText(
"User defined expression/cut. Double-click to edit");
1287 if (!stripped.
Contains(
"["))
return name;
1291 while (stripped.
Index(
"[", index) !=
kNPOS) {
1300 retstr = stripped.
Remove(start+1, end-start-1);
1324 Warning(
"Empty",
"No item selected.");
1329 Warning(
"Empty",
"Not expression type.");
1375 Int_t dimension = 0;
1388 if (
Ez() && strlen(
Ez())) {
1395 if ((
Ez() && strlen(
Ez())) && ((
Ex() &&strlen(
Ex())) || (
Ey() && strlen(
Ey())))) varexp +=
":";
1396 if (
Ey() && strlen(
Ey())) {
1403 if (
Ey() && strlen(
Ey()) &&
Ex() && strlen(
Ex())) varexp +=
":";
1404 if (
Ex () && strlen(
Ex())) {
1413 Warning(
"ExecuteDraw",
"Nothing to draw on X,Y,Z.");
1438 const char *cut =
"";
1451 command =
TString::Format(
"tv__tree->Scan(\"%s\",\"%s\",\"%s\", %lld, %lld);",
1474 if (current == last) {
1478 if (dimension == 3 && strlen(gopt)) {
1479 std::cout <<
"Graphics option " << gopt <<
" not valid for 3D histograms" << std::endl;
1482 std::cout <<
" Graphics option for current histogram changed to " << gopt << std::endl;
1492 if (!gopt[0] && dimension!=3)
1497 if (dimension == 3 && strlen(gopt)) {
1498 std::cout <<
"Graphics option " << gopt <<
" not valid for 3D histograms" << std::endl;
1502 command =
TString::Format(
"tv__tree->Draw(\"%s\",\"%s\",\"%s\", %lld, %lld);",
1519 for (i=0; i<3; i++) {
1520 if (alias[i].Length()) {
1522 alias[current] = alias[i];
1533 for (
Int_t ind=0; ind<3; ind++) axis[ind]->SetTitle(alias[ind].
Data());
1544 Int_t dimension = 0;
1549 if (
Ez() && strlen(
Ez())) {
1550 previousexp =
kTRUE;
1557 if ((
Ez() && strlen(
Ez())) && ((
Ex() && strlen(
Ex())) || (
Ey() && strlen(
Ey())))) varexp +=
":";
1558 if (
Ey() && strlen(
Ey())) {
1559 previousexp =
kTRUE;
1566 if (
Ey() && strlen(
Ey()) &&
Ex() && strlen(
Ex())) varexp +=
":";
1567 if (
Ex() && strlen(
Ex())) {
1568 previousexp =
kTRUE;
1575 for(
Int_t i=0;i<10;++i){
1576 if(
En(i+5) && strlen(
En(i+5))){
1581 }
else varexp =
En(i+5);
1582 previousexp =
kTRUE;
1586 Warning(
"ExecuteSpider",
"Need at least 3 variables");
1606 const char *cut =
"";
1665 Warning(
"EditExpression",
"No item selected.");
1671 Warning(
"EditExpression",
"Not expression type.");
1695 if (!
fTree)
return 0;
1704 if (!
fTree)
return 0;
1705 return fTree->
Process(filename, option, nentries, firstentry);
1741 Warning(
"RemoveItem",
"No item selected.");
1747 Warning(
"RemoveItem",
"Not removable type.");
1771 Float_t percent = (current-first+1)/(last-first+1);
1962 Warning(
"ProcessMessage",
"Edit expressions first.");
1966 Warning(
"ProcessMessage",
"You have only one expression active.");
1970 Warning(
"ProcessMessage",
"1D drawing options not apply to 2D histograms.");
1979 gROOT->MakeDefCanvas();
1994 std::cout <<
"Use SetTreeName() from context menu and supply a tree name" << std::endl;
1995 std::cout <<
"The context menu is activated by right-clicking the panel from right" << std::endl;
2004 event.fX =
event.fY = 1;
2022 snprintf(command,1024,
"open_session((void*)0x%lx);", (
Long_t)
this);
2057 if (!rootx.
IsNull()) rootx +=
"/bin";
2059 rootx +=
"/root -a &";
2066 snprintf(str,32,
"About ROOT %s...",
gROOT->GetVersion());
2111 hd =
new TRootHelpDialog(
this,
"Executing user commands...", 600, 400);
2162 char* msg2 =
new char[2000];
2167 char symbol = (char)((*itemType) >> 8);
2168 snprintf(msg2,2000,
"%c expression : %s", symbol, vname);
2172 snprintf(msg2,2000,
"Cut : %s", vname);
2175 snprintf(msg2,2000,
"Box : %s", vname);
2179 snprintf(msg2,2000,
"Expression : %s", vname);
2182 snprintf(msg2,2000,
"Branch : %s", vname);
2184 snprintf(msg2,2000,
"Leaf : %s", vname);
2257 if (*itemType & kLTCutType) {
2265 if (*itemType & kLTPackType) {
2311 if (strlen(command) > 1999) {
2312 Warning(
"ExecuteCommand",
"Command too long: aborting.");
2315 snprintf(comm,2000,
"%s", command);
2321 gROOT->ProcessLineFast(command);
2323 gROOT->ProcessLine(command);
2352 for (ind=kOptionsGeneral+1; ind<kOptionsGeneral+16; ind++) {
2367 for (ind=kOptions1D+1; ind<kOptions1D+12; ind++) {
2382 for (ind=kOptions2D+1; ind<kOptions2D+14; ind++) {
2414 if (!branches)
return;
2418 for (
id=0;
id<branches->
GetEntries();
id++) {
2435 for (
id=0;
id<branches->
GetEntries();
id++) {
2458 if (!branch)
return;
2460 if (prefix && strlen(prefix) >0) name =
Form(
"%s.%s",prefix,branch->
GetName());
2461 else name = branch->
GetName();
2466 if (name.Contains(
"fBits") || name.Contains(
"fUniqueID"))
return;
2475 pic =
gClient->GetPicture(
"branch-ob_t.xpm");
2476 spic =
gClient->GetPicture(
"branch-ob_t.xpm");
2479 pic =
gClient->GetPicture(
"branch-cl_t.xpm");
2480 spic =
gClient->GetPicture(
"branch-cl_t.xpm");
2482 pic =
gClient->GetPicture(
"branch_t.xpm");
2483 spic =
gClient->GetPicture(
"branch_t.xpm");
2490 pic =
gClient->GetPicture(
"branch_t.xpm");
2491 spic =
gClient->GetPicture(
"branch_t.xpm");
2497 leaf = (
TLeaf *)leaves->
At(lf);
2501 pic =
gClient->GetPicture(
"leaf_t.xpm");
2502 spic =
gClient->GetPicture(
"leaf_t.xpm");
2507 pic =
gClient->GetPicture(
"leaf_t.xpm");
2508 spic =
gClient->GetPicture(
"leaf_t.xpm");
2530 pic =
gClient->GetPicture(
"branch-ob_t.xpm");
2531 spic =
gClient->GetPicture(
"branch-ob_t.xpm");
2534 pic =
gClient->GetPicture(
"branch-cl_t.xpm");
2535 spic =
gClient->GetPicture(
"branch-cl_t.xpm");
2537 pic =
gClient->GetPicture(
"branch_t.xpm");
2538 spic =
gClient->GetPicture(
"branch_t.xpm");
2543 entry->
SetToolTipText(
"Branch with sub-branches. Can not be dragged");
2549 if (textEntry)
delete textEntry;
2551 pic =
gClient->GetPicture(
"branch_t.xpm");
2552 spic =
gClient->GetPicture(
"branch_t.xpm");
2555 entry->
SetToolTipText(
"Branch with more than one leaf. Can not be dragged");
2564 leaf = (
TLeaf *)leaves->
At(lf);
2568 pic =
gClient->GetPicture(
"leaf_t.xpm");
2569 spic =
gClient->GetPicture(
"leaf_t.xpm");
2572 entry->
SetToolTipText(
"Double-click to draw. Drag to X, Y, Z or scan box.");
2578 pic = (
gClient->GetMimeTypeList())->GetIcon(
"TLeaf",
kFALSE);
2579 if (!pic) pic =
gClient->GetPicture(
"leaf_t.xpm");
2580 spic =
gClient->GetMimeTypeList()->GetIcon(
"TLeaf",
kTRUE);
2581 if (!spic) spic =
gClient->GetPicture(
"leaf_t.xpm");
2584 entry->
SetToolTipText(
"Double-click to draw. Drag to X, Y, Z or scan box.");
2597 for (ind=0; ind<branches->
GetEntries(); ind++) {
2600 MapBranch(branchDaughter,
"", branchItem, listIt);
2632 if (!itemType)
return;
2639 index = (
Int_t)(*itemType >> 8);
2661 static const int buf_size = 2048;
2662 char buf[buf_size], *bp;
2664 int n = vsnprintf(buf, buf_size, fmt, va);
2667 if (n == -1 || n >= buf_size) {
2675 const char *title =
"";
2683 title =
"System Error";
2694 char * msg =
new char[100];
2695 snprintf(msg,100,
"First entry : %lld Last entry : %lld",
2709 Int_t lenfile = strlen(filename);
2713 lenfile = strlen(fname);
2715 fname = (
char*)filename;
2723 fname =
new char[13];
2724 strlcpy(fname,
"treeviewer.C",13);
2728 printf(
"SaveSource cannot open file : %s\n", fname);
2730 if (!lenfile)
delete [] fname;
2737 out <<
"void "<<sname.
Data()<<
"() {"<<std::endl;
2738 out <<
"//=========Macro generated by ROOT version"<<
gROOT->GetVersion()<<std::endl;
2739 out <<
"//=========for tree "<<quote<<
fTree->
GetName()<<quote<<
" ("<<t.
AsString()<<
")"<<std::endl;
2740 out <<
"//===This macro can be opened from a TreeViewer session after loading"<<std::endl;
2741 out <<
"//===the corresponding tree, or by running root with the macro name argument"<<std::endl<<std::endl;
2742 out <<
" open_session();"<<std::endl;
2743 out <<
"}"<<std::endl<<std::endl;
2744 out <<
"open_session(void *p = 0) {"<<std::endl;
2745 out <<
" gSystem->Load("<<quote<<
"libTreeViewer"<<quote<<
");"<<std::endl;
2746 out <<
" TTreeViewer *treeview = (TTreeViewer *) p;"<<std::endl;
2747 out <<
" if (!treeview) treeview = new TTreeViewer();"<<std::endl;
2748 out <<
" TTree *tv_tree = (TTree*)gROOT->FindObject("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2749 out <<
" TFile *tv_file = (TFile*)gROOT->GetListOfFiles()->FindObject("<<quote<<
fFilename<<quote<<
");"<<std::endl;
2750 out <<
" if (!tv_tree) {"<<std::endl;
2751 out <<
" if (!tv_file) tv_file = new TFile("<<quote<<
fFilename<<quote<<
");"<<std::endl;
2752 out <<
" if (tv_file) tv_tree = (TTree*)tv_file->Get("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2753 out <<
" if(!tv_tree) {"<<std::endl;
2754 out <<
" printf(\"Tree %s not found\", fTree->GetName());"<<std::endl;
2755 out <<
" return;"<<std::endl;
2756 out <<
" }"<<std::endl;
2757 out <<
" }"<<std::endl<<std::endl;
2758 out <<
" treeview->SetTreeName("<<quote<<
fTree->
GetName()<<quote<<
");"<<std::endl;
2759 out <<
" treeview->SetNexpressions("<<
fNexpressions<<
");"<<std::endl;
2762 out <<
"// Set expressions on axis and cut"<<std::endl;
2763 out <<
" TTVLVEntry *item;"<<std::endl;
2764 for (
Int_t i=0; i<4; i++) {
2767 out <<
"// X expression"<<std::endl;
2770 out <<
"// Y expression"<<std::endl;
2773 out <<
"// Z expression"<<std::endl;
2776 out <<
"// Cut expression"<<std::endl;
2782 out <<
" item = treeview->ExpressionItem("<<i<<
");"<<std::endl;
2783 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2784 <<
", "<<quote<<item->
GetAlias()<<quote<<
");"<<std::endl;
2786 out <<
"// Scan list"<<std::endl;
2788 out <<
" item = treeview->ExpressionItem(4);"<<std::endl;
2789 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2790 <<
", "<<quote<<
"Scan box"<<quote<<
");"<<std::endl;
2791 out <<
"// User defined expressions"<<std::endl;
2798 itemType =
"kFALSE";
2799 out <<
" item = treeview->ExpressionItem("<<crt<<
");"<<std::endl;
2800 out <<
" item->SetExpression("<<quote<<item->
GetTrueName()<<quote
2801 <<
", "<<quote<<item->
GetAlias()<<quote<<
", "<<itemType.
Data()<<
");"<<std::endl;
2804 out <<
"}"<<std::endl;
2806 printf(
"C++ Macro file: %s has been generated\n", fname);
2807 if (!lenfile)
delete [] fname;
2817 Warning(
"SwitchTree",
"No tree found.");
2821 std::string command;
2822 if (tree !=
fTree) {
2823 command =
"tv__tree = (TTree *) tv__tree_list->At";
2824 command +=
Form(
"(%i)",index);
2831 command =
"Current Tree : ";
void InsertText(const char *text)
Insert text in text entry.
const char * Ey()
Return the expression on Y.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
const char * GetTrueName()
TGPictureButton * fBGPrevious
void Empty()
Clear all names and alias.
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other commands generated.
void Empty()
Empty the content of the selected expression.
virtual const TGFrame * GetNextSelected(void **current)
Return the next selected item.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
static Vc_ALWAYS_INLINE int_v min(const int_v &x, const int_v &y)
void SetNexpressions(Int_t expr)
Change the number of expression widgets.
virtual void * GetUserData() const =0
virtual void RemoveAll()
Remove all items from the container.
const char * ScanList()
Return the cut entry.
TGPictureButton * fBGRecord
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
void Reset()
Reset the timer.
virtual Int_t NumSelected() const
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection.
void ExecuteDraw()
Called when the DRAW button is executed.
static const char * gOpt1D[12]
TGLayoutHints * fBarLayout
Collectable string class.
const TGPicture * fPicRefr
void SetRecordName(const char *name)
Set record name.
virtual Long64_t GetReadEntry() const
TTVLVEntry * EditedEntry()
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
void NewExpression()
Create new expression.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
void PrintEntries()
Print the number of selected entries on status-bar.
const TGWindow * GetRoot() const
Returns current root (i.e.
static Pixel_t GetWhitePixel()
Get white pixel value.
void Draw3DCorner(Bool_t corner)
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void ToUpper()
Change string to upper case.
void SetUserCode(const char *code, Bool_t autoexec=kTRUE)
user defined command for current record
void UpdateCombo()
Updates combo box to current session entries.
virtual void SetContainer(TGFrame *f)
void SetListView(TGListView *lv)
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
static const char * filename()
const char * Ex()
Get the expression to be drawn on X axis.
void DoRefresh()
This slot is called when button REFR is clicked.
void ActivateButtons(Bool_t first, Bool_t previous, Bool_t next, Bool_t last)
Enable/disable session buttons.
void SetParentTree(TGListTreeItem *item)
Find parent tree of a clicked item.
TGHorizontalFrame * fBFrame
virtual void Associate(const TGWindow *w)
void SetTrueName(const char *name)
void SetTreeName(const char *treeName)
Allow geting the tree from the context menu.
ClassImp(TTreeViewer) TTreeViewer
TTreeViewer default constructor.
TGHProgressBar * fProgressBar
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
void MapOptions(Long_t parm1)
Scan the selected options from option menu.
void SelectItem(const char *name)
Select an item.
virtual void SetRange(Float_t min, Float_t max)
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
R__EXTERN TApplication * gApplication
Int_t MakeSelector(const char *selector=0)
Get use of TTree::MakeSelector() via the context menu.
const char * EmptyBrackets(const char *name)
Empty the bracket content of a string.
void EditExpression()
Start the expression editor.
R__EXTERN const char gTVHelpContext[]
void GrabPointer()
Just focus the cursor inside.
void Message(const char *msg)
Send a message on the status bar.
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
virtual void Layout()
Layout list view components (container and contents of container).
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
virtual void Layout()
Layout the elements of the composite frame.
R__EXTERN const char gHelpAbout[]
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
const TGPicture * fPicStop
void RemoveLastRecord()
Remove current record from list.
virtual void SetBarColor(Pixel_t color)
Set progress bar color.
TContextMenu * fContextMenu
const char * ConvertAliases()
Convert all aliases into true names.
TGItemContext * GetContext()
TGPopupMenu * fOptionsGen
virtual TList * GetListOfFriends() const
const char * Data() const
TGListTreeItem * GetParent() const
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
TGPictureButton * fBGNext
void SetCurrentRecord(Long64_t entry)
Set current record.
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
TGPopupMenu * fOptionsMenu
Sequenceable collection abstract base class.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
virtual TObjArray * GetListOfBranches()
Bool_t SwitchTree(Int_t index)
Makes current the tree at a given index in the list.
void SaveSource(const char *filename="", Option_t *option="")
Save current session as a C++ macro file.
const char * Cut()
Apply Cut.
Int_t Dimension()
Compute dimension of the histogram.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void SetRecordName(const char *name)
Set record name.
static const char * gMacroTypes[]
void SetUserCode(const char *code, Bool_t autoexec=kTRUE)
void ExecuteSpider()
Draw a spider plot for the selected entries.
static TGSelectBox * GetInstance()
Return the pointer to the instantiated singleton.
virtual void SetText(TGString *newText)
Set new text in label.
void DoError(int level, const char *location, const char *fmt, va_list va) const
Put error/warning into TMsgBox and also forward to console.
static const char * gOptgen[16]
const char * GetText() const
virtual void AddThisItem(TTVLVEntry *item)
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 const char * Getenv(const char *env)
Get environment variable.
A graphic user interface designed to handle ROOT trees and to take advantage of TTree class features...
static const char * gOpt2D[14]
const Int_t kDoNotProcess
TString & Append(const char *cs)
std::vector< std::vector< double > > Data
const char * GetGrOpt()
Get graph option.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
TObjArray * GetListOfBranches()
void EmptyAll()
Clear all names and aliases for expression type items.
Bool_t HandleTimer(TTimer *timer)
This function is called by the fTimer object.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in text entry widget.
TGCompositeFrame * fListHdr
void SaveSource(std::ofstream &out)
Save the TTVSession in a C++ macro file.
TList * ExpressionList()
Get the list of expression items.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
void RemoveNonStatic()
Remove all non-static items from the list view, except expressions.
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
const char * Ez()
Get the expression to be drawn on Z axis.
TGTextEntry * fBarCommand
R__EXTERN const char gTVHelpDrawing[]
virtual void RemoveItem(TGFrame *item)
Remove item from container.
static const char * gOpenTypes[]
virtual void SetEventList(TEventList *list)
This function transfroms the given TEventList into a TEntryList The new TEntryList is owned by the TT...
void SetTree(TTree *tree)
Assign the fTree member from existing tree, e.g.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
virtual TFile * GetFile() const
void SetLabel(const char *title)
Set label of selection box.
void SetFile()
Set file name containing the tree.
R__EXTERN const char gTVHelpStart[]
TObject * UncheckedAt(Int_t i) const
std::string trueName(const char *typeDefName)
TTVLVContainer * fLVContainer
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
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...
void SetUserData(void *userData)
virtual void SendCloseMessage()
Send close message to self.
I/O classes for TreeViewer session handling.
Class to manage histogram axis.
R__EXTERN TSystem * gSystem
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual UInt_t GetDefaultWidth() const
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 Popup()
Show help dialog.
void SetScanFileName(const char *name="")
Set the name of the file where to redirect output.
TTVRecord * GetRecord(Int_t i)
Return record at index i.
TTVLVEntry * ExpressionItem(Int_t index)
Get the item from a specific position.
TDirectory * GetDirectory() const
virtual UInt_t GetDefaultHeight() const
This class represent entries that goes into the TreeViewer listview container.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
void SetSession(TTVSession *session)
Set current session.
virtual const char * GetText() const =0
Bool_t TestBit(UInt_t f) const
The most important graphics class in the ROOT system.
TList * ExpressionList()
Return the list of user-defined expressions.
const char * Cut()
Return the cut entry.
virtual void DoError(int level, const char *location, const char *fmt, va_list va) const
Interface to ErrorHandler (protected).
char * Form(const char *fmt,...)
void ClearHighlighted()
Un highlight items.
virtual void TurnOff()
Remove timer from system timer list.
void RemoveLastRecord()
Remove the current record.
A TEventList object is a list of selected events (entries) in a TTree.
Handles synchronous and a-synchronous timer events.
virtual const char * GetName() const
Returns name of object.
TGPictureButton * fBGLast
virtual Int_t Exec(const char *shellcmd)
Execute a command.
TTreeViewer(const char *treeName=0)
void SetHistogramTitle(const char *title)
Set title of Histogram.
TGLayoutHints * fMenuBarHelpLayout
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 SetToolTipText(const char *text, Long_t delayms=1000)
Set tool tip text associated with this item.
virtual ~TTreeViewer()
TTreeViewer destructor.
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.
char * StrDup(const char *str)
Duplicate the string str.
TGPictureButton * fBGFirst
R__EXTERN const char gTVHelpMacros[]
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.
TGLayoutHints * fMenuBarItemLayout
void SetAlias(const char *alias)
void SetViewer(TTreeViewer *viewer)
TGListTreeItem * GetSelected() const
TString & Remove(Ssiz_t pos)
virtual void SetWidth(UInt_t w)
virtual void CloseWindow()
Close the viewer.
TGTextEntry * fBarListOut
virtual const char * GetName() const
Returns name of object.
void UpdateRecord(const char *name="new name")
Updates current record to new X, Y, Z items.
const TGPicture * fPicDraw
virtual void SetCursorPosition(Int_t pos)
Set the cursor position to newPos.
virtual void AddEntry(TGString *s, Int_t id)
R__EXTERN const char gTVHelpLayout[]
TGDoubleVSlider * fSlider
Describe directory structure in memory.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
void SetPosition(Float_t pos)
Set progress position between [min,max].
void * GetUserData() const
void SetSmallPic(const TGPicture *spic)
Set small picture.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
This class represent a specialized expression editor for TTVLVEntry 'true name' and 'alias' data memb...
void AppendTree(TTree *tree)
Allow geting the tree from the context menu.
virtual void Draw(Option_t *options="")
Draw the spider.
void BuildInterface()
Create all viewer widgets.
virtual TTree * GetTree() const
void ExecuteCommand(const char *command, Bool_t fast=kFALSE)
Execute all user commands.
TObjArray * GetListOfLeaves()
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
const char * En(Int_t n)
Get the n'th expression.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
void SetGrOpt(const char *option)
Set graph option.
Mother of all ROOT objects.
void SetScanRedirect(Bool_t mode)
Set the state of Scan check button.
I/O classes for TreeViewer session handling.
void UpdateRecord(const char *name)
Updates current record according to new X, Y, Z settings.
R__EXTERN const char gTVHelpAbout[]
virtual Int_t MakeSelector(const char *selector=0, Option_t *option="")
Generate skeleton selector class for this tree.
virtual UInt_t GetDefaultHeight() const
virtual void SetHeight(UInt_t h)
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual void Add(TObject *obj)
TTVRecord * AddRecord(Bool_t fromFile=kFALSE)
Add a record.
TTVLVEntry * ExpressionItem(Int_t index)
Return the expression item at specific position.
A TFriendElement TF describes a TTree object TF in a file.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
const char * Ey()
Get the expression to be drawn on Y axis.
void MapTree(TTree *tree, TGListTreeItem *parent=0, Bool_t listIt=kTRUE)
Map current tree and expand its content (including friends) in the lists.
const char * Ez()
Return the expression on Z.
virtual void SetPosition(Float_t min, Float_t max)
TGLayoutHints * fMenuBarLayout
R__EXTERN const char gTVHelpUserCommands[]
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual Float_t GetMinPosition() const
virtual void SetTimerInterval(Int_t msec=333)
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
const char * GetString() const
void EmptyAll()
Clear the content of all items in the list view.
virtual Float_t GetMaxPosition() const
void Show(TTVRecord *rec)
Display record rec.
const char * Ex()
Return the expression on X.
virtual void SetTitle(const char *title)
Change (i.e.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
R__EXTERN const char gTVHelpDraggingItems[]
R__EXTERN const char gTVHelpEditExpressions[]
TObject * At(Int_t idx) const
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...
const char * ScanList()
returns scanlist
TGCompositeFrame * fTreeHdr
Implement some of the functionality of the class TTree requiring access to extra libraries (Histogram...
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
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 TTree is a list of TBranches.
void HighlightItem(TGListTreeItem *item)
Highlight item.
void Clear(Option_t *option="")
Clears up the text entry.
const char * AsString() const
Return the date & time as a string (ctime() format).
virtual void DeleteWindow()
Delete window.
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Bool_t IsScanRedirected()
Return kTRUE if scan is redirected.
virtual void TurnOn()
Add the timer to the system timer list.
R__EXTERN const char gTVHelpSession[]
virtual void SetContainer(TGFrame *f)
Set list view container.
void SetFillType(EFillType type)
Set fill type.
virtual const char * GetError()
Return system error string.
void SetEntry(TTVLVEntry *entry)
Connect one entry.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual TObjArray * GetListOfLeaves()
TGViewPort * GetViewPort() const
This class represent the list view container for the.
R__EXTERN const char gTVHelpOpenSave[]
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.