class description - source file - inheritance tree

class TTreeViewer : public TCanvas, public TAttText

TTreeViewer TTreeViewer() TTreeViewer TTreeViewer(const char* treename, const char* title = TreeViewer, UInt_t ww = 520, UInt_t wh = 400) virtual void ~TTreeViewer() virtual void BuildInterface() TClass* Class() TPaveVar* CreateNewVar(const char* varname) virtual void Divide(Int_t nx = 1, Int_t ny = 1, Float_t xmargin = 0.01, Float_t ymargin = 0.01, Int_t color = 0) virtual void ExecuteDraw(Option_t* option) TButton* GetBreak() TButton* GetDraw() TButton* GetGopt() TButton* GetHist() TButton* GetIList() TButton* GetOList() TButton* GetRecord() TButton* GetScan() TSlider* GetSlider() TTimer* GetTimer() TTree* GetTree() virtual const char* GetTreeName() const TButton* GetW() TButton* GetX() TButton* GetY() TButton* GetZ() virtual Bool_t HandleTimer(TTimer* timer) virtual TClass* IsA() const TPaveVar* IsUnder(TButton* button) TPaveVar* IsUnderW(TButton* button) virtual void MakeClass(const char* classname) virtual void Reorganize() virtual void SetGrid(Int_t valuex = 1, Int_t valuey = 1) virtual void SetGridx(Int_t value = 1) virtual void SetGridy(Int_t value = 1) virtual void SetLogx(Int_t value = 1) virtual void SetLogy(Int_t value = 1) virtual void SetLogz(Int_t value = 1) virtual void SetTickx(Int_t value = 1) virtual void SetTicky(Int_t value = 1) virtual void SetTimerInterval(Int_t msec = 333) virtual void SetTreeName(const char* treename) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) virtual void ToggleRecordCommand() virtual void x3d(Option_t* option)

Data Members

TString fTreeName Name of the TTree to be viewed TTree* fTree !pointer to the TTree TButton* fDraw Pointer to the Draw button TButton* fScan Pointer to the Scan button TButton* fBreak Pointer to the Break button TButton* fGopt Pointer to the Graphics option button TButton* fIList Pointer to the EventList In button TButton* fOList Pointer to the EventList Out button TButton* fX Pointer to the X button TButton* fY Pointer to the Y button TButton* fZ Pointer to the Z button TButton* fW Pointer to the W button TButton* fHist Pointer to the Histogram button TButton* fRecord Pointer to the Record button TSlider* fSlider Pointer to the Event slider TTimer* fTimer !Pointer to timer Int_t fTimerInterval Timer interval in milliseconds Bool_t fRecordFlag Indication to record the Draw command public:
static const enum TObject:: kDrawExecuting

Class Description

*-*   A TreeViewer is a canvas specialized to view TTree attributes.

 The TTreeViewer canvas (see example below) shows the list
   of TTree variables represented by TPaveVar objects.
   A set of buttons allows to execute the following operations:
    "Draw"     display the active variable(s) below the X,Y,Z buttons
    "Scan"     same with TTree::Scan output style
    "Break"    interrupt current event loop
    "List Out" to create a new TEventList using the current selection (see below)
    "List In"  to activate a TEventList as an input selection
    "Hist"     to redefine the default histogram (default htemp)
    "Cpad"     to specify the output pad (default c1)
    "Gopt"     to specify a graphics option
    "X"        to select the X variable
    "Y"        to select the Y variable
    "Z"        to select the Z variable
    "W"        to select the Weight/Selection expression
    "Echo"     to toggle the current command echo in the terminal

    A vertical slider can be used to select the events range (min/max)
    When the "Draw" button is clicked, The TTreeViewer object assembles
    the information from the above widgets and call TTree::Draw with
    the corresponding arguments.
    While the event loop is executing, a red box inside the slider bar
    indicates the progress in the loop. The event loop can be interrupted
    by clicking on the "Break" button.

    A new variable can be created by clicking on the canvas with the right
    button and selecting "CreateNewVar".
    New variables can be created by ANDing/ORing a stack of overlapping
    TPaveVars on the screen. Click on a TPaveVar and select "Merge".

    The selection list TPaveVar (empty by default) can be edited
    by clicking with the right button and selecting the item "SetLabel".

    TPaveVar objects may be dragged/droped to their destination (X,Y,X
    or W/Selection).
    Clicking on the canvas and selecting "MakeClass" generates the C++ code
    corresponding to the current selections in the canvas.

    While the "Draw" button is executed, the event loop can be interrupted
    by pressing the button "Break". The current histogram is shown.

    While the "Draw" button is executed, one can display the status
    of the histogram by clicking on the button "Hist".

    Instead of clicking on the "Draw" button, one can also double-click
    on a TPaveVar. This will automatically invoke "Draw" with the
    current setup (cuts, events range, graphics options,etc).

    At any time the canvas history can be saved in a Root file via the
    standard tool bar menu "File" and item "Save as Canvas.root".
    Assuming the current canvas is called TreeViewer, this generates
    the file TreeViewer.root. One can continue a previous session via
       Root > TFile f("TreeViewer.root");
       Root > TreeViewer.Draw();

    Assume an existing file f containing a TTree T, one can start
    the TreeViewer with the sequence:
       Root > TFile f("Event.root");
       Root > TTreeViewer TV("T");



TTreeViewer() : TCanvas()
*-*-*-*-*-*-*-*-*-*-*-*TreeViewer default constructor*-*-*-*-*-*-*-*-*-*-*
*-*                    ================================

TTreeViewer(const char *treename, const char *title, UInt_t ww, UInt_t wh) : TCanvas(title,title,ww,wh)
*-*-*-*-*-*-*-*-*-*-*-*TreeViewer constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                    ========================

*-*-*-*-*-*-*-*-*-*-*TreeViewer default destructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ===============================

void BuildInterface()
*-*-*-*-*-*-*-*-*Create all viewer control buttons*-*-*-*-*-*-*-*-*-*-*
*-*              =================================

TPaveVar* CreateNewVar(const char *varname)
*-*-*-*-*-*-*-*-*Create a new variable TPaveVar*-*-*-*-*-*-*-*-*-*-*
*-*              ==============================

void ExecuteDraw(Option_t *option)
*-*-*-*-*-*-*-*-*Called when the DRAW button is executed*-*-*-*-*-*-*-*-*-*-*
*-*              ========================================

 Look for TPaveVar objects below the action buttons X,Y,Z,W
 Check if an Entry range is given via the slider
 Check if a new histogram name is selected (instead of default "htemp")
 Check if there is an Output Event List or/and an Input Event List

 Special cases when option contains:
   -"Break"    the event loop is interrupted. Show current histogram status
   -"Hist"     show current histogram without interrupting the event loop
   -"VarDraw:" User has double clicked on one variable

Bool_t HandleTimer(TTimer *timer)
 This function is called by the fTimer object
 Paint a vertical red box in the slider box to show the progress
 in the event loop

TPaveVar* IsUnder(TButton *button)
look for a TPaveVar under button

TPaveVar* IsUnderW(TButton *button)
look for a TPaveVar under button W

void MakeClass(const char *classname)
*-*-*-*-*-*-*-*-*Create all viewer control buttons*-*-*-*-*-*-*-*-*-*-*
*-*              =================================

void Reorganize()

void SetTreeName(const char *treename)
 Set the current TTree to treename

void Streamer(TBuffer &R__b)
 Stream an object of class TTreeViewer.

void ToggleRecordCommand()
*-*-*-*-*-*-*-*-*Toggle the recording of the Draw command*-*-*-*-*-*-*-*-*-*-*
*-*              ========================================

Inline Functions

             TTree* GetTree()
           TButton* GetDraw()
           TButton* GetScan()
           TButton* GetBreak()
           TButton* GetGopt()
           TButton* GetIList()
           TButton* GetOList()
           TButton* GetX()
           TButton* GetY()
           TButton* GetZ()
           TButton* GetW()
           TButton* GetHist()
           TButton* GetRecord()
           TSlider* GetSlider()
            TTimer* GetTimer()
        const char* GetTreeName() const
               void SetTimerInterval(Int_t msec = 333)
               void Divide(Int_t nx = 1, Int_t ny = 1, Float_t xmargin = 0.01, Float_t ymargin = 0.01, Int_t color = 0)
               void SetGrid(Int_t valuex = 1, Int_t valuey = 1)
               void SetGridx(Int_t value = 1)
               void SetGridy(Int_t value = 1)
               void SetLogx(Int_t value = 1)
               void SetLogy(Int_t value = 1)
               void SetLogz(Int_t value = 1)
               void SetTickx(Int_t value = 1)
               void SetTicky(Int_t value = 1)
               void x3d(Option_t* option)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)

Author: Rene Brun 08/12/98
Last update: 2.23/12 26/01/2000 09.55.11 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *

ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.