Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
HelpTextTV.cxx
Go to the documentation of this file.
1// @(#)root/treeviewer:$Id$
2// Author: Andrei Gheata 02/10/00
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#define ROOT_HelpTextTV_cxx
13#include "HelpTextTV.h"
14
15const char gTVHelpAbout[] = "\
16The TreeViewer is a graphic user interface designed to handle ROOT\n\
17trees and to take advantage of TTree class features. It uses ROOT native\n\
18GUI widgets adapted for drag-and-drop functionality. The following\n\
19capabilities are making the viewer a helpful tool for analysis:\n\n\
20 - several trees may be opened in the same session\n\
21 - branches and leaves can be easily browsed or scanned\n\
22 - fast drawing of branch expressions by double-clicking\n\
23 - new variables/selections easy to compose with the built-in editor\n\
24 - histograms can be composed by dragging leaves or user-defined expressions\n\
25 to X, Y and Z axis items\n\
26 - the tree entries to be processed can be selected with a double slider\n\
27 - selections can be defined and activated by dragging them to the <Cut> item\n\
28 - all expressions can be aliased and aliases can be used in composing others\n\
29 - input/output event lists easy to handle\n\
30 - menu with histogram drawing options\n\
31 - user commands may be executed within the viewer and the current command\n\
32 can be echoed\n\
33 - current <Draw> event loop is reflected by a progress bar and may be\n\
34 interrupted by the user\n\
35 - all widgets have self-explaining tool tips and/or context menus\n\
36 - expressions/leaves can be dragged to a <Scan box> and scanned by\n\
37 double-clicking this item. The result can be redirected to an ASCII file\n\n\
38";
39
40const char gTVHelpStart[] = "\
41 1) From the TBrowser:\n\n\
42 Select a tree in the TBrowser, then call the StartViewer() method\n\
43 from its context menu (right-click on the tree).\n\n\
44 2) From the command line:\n\n\
45 Start a ROOT session in the directory where you have your tree.\n\
46 You will need first to load the library for TTreeViewer and optionally\n\
47 other libraries for user defined classes (you can do this later in the\n\
48 session):\n\
49 root [0] gSystem->Load(\"TTreeViewer\");\n\
50 Supposing you have the tree MyTree in the file MyFile.root, you can do:\n\
51 root [1] TFile file(\"Myfile.root\");\n\
52 root [2] new TTreeViewer(\"Mytree\");\n\
53 or:\n\
54 root [2] TreeViewer *tv = new TTreeViewer();\n\
55 root [3] tv->SetTreeName(\"Mytree\");\n\n\
56 NOTE: Once a TTreeViewer is started, one can access it from the interpreter\n\
57 using the global identifier gTV\n\n\
58";
59
60const char gTVHelpLayout[] = "\
61The layout has the following items:\n\n\
62 - a menu bar with entries: File, Edit, Run, Options and Help\n\
63 - a toolbar in the upper part where you can issue user commands, change\n\
64 the drawing option and the histogram name, three check buttons Hist, Rec\n\
65 and Scan.HIST toggles histogram drawing mode, REC enables recording of the\n\
66 last command issued and SCAN enables redirecting of TTree::Scan command in\n\
67 an ASCII file (see Scanning expressions...)\n\
68 - a button bar in the lower part with buttons DRAW/STOP that issue\n\
69 histogram drawing and stop the current command respectively, two text\n\
70 widgets where input and output event lists can be specified, a message\n\
71 box and a RESET button on the right that clear edited expression content\n\
72 (see Editing...)\n\
73 - a tree-type list on the main left panel where you can select among trees\n\
74 or branches. The tree/branch will be detailed in the right panel.\n\
75 Mapped trees are provided with context menus, activated by right-clicking.\n\
76 - a view-type list on the right panel. The first column contain X, Y and\n\
77 Z expression items, an optional cut and ten optional editable expressions.\n\
78 Expressions and leaf-type items can be dragged or deleted. A right click\n\
79 on the list-box or item activates context menus.\n\n\
80";
81
82const char gTVHelpOpenSave[] = "\
83There are 3 methods of loading a tree in the TreeViewer:\n\n\
84 1. If the tree is opened in a TBrowser, one can direcly call TTree::StartViewer()\n\
85 from its context menu (righ-button click on the tree).\n\
86 If the tree is in a file, one has first to load it into memory:\n\
87 - using first <File/Open tree file> menu to open the .root file or just:\n\
88 TFile f(\"myFile\");\n\
89 - once the file is opened, one can load a tree in the tree viewer:\n\
90 2. Knowing the name of the tree:\n\
91 gTV->SetTreeName(\"myTree\"); (this method can be also called from the context\n\
92 menu of the panel on the right)\n\
93 3. Getting a pointer to the tree:\n\
94 TTree *tree = (TTree*)f.Get(\"myTree\");\n\
95 gTV->AppendTree(tree);\n\
96NOTE that method 2. calls gROOT->FindObject(\"myTree\") that will retreive the first\n\
97tree found with this name, not necesarry from the opened file.\n\n\
98Several trees can be opened in the same TreeViewer session :\n\n\
99 TFile *f1(\"first.root\",\"READ\");\n\
100 TTree *tree1 = (TTree*)f1->Get(\"myTree1\");\n\
101 gTV->AppendTree(tree1);\n\
102 TFile *f2(\"second.root\",\"READ\");\n\
103 TTree *tree2 = (TTree*)f2->Get(\"myTree2\");\n\
104 gTV->AppendTree(tree2);\n\n\
105To save the current session, use File/SaveSource menu or the SaveSource()\n\
106method from the context menu of the right panel (this allows changing the name of the\n\
107file)\n\n\
108To open a previously saved session for the tree MyTree, first open MyTree\n\
109in the browser, then use <File/Open session> menu.\n\n\
110";
111
112const char gTVHelpDraggingItems[] = "\
113Items that can be dragged from the list in the right: expressions and\n\
114leaves. Dragging an item and dropping to another will copy the content of\n\
115first to the last (leaf->expression, expression->expression). Items far to\n\
116the right side of the list can be easily dragged to the left (where\n\
117expressions are placed) by dragging them to the left at least 10 pixels.\n\n\
118";
119
120const char gTVHelpEditExpressions[] = "\
121Any editable expression from the right panel has two components: a\n\
122true name (that will be used when TTree::Draw() commands are issued) and an\n\
123alias. The visible name is the alias. Aliases of user defined expressions\n\
124have a leading ~ and may be used in new expressions. Expressions containing\n\
125boolean operators have a specific icon and may be dragged to the active cut\n\
126(scissors item) position.\n\n\
127The expression editor can be activated by double-clicking empty expression,\n\
128using <EditExpression> from the selected expression context menu or using\n\
129the <Edit/Expression> menu.\n\n\
130The editor will pop-up in the left part, but it can be moved.\n\
131The editor usage is the following:\n\
132 - you can write C expressions made of leaf names by hand or you can insert\n\
133 any item from the right panel by clicking on it (recommandable)\n\
134 - you can click on other expressions/leaves to paste them in the editor\n\
135 - you should write the item alias by hand since it not makes the expression\n\
136 meaningfull and also highly improves the layout for big expressions\n\
137 - you may redefine an old alias - the other expressions depending on it will\n\
138 be modified accordingly. Must NOT be the leading string of other aliases.\n\
139 When Draw commands are issued, the name of the corresponding histogram axes\n\
140 will become the aliases of the expressions.\n\n\
141";
142
143const char gTVHelpSession[] ="\
144A TreeViewer session is made by the list of user-defined expressions and cuts,\n\
145applying to a specified tree. A session can be saved using File/SaveSource menu\n\
146or the SaveSource method from the context menu of the right panel. This will\n\
147create a macro having as default name treeviewer.C that can be ran at any time to\n\
148reproduce the session.\n\n\
149Besides the list of user-defined expressions, a session may contain a list of\n\
150RECORDS. A record can be produced in the following way:\n\
151 - dragging leaves/expression on X/Y/Z\n\
152 - changing drawing options\n\
153 - clicking the RED button on the bottom when happy with the histogram\n\
154NOTE that just double clicking a leaf will not produce a record: the histogram must\n\
155be produced when clicking the DRAW button on the bottom-left.\n\n\
156The records will appear on the list of records in the bottom right of the\n\
157tree viewer. Selecting a record will draw the corresponding histogram. Records\n\
158can be played using the arrow buttons near to the record button. When saving the\n\
159session, the list of records is being saved as well.\n\n\
160Records have a default name corresponding to the Z:Y:X selection, but this can be\n\
161changed using SetRecordName() method from the right panel context menu.\n\n\
162";
163
164const char gTVHelpUserCommands[] = "\
165User commands can be issued directly from the textbox labeled <Command>\n\
166from the upper-left toolbar by typing and pressing Enter at the end.\n\
167Another way is from the right panel context menu: ExecuteCommand.\n\n\
168All commands can be interrupted at any time by pressing the STOP button\n\
169from the bottom-left.\n\n\
170You can toggle recording of the current command in the history file by\n\
171checking the Rec button from the top-right.\n\n\
172";
173
174const char gTVHelpContext[] = "\
175You can activate context menus by right-clicking on items or inside the\n\
176right panel.\n\n\
177Context menus for mapped items from the left tree-type list:\n\n\
178The items from the left that are provided with context menus are tree and\n\
179branch items. You can directly activate the *MENU* marked methods of TTree\n\
180from this menu.\n\n\
181Context menu for the right panel:\n\n\
182 A general context menu is acivated if the user right-clicks the right panel.\n\
183 Commands are:\n\
184 - EmptyAll : clears the content of all expressions\n\
185 - ExecuteCommand : execute a ROOT command\n\
186 - MakeSelector : equivalent of TTree::MakeSelector()\n\
187 - NewExpression : add an expression item in the right panel\n\
188 - Process : equivalent of TTree::Process()\n\
189 - SaveSource : save the current session as a C++ macro\n\
190 - SetScanFileName : define a name for the file where TTree::Scan command\n\
191 is redirected when the <Scan> button is checked\n\
192 - SetTreeName : open a new tree whith this name in the viewer.\n\n\
193 A specific context menu is activated if expressions/leaves are\n\
194 right-clicked.\n\
195 Commands are:\n\
196 - Draw : draw a histogram for this item\n\
197 - EditExpression : pops-up the expression editor\n\
198 - Empty : empty the name and alias of this item\n\
199 - RemoveItem : removes clicked item from the list\n\
200 - Scan : scan this expression\n\
201 - SetExpression : edit name and alias for this item by hand\n\n\
202";
203
204const char gTVHelpDrawing[] = "\
205Fast variable drawing: just double-click an item from the right list.\n\n\
206Normal drawing: Edit the X, Y, Z fields or drag expressions here, fill\n\
207input-output list names if you have defined them. Press <Draw> button.\n\n\
208You can change output histogram name, or toggle Hist or Scan modes by checking\n\
209the corresponding buttons.\n\
210Hist mode implies that the current histogram will be redrawn with the current\n\
211graphics options. If a histogram is already drawn and the graphic <Option>\n\
212is changed, pressing <Enter> will redraw with the new option. Checking <Scan>\n\
213will redirect TTree::Scan() command in an ASCII file.\n\n\
214You have a complete list of histogram options in multicheckable lists from\n\
215the Option menu. When using this menu, only the options compatible with the\n\
216current histogram dimension will be available. You can check multiple options\n\
217and reset them by checking the Default entries.\n\n\
218After completing the previous operations you can issue the draw command by\n\
219pressing the DRAW button.\n\n\
220";
221
222const char gTVHelpMacros[] = "\
223Macros can be loaded and executed in this version only by issuing\n\
224the corresponding user commands (see help on user commands).\n\n\
225";
226
const char gTVHelpContext[]
const char gTVHelpSession[]
const char gTVHelpEditExpressions[]
const char gTVHelpAbout[]
const char gTVHelpLayout[]
const char gTVHelpStart[]
const char gTVHelpDrawing[]
const char gTVHelpDraggingItems[]
const char gTVHelpMacros[]
const char gTVHelpUserCommands[]
const char gTVHelpOpenSave[]