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