HelpTextTV.cxx

Go to the documentation of this file.
00001 // @(#)root/treeviewer:$Id: HelpTextTV.cxx 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Andrei Gheata   02/10/00
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #include "HelpTextTV.h"
00013 
00014 const char gTVHelpAbout[] = "\
00015 The TreeViewer is a graphic user interface designed to handle ROOT\n\
00016 trees and to take advantage of TTree class features. It uses ROOT native\n\
00017 GUI widgets adapted for drag-and-drop functionality. The following\n\
00018 capabilities are making the viewer a helpful tool for analysis:\n\n\
00019   - several trees may be opened in the same session\n\
00020   - branches and leaves can be easily browsed or scanned\n\
00021   - fast drawing of branch expressions by double-clicking\n\
00022   - new variables/selections easy to compose with the built-in editor\n\
00023   - histograms can be composed by dragging leaves or user-defined expressions\n\
00024     to X, Y and Z axis items\n\
00025   - the tree entries to be processed can be selected with a double slider\n\
00026   - selections can be defined and activated by dragging them to the <Cut> item\n\
00027   - all expressions can be aliased and aliases can be used in composing others\n\
00028   - input/output event lists easy to handle\n\
00029   - menu with histogram drawing options\n\
00030   - user commands may be executed within the viewer and the current command\n\
00031     can be echoed\n\
00032   - current <Draw> event loop is reflected by a progress bar and may be\n\
00033     interrupted by the user\n\
00034   - all widgets have self-explaining tool tips and/or context menus\n\
00035   - expressions/leaves can be dragged to a <Scan box> and scanned by\n\
00036     double-clicking this item. The result can be redirected to an ASCII file\n\n\
00037 ";
00038 
00039 const char gTVHelpStart[] = "\
00040    1) From the TBrowser:\n\n\
00041       Select a tree in the TBrowser, then call the StartViewer() method\n\
00042       from its context menu (right-click on the tree).\n\n\
00043    2) From the command line:\n\n\
00044       Start a ROOT session in the directory where you have your tree.\n\
00045       You will need first to load the library for TTreeViewer and optionally\n\
00046       other libraries for user defined classes (you can do this later in the\n\
00047       session):\n\
00048          root [0] gSystem->Load(\"TTreeViewer\");\n\
00049       Supposing you have the tree MyTree in the file MyFile.root, you can do:\n\
00050          root [1] TFile file(\"Myfile.root\");\n\
00051          root [2] new TTreeViewer(\"Mytree\");\n\
00052       or:\n\
00053          root [2] TreeViewer *tv = new TTreeViewer();\n\
00054          root [3] tv->SetTreeName(\"Mytree\");\n\n\
00055    NOTE: Once a TTreeViewer is started, one can access it from the interpreter\n\
00056          using the global identifier gTV\n\n\
00057 ";
00058 
00059 const char gTVHelpLayout[] = "\
00060 The layout has the following items:\n\n\
00061   - a menu bar with entries: File, Edit, Run, Options and Help\n\
00062   - a toolbar in the upper part where you can issue user commands, change\n\
00063     the drawing option and the histogram name, three check buttons Hist, Rec\n\
00064     and Scan.HIST toggles histogram drawing mode, REC enables recording of the\n\
00065     last command issued and SCAN enables redirecting of TTree::Scan command in\n\
00066     an ASCII file (see Scanning expressions...)\n\
00067   - a button bar in the lower part with buttons DRAW/STOP that issue\n\
00068     histogram drawing and stop the current command respectively, two text\n\
00069     widgets where input and output event lists can be specified, a message\n\
00070     box and a RESET button on the right that clear edited expression content\n\
00071     (see Editing...)\n\
00072   - a tree-type list on the main left panel where you can select among trees\n\
00073     or branches. The tree/branch will be detailed in the right panel.\n\
00074     Mapped trees are provided with context menus, activated by right-clicking.\n\
00075   - a view-type list on the right panel. The first column contain X, Y and\n\
00076     Z expression items, an optional cut and ten optional editable expressions.\n\
00077     Expressions and leaf-type items can be dragged or deleted. A right click\n\
00078     on the list-box or item activates context menus.\n\n\
00079 ";
00080 
00081 const char gTVHelpOpenSave[] = "\
00082 There are 3 methods of loading a tree in the TreeViewer:\n\n\
00083    1. If the tree is opened in a TBrowser, one can direcly call TTree::StartViewer()\n\
00084       from its context menu (righ-button click on the tree).\n\
00085    If the tree is in a file, one has first to load it into memory:\n\
00086    - using first <File/Open tree file> menu to open the .root file or just:\n\
00087       TFile f(\"myFile\");\n\
00088    - once the file is opened, one can load a tree in the tree viewer:\n\
00089    2. Knowing the name of the tree:\n\
00090       gTV->SetTreeName(\"myTree\"); (this method can be also called from the context\n\
00091                                    menu of the panel on the right)\n\
00092    3. Getting a pointer to the tree:\n\
00093       TTree *tree = (TTree*)f.Get(\"myTree\");\n\
00094       gTV->AppendTree(tree);\n\
00095 NOTE that method 2. calls gROOT->FindObject(\"myTree\") that will retreive the first\n\
00096 tree found with this name, not necesarry from the opened file.\n\n\
00097 Several trees can be opened in the same TreeViewer session :\n\n\
00098    TFile *f1(\"first.root\",\"READ\");\n\
00099    TTree *tree1 = (TTree*)f1->Get(\"myTree1\");\n\
00100    gTV->AppendTree(tree1);\n\
00101    TFile *f2(\"second.root\",\"READ\");\n\
00102    TTree *tree2 = (TTree*)f2->Get(\"myTree2\");\n\
00103    gTV->AppendTree(tree2);\n\n\
00104 To save the current session, use File/SaveSource menu or the SaveSource()\n\
00105 method from the context menu of the right panel (this allows changing the name of the\n\
00106 file)\n\n\
00107 To open a previously saved session for the tree MyTree, first open MyTree\n\
00108 in the browser, then use <File/Open session> menu.\n\n\
00109 ";
00110 
00111 const char gTVHelpDraggingItems[] = "\
00112 Items that can be dragged from the list in the right: expressions and\n\
00113 leaves. Dragging an item and dropping to another will copy the content of\n\
00114 first to the last (leaf->expression, expression->expression). Items far to\n\
00115 the right side of the list can be easily dragged to the left (where\n\
00116 expressions are placed) by dragging them to the left at least 10 pixels.\n\n\
00117 ";
00118 
00119 const char gTVHelpEditExpressions[] = "\
00120 Any editable expression from the right panel has two components: a\n\
00121 true name (that will be used when TTree::Draw() commands are issued) and an\n\
00122 alias. The visible name is the alias. Aliases of user defined expressions\n\
00123 have a leading ~ and may be used in new expressions. Expressions containing\n\
00124 boolean operators have a specific icon and may be dragged to the active cut\n\
00125 (scissors item) position.\n\n\
00126 The expression editor can be activated by double-clicking empty expression,\n\
00127 using <EditExpression> from the selected expression context menu or using\n\
00128 the <Edit/Expression> menu.\n\n\
00129 The editor will pop-up in the left part, but it can be moved.\n\
00130 The editor usage is the following:\n\
00131   - you can write C expressions made of leaf names by hand or you can insert\n\
00132     any item from the right panel by clicking on it (recommandable)\n\
00133   - you can click on other expressions/leaves to paste them in the editor\n\
00134   - you should write the item alias by hand since it not makes the expression\n\
00135     meaningfull and also highly improves the layout for big expressions\n\
00136   - you may redefine an old alias - the other expressions depending on it will\n\
00137     be modified accordingly. Must NOT be the leading string of other aliases.\n\
00138     When Draw commands are issued, the name of the corresponding histogram axes\n\
00139     will become the aliases of the expressions.\n\n\
00140 ";
00141 
00142 const char gTVHelpSession[] ="\
00143 A TreeViewer session is made by the list of user-defined expressions and cuts,\n\
00144 applying to a specified tree. A session can be saved using File/SaveSource menu\n\
00145 or the SaveSource method from the context menu of the right panel. This will\n\
00146 create a macro having as default name treeviewer.C that can be ran at any time to\n\
00147 reproduce the session.\n\n\
00148 Besides the list of user-defined expressions, a session may contain a list of\n\
00149 RECORDS. A record can be produced in the following way:\n\
00150    - dragging leaves/expression on X/Y/Z\n\
00151    - changing drawing options\n\
00152    - clicking the RED button on the bottom when happy with the histogram\n\
00153 NOTE that just double clicking a leaf will not produce a record: the histogram must\n\
00154 be produced when clicking the DRAW button on the bottom-left.\n\n\
00155 The records will appear on the list of records in the bottom right of the\n\
00156 tree viewer. Selecting a record will draw the corresponding histogram. Records\n\
00157 can be played using the arrow buttons near to the record button. When saving the\n\
00158 session, the list of records is being saved as well.\n\n\
00159 Records have a default name corresponding to the Z:Y:X selection, but this can be\n\
00160 changed using SetRecordName() method from the right panel context menu.\n\n\
00161 ";
00162 
00163 const char gTVHelpUserCommands[] = "\
00164 User commands can be issued directly from the textbox labeled <Command>\n\
00165 from the upper-left toolbar by typing and pressing Enter at the end.\n\
00166 An other way is from the right panel context menu: ExecuteCommand.\n\n\
00167 All commands can be interrupted at any time by pressing the STOP button\n\
00168 from the bottom-left.\n\n\
00169 You can toggle recording of the current command in the history file by\n\
00170 checking the Rec button from the top-right.\n\n\
00171 ";
00172 
00173 const char gTVHelpContext[] = "\
00174 You can activate context menus by right-clicking on items or inside the\n\
00175 right panel.\n\n\
00176 Context menus for mapped items from the left tree-type list:\n\n\
00177 The items from the left that are provided with context menus are tree and\n\
00178 branch items. You can directly activate the *MENU* marked methods of TTree\n\
00179 from this menu.\n\n\
00180 Context menu for the right panel:\n\n\
00181   A general context menu is acivated if the user right-clicks the right panel.\n\
00182   Commands are:\n\
00183   - EmptyAll        : clears the content of all expressions\n\
00184   - ExecuteCommand  : execute a ROOT command\n\
00185   - MakeSelector    : equivalent of TTree::MakeSelector()\n\
00186   - NewExpression   : add an expression item in the right panel\n\
00187   - Process         : equivalent of TTree::Process()\n\
00188   - SaveSource      : save the current session as a C++ macro\n\
00189   - SetScanFileName : define a name for the file where TTree::Scan command\n\
00190     is redirected when the <Scan> button is checked\n\
00191   - SetTreeName     : open a new tree whith this name in the viewer.\n\n\
00192     A specific context menu is activated if expressions/leaves are\n\
00193     right-clicked.\n\
00194   Commands are:\n\
00195   - Draw            : draw a histogram for this item\n\
00196   - EditExpression  : pops-up the expression editor\n\
00197   - Empty           : empty the name and alias of this item\n\
00198   - RemoveItem      : removes clicked item from the list\n\
00199   - Scan            : scan this expression\n\
00200   - SetExpression   : edit name and alias for this item by hand\n\n\
00201 ";
00202 
00203 const char gTVHelpDrawing[] = "\
00204 Fast variable drawing: just double-click an item from the right list.\n\n\
00205 Normal drawing: Edit the X, Y, Z fields or drag expressions here, fill\n\
00206 input-output list names if you have defined them. Press <Draw> button.\n\n\
00207 You can change output histogram name, or toggle Hist or Scan modes by checking\n\
00208 the corresponding buttons.\n\
00209 Hist mode implies that the current histogram will be redrawn with the current\n\
00210 graphics options. If a histogram is already drawn and the graphic <Option>\n\
00211 is changed, pressing <Enter> will redraw with the new option. Checking <Scan>\n\
00212 will redirect TTree::Scan() command in an ASCII file.\n\n\
00213 You have a complete list of histogram options in multicheckable lists from\n\
00214 the Option menu. When using this menu, only the options compatible with the\n\
00215 current histogram dimension will be available. You can check multiple options\n\
00216 and reset them by checking the Default entries.\n\n\
00217 After completing the previous operations you can issue the draw command by\n\
00218 pressing the DRAW button.\n\n\
00219 ";
00220 
00221 const char gTVHelpMacros[] = "\
00222 Macros can be loaded and executed in this version only by issuing\n\
00223 the corresponding user commands (see help on user commands).\n\n\
00224 ";
00225 

Generated on Tue Jul 5 15:43:44 2011 for ROOT_528-00b_version by  doxygen 1.5.1