TSessionViewer.h

Go to the documentation of this file.
00001 // @(#)root/sessionviewer:$Id: TSessionViewer.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Marek Biskup, Jakub Madejczyk, Bertrand Bellenot 10/08/2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, 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 //////////////////////////////////////////////////////////////////////////
00013 //                                                                      //
00014 // TSessionViewer                                                       //
00015 //                                                                      //
00016 // Widget used to manage PROOF or local sessions, PROOF connections,    //
00017 // queries construction and results handling.                           //
00018 //                                                                      //
00019 //////////////////////////////////////////////////////////////////////////
00020 
00021 #ifndef ROOT_TSessionViewer
00022 #define ROOT_TSessionViewer
00023 
00024 #ifndef ROOT_TGFrame
00025 #include "TGFrame.h"
00026 #endif
00027 
00028 #ifndef ROOT_TString
00029 #include "TString.h"
00030 #endif
00031 
00032 #ifndef ROOT_TGTextEntry
00033 #include "TGTextEntry.h"
00034 #endif
00035 
00036 #ifndef ROOT_TGNumberEntry
00037 #include "TGNumberEntry.h"
00038 #endif
00039 
00040 #ifndef ROOT_TGTab
00041 #include "TGTab.h"
00042 #endif
00043 
00044 #ifndef ROOT_TGListView
00045 #include "TGListView.h"
00046 #endif
00047 
00048 #ifndef ROOT_TTime
00049 #include "TTime.h"
00050 #endif
00051 
00052 #include <stdio.h>
00053 #include <time.h>
00054 
00055 class TList;
00056 class TChain;
00057 class TDSet;
00058 class TGNumberEntry;
00059 class TGTextEntry;
00060 class TGTextButton;
00061 class TGCheckButton;
00062 class TGTextBuffer;
00063 class TGTableLayout;
00064 class TGIcon;
00065 class TGLabel;
00066 class TGHProgressBar;
00067 class TGPopupMenu;
00068 class TGLVContainer;
00069 class TGListView;
00070 class TGLVEntry;
00071 class TGCanvas;
00072 class TGListTree;
00073 class TGListTreeItem;
00074 class TGStatusBar;
00075 class TGPicture;
00076 class TGMenuBar;
00077 class TGPopupMenu;
00078 class TGToolBar;
00079 class TGTextView;
00080 class TGTab;
00081 class TRootEmbeddedCanvas;
00082 class TGListBox;
00083 class TCanvas;
00084 class TEnv;
00085 struct UserGroup_t;
00086 
00087 class TProofMgr;
00088 class TProof;
00089 class TSessionViewer;
00090 class TSessionLogView;
00091 class TQueryResult;
00092 class TContextMenu;
00093 
00094 //////////////////////////////////////////////////////////////////////////
00095 //                                                                      //
00096 // TSessionViewer - A GUI for ROOT / PROOF Sessions                     //
00097 //                                                                      //
00098 //////////////////////////////////////////////////////////////////////////
00099 
00100 //////////////////////////////////////////////////////////////////////////
00101 // TQueryDescription class : Description of queries
00102 //////////////////////////////////////////////////////////////////////////
00103 
00104 class TQueryDescription : public TObject {
00105 
00106 public:
00107    enum ESessionQueryStatus {
00108       kSessionQueryAborted = 0,
00109       kSessionQuerySubmitted,
00110       kSessionQueryRunning,
00111       kSessionQueryStopped,
00112       kSessionQueryCompleted,
00113       kSessionQueryFinalized,
00114       kSessionQueryCreated,
00115       kSessionQueryFromProof
00116    };
00117 
00118    ESessionQueryStatus fStatus;     // query status
00119    TString        fReference;       // query reference string (unique identifier)
00120    TString        fQueryName;       // query name
00121    TString        fSelectorString;  // selector name
00122    TString        fTDSetString;     // dataset name
00123    TString        fOptions;         // query processing options
00124    TString        fEventList;       // event list
00125    Int_t          fNbFiles;         // number of files to process
00126    Long64_t       fNoEntries;       // number of events/entries to process
00127    Long64_t       fFirstEntry;      // first event/entry to process
00128    TTime          fStartTime;       // start time of the query
00129    TTime          fEndTime;         // end time of the query
00130    TObject       *fChain;           // dataset on which to process selector
00131    TQueryResult  *fResult;          // query result received back
00132 
00133    const char    *GetName() const { return fQueryName; }
00134 
00135    ClassDef(TQueryDescription, 1)  // Query description
00136 };
00137 
00138 
00139 enum EMenuIdentification {
00140    kMenuAddToFeedback,
00141    kMenuShow,
00142    kMenuRemoveFromFeedback
00143 };
00144 
00145 //////////////////////////////////////////////////////////////////////////
00146 // TSessionDescription class : Description of Session
00147 //////////////////////////////////////////////////////////////////////////
00148 
00149 class TSessionDescription : public TObject {
00150 
00151 public:
00152    TString            fTag;         // session unique identifier
00153    TString            fName;        // session name
00154    TString            fAddress;     // server address
00155    Int_t              fPort;        // communication port
00156    TString            fConfigFile;  // configuration file name
00157    Int_t              fLogLevel;    // log (debug) level
00158    TString            fUserName;    // user name (on server)
00159    Bool_t             fConnected;   // kTRUE if connected
00160    Bool_t             fAttached;    // kTRUE if attached
00161    Bool_t             fLocal;       // kTRUE if session is local
00162    Bool_t             fSync;        // kTRUE if in sync mode
00163    Bool_t             fAutoEnable;  // enable packages at session startup time
00164    TList             *fQueries;     // list of queries in this session
00165    TList             *fPackages;    // list of packages
00166    TQueryDescription *fActQuery;    // current (actual) query
00167    TProof            *fProof;       // pointer on TProof used by this session
00168    TProofMgr         *fProofMgr;    // Proof sessions manager
00169    Int_t              fNbHistos;    // number of feedback histos
00170 
00171    const char        *GetName() const { return fName; }
00172 
00173    ClassDef(TSessionDescription, 1) // Session description
00174 };
00175 
00176 //////////////////////////////////////////////////////////////////////////
00177 // TPackageDescription class : Description of Package
00178 //////////////////////////////////////////////////////////////////////////
00179 
00180 class TPackageDescription : public TObject {
00181 
00182 public:
00183    TString        fName;         // package name
00184    TString        fPathName;     // full path name of package
00185    Int_t          fId;           // package id
00186    Bool_t         fUploaded;     // package has been uploaded
00187    Bool_t         fEnabled;      // package has been enabled
00188 
00189    const char    *GetName() const { return fName; }
00190 
00191    ClassDef(TPackageDescription, 1) // Package description
00192 };
00193 
00194 //////////////////////////////////////////////////////////////////////////
00195 //                                                                      //
00196 // TSessionServerFrame                                                  //
00197 // A composite Frame used in the right part of the Session Viewer GUI   //
00198 // for any information relative to server side : address, port, user... //
00199 //                                                                      //
00200 //////////////////////////////////////////////////////////////////////////
00201 
00202 class TSessionServerFrame : public TGCompositeFrame {
00203 
00204 private:
00205    TGCompositeFrame  *fFrmNewServer;   // main group frame
00206    TGTextEntry       *fTxtName;        // connection name text entry
00207    TGTextEntry       *fTxtAddress;     // server address text entry
00208    TGNumberEntry     *fNumPort;        // port number selector
00209    TGNumberEntry     *fLogLevel;       // log (debug) level selector
00210    TGTextEntry       *fTxtConfig;      // configuration file text entry
00211    TGTextEntry       *fTxtUsrName;     // user name text entry
00212    TGCheckButton     *fSync;           // sync / async flag selector
00213    TSessionViewer    *fViewer;         // pointer on the main viewer
00214    TGTextButton      *fBtnAdd;         // "Add" button
00215    TGTextButton      *fBtnConnect;     // "Connect" button
00216 
00217 public:
00218    TSessionServerFrame(TGWindow *parent, Int_t w, Int_t h);
00219    virtual ~TSessionServerFrame();
00220 
00221    void        Build(TSessionViewer *gui);
00222 
00223    const char *GetName() const { return fTxtName->GetText(); }
00224    const char *GetAddress() const { return fTxtAddress->GetText(); }
00225    Int_t       GetPortNumber() const { return fNumPort->GetIntNumber(); }
00226    Int_t       GetLogLevel() const { return fLogLevel->GetIntNumber(); }
00227    const char *GetConfigText() const { return fTxtConfig->GetText(); }
00228    const char *GetUserName() const { return fTxtUsrName->GetText(); }
00229    Bool_t      IsSync() const { return (Bool_t)(fSync->GetState() == kButtonDown); }
00230 
00231    void        SetAddEnabled(Bool_t on = kTRUE) {
00232                on == kTRUE ? ShowFrame(fBtnAdd) : HideFrame(fBtnAdd); }
00233    void        SetConnectEnabled(Bool_t on = kTRUE) {
00234                on == kTRUE ? ShowFrame(fBtnConnect) : HideFrame(fBtnConnect); }
00235    void        SetName(const char *str) { fTxtName->SetText(str); }
00236    void        SetAddress(const char *str) { fTxtAddress->SetText(str); }
00237    void        SetPortNumber(Int_t port) { fNumPort->SetIntNumber(port); }
00238    void        SetLogLevel(Int_t log) { fLogLevel->SetIntNumber(log); }
00239    void        SetConfigText(const char *str) { fTxtConfig->SetText(str); }
00240    void        SetUserName(const char *str) { fTxtUsrName->SetText(str); }
00241    void        SetSync(Bool_t sync) {
00242                fSync->SetState(sync ? kButtonDown : kButtonUp); }
00243 
00244    void        SettingsChanged();
00245 
00246    void        OnBtnConnectClicked();
00247    void        OnBtnNewServerClicked();
00248    void        OnBtnDeleteClicked();
00249    void        OnBtnAddClicked();
00250    void        OnConfigFileClicked();
00251    void        Update(TSessionDescription* desc);
00252    virtual Bool_t HandleExpose(Event_t *event);
00253    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00254 
00255    ClassDef(TSessionServerFrame, 0) // Server frame
00256 };
00257 
00258 
00259 //////////////////////////////////////////////////////////////////////////
00260 //                                                                      //
00261 // TSessionFrame                                                        //
00262 // A composite Frame used in the right part of the Session Viewer GUI   //
00263 // for any information, settings or controls relative to the current    //
00264 // session.                                                             //
00265 //                                                                      //
00266 //////////////////////////////////////////////////////////////////////////
00267 
00268 class TSessionFrame : public TGCompositeFrame {
00269 
00270 private:
00271 
00272    TGTab             *fTab;                  // main tab frame
00273    TGCompositeFrame  *fFA, *fFB, *fFC;
00274    TGCompositeFrame  *fFD, *fFE;             // five tabs element
00275    TGTextEntry       *fCommandTxt;           // Command line text entry
00276    TGTextBuffer      *fCommandBuf;           // Command line text buffer
00277    TGTextView        *fInfoTextView;         // summary on current query
00278    TGCheckButton     *fClearCheck;           // clear text view after each command
00279    TGTextButton      *fBtnShowLog;           // show log button
00280    TGTextButton      *fBtnNewQuery;          // new query button
00281    TGTextButton      *fBtnGetQueries;        // get entries button
00282    // Packages tab related items
00283    TGListBox         *fLBPackages;           // packages listbox
00284    TGTextButton      *fBtnAdd;               // add package button
00285    TGTextButton      *fBtnRemove;            // remove package button
00286    TGTextButton      *fBtnUp;                // move package up button
00287    TGTextButton      *fBtnDown;              // move package down button
00288    TGTextButton      *fBtnShow;              // show packages button
00289    TGTextButton      *fBtnShowEnabled;       // show enabled packages button
00290    TGCheckButton     *fChkMulti;             // multiple selection check
00291    TGCheckButton     *fChkEnable;            // enable at session startup check
00292    TGTextButton      *fBtnUpload;            // upload packages button
00293    TGTextButton      *fBtnEnable;            // enable packages button
00294    TGTextButton      *fBtnClear;             // clear all packages button
00295    TGTextButton      *fBtnDisable;           // disable packages button
00296    // Datasets tab related items
00297    TGCanvas          *fDSetView;             // dataset tree view
00298    TGListTree        *fDataSetTree;          // dataset list tree
00299    TGTextButton      *fBtnUploadDSet;        // upload dataset button
00300    TGTextButton      *fBtnRemoveDSet;        // remove dataset button
00301    TGTextButton      *fBtnVerifyDSet;        // verify dataset button
00302    TGTextButton      *fBtnRefresh;           // refresh list button
00303    // Options tab related items
00304    TGTextEntry       *fTxtParallel;          // parallel nodes text entry
00305    TGNumberEntry     *fLogLevel;             // log level number entry
00306    TGTextButton      *fApplyLogLevel;        // apply log level button
00307    TGTextButton      *fApplyParallel;        // apply parallel nodes button
00308 
00309    TSessionViewer    *fViewer;               // pointer on main viewer
00310    TGLabel           *fInfoLine[19];         // infos on session
00311 
00312 public:
00313    TSessionFrame(TGWindow* parent, Int_t w, Int_t h);
00314    virtual ~TSessionFrame();
00315 
00316    void     Build(TSessionViewer *gui);
00317    void     CheckAutoEnPack(Bool_t checked = kTRUE) {
00318             fChkEnable->SetState(checked ? kButtonDown : kButtonUp); }
00319    Int_t    GetLogLevel() const { return fLogLevel->GetIntNumber(); }
00320    void     SetLogLevel(Int_t log) { fLogLevel->SetIntNumber(log); }
00321    TGTab   *GetTab() const { return fTab; }
00322 
00323    //Function that handle input from user:
00324    void     OnApplyLogLevel();
00325    void     OnApplyParallel();
00326    void     OnBtnAddClicked();
00327    void     OnBtnRemoveClicked();
00328    void     OnBtnUpClicked();
00329    void     OnBtnDownClicked();
00330    void     OnBtnShowLogClicked();
00331    void     OnBtnNewQueryClicked();
00332    void     OnBtnGetQueriesClicked();
00333    void     OnBtnDisconnectClicked();
00334    void     OnCommandLine();
00335    void     OnUploadPackages();
00336    void     OnEnablePackages();
00337    void     OnDisablePackages();
00338    void     OnClearPackages();
00339    void     OnMultipleSelection(Bool_t on);
00340    void     OnStartupEnable(Bool_t on);
00341    void     ProofInfos();
00342    void     SetLocal(Bool_t local = kTRUE);
00343    void     ShutdownSession();
00344    void     UpdatePackages();
00345    void     OnBtnUploadDSet();
00346    void     OnBtnRemoveDSet();
00347    void     OnBtnVerifyDSet();
00348    void     UpdateListOfDataSets();
00349 
00350    ClassDef(TSessionFrame, 0) // Session frame
00351 };
00352 
00353 //////////////////////////////////////////////////////////////////////////
00354 // New Query Dialog
00355 //////////////////////////////////////////////////////////////////////////
00356 
00357 class TEditQueryFrame : public TGCompositeFrame {
00358 
00359 private:
00360    TGCompositeFrame  *fFrmMore;        // options frame
00361    TGTextButton      *fBtnMore;        // "more >>" / "less <<" button
00362 
00363    TGTextEntry       *fTxtQueryName;   // query name text entry
00364    TGTextEntry       *fTxtChain;       // chain name text entry
00365    TGTextEntry       *fTxtSelector;    // selector name text entry
00366    TGTextEntry       *fTxtOptions;     // options text entry
00367    TGNumberEntry     *fNumEntries;     // number of entries selector
00368    TGNumberEntry     *fNumFirstEntry;  // first entry selector
00369    TGTextEntry       *fTxtParFile;     // parameter file name text entry
00370    TGTextEntry       *fTxtEventList;   // event list text entry
00371    TSessionViewer    *fViewer;         // pointer on main viewer
00372    TQueryDescription *fQuery;          // query description class
00373    TObject           *fChain;          // actual TChain
00374 
00375 public:
00376    TEditQueryFrame(TGWindow* p, Int_t w, Int_t h);
00377    virtual ~TEditQueryFrame();
00378    void     Build(TSessionViewer *gui);
00379    void     OnNewQueryMore();
00380    void     OnBrowseChain();
00381    void     OnBrowseSelector();
00382    void     OnBrowseEventList();
00383    void     OnBtnSave();
00384    void     OnElementSelected(TObject *obj);
00385    void     SettingsChanged();
00386    void     UpdateFields(TQueryDescription *desc);
00387 
00388    ClassDef(TEditQueryFrame, 0) // Edit query frame
00389 };
00390 
00391 //////////////////////////////////////////////////////////////////////////
00392 //                                                                      //
00393 // TSessionQueryFrame                                                   //
00394 // A composite Frame used in the right part of the Session Viewer GUI   //
00395 // for any information, settings or controls relative to queries.       //
00396 //                                                                      //
00397 //////////////////////////////////////////////////////////////////////////
00398 
00399 class TSessionQueryFrame : public TGCompositeFrame {
00400 
00401 private:
00402 
00403    enum EQueryStatus { kRunning = 0, kDone, kStopped, kAborted };
00404 
00405    TGTextButton         *fBtnSubmit;         // submit query button
00406    TGTextButton         *fBtnFinalize;       // finalize query button
00407    TGTextButton         *fBtnStop;           // stop process button
00408    TGTextButton         *fBtnAbort;          // abort process button
00409    TGTextButton         *fBtnShowLog;        // show log button
00410    TGTextButton         *fBtnRetrieve;       // retrieve query button
00411    TGTextButton         *fBtnSave;           // save query button
00412    TGTextView           *fInfoTextView;      // summary on current query
00413 
00414    Bool_t                fModified;          // kTRUE if settings have changed
00415    Int_t                 fFiles;             // number of files processed
00416    Long64_t              fFirst;             // first event/entry to process
00417    Long64_t              fEntries;           // number of events/entries to process
00418    Long64_t              fPrevTotal;         // used for progress bar
00419    Long64_t              fPrevProcessed;     // used for progress bar
00420    TGLabel              *fLabInfos;          // infos on current process
00421    TGLabel              *fLabStatus;         // actual process status
00422    TGLabel              *fTotal;             // total progress info
00423    TGLabel              *fRate;              // rate of process in events/sec
00424    EQueryStatus          fStatus;            // status of actual query
00425    TGTab                *fTab;               // main tab frame
00426    TGCompositeFrame     *fFA, *fFB, *fFC;    // three tabs element
00427    TEditQueryFrame      *fFD;                // fourth tab element (edit query frame)
00428    TGHProgressBar       *frmProg;            // current process progress bar
00429    TRootEmbeddedCanvas  *fECanvas;           // node statistics embeded canvas
00430    TCanvas              *fStatsCanvas;       // node statistics canvas
00431    TSessionViewer       *fViewer;            // pointer on main viewer
00432    TQueryDescription    *fDesc;              // query description
00433 
00434 public:
00435    TSessionQueryFrame(TGWindow* parent, Int_t w, Int_t h);
00436    virtual ~TSessionQueryFrame();
00437 
00438    void     Build(TSessionViewer *gui);
00439 
00440    TCanvas *GetStatsCanvas() const { return fStatsCanvas; }
00441    TEditQueryFrame *GetQueryEditFrame() const { return fFD; }
00442    TGTab   *GetTab() const { return fTab; }
00443 
00444    void     Feedback(TList *objs);
00445    void     Modified(Bool_t mod = kTRUE);
00446    void     Progress(Long64_t total, Long64_t processed);
00447    void     Progress(Long64_t total, Long64_t processed,
00448                      Long64_t bytesread, Float_t initTime,
00449                      Float_t procTime, Float_t evtrti,
00450                      Float_t mbrti);
00451    void     ProgressLocal(Long64_t total, Long64_t processed);
00452    void     IndicateStop(Bool_t aborted);
00453    void     ResetProgressDialog(const char *selec, Int_t files, Long64_t first, Long64_t entries);
00454 
00455    //Function that handle input from user:
00456    void     OnBtnSubmit();
00457    void     OnBtnFinalize();
00458    void     OnBtnStop();
00459    void     OnBtnAbort();
00460    void     OnBtnShowLog();
00461    void     OnBtnRetrieve();
00462    void     UpdateInfos();
00463    void     UpdateButtons(TQueryDescription *desc);
00464    void     UpdateHistos(TList *objs);
00465 
00466    ClassDef(TSessionQueryFrame, 0) // Query frame
00467 };
00468 
00469 //////////////////////////////////////////////////////////////////////////
00470 //                                                                      //
00471 // TSessionOutputFrame                                                  //
00472 // A composite Frame used in the right part of the Session Viewer GUI   //
00473 // displaying output list objects coming from query result.             //
00474 //                                                                      //
00475 //////////////////////////////////////////////////////////////////////////
00476 
00477 class TSessionOutputFrame : public TGCompositeFrame {
00478 
00479 private:
00480    TGLVEntry              *fEntryTmp;      // used to transfer to feedback
00481    TGLVContainer          *fLVContainer;   // output list view
00482    TSessionViewer         *fViewer;        // pointer on the main viewer
00483 
00484 public:
00485    TSessionOutputFrame(TGWindow* parent, Int_t w, Int_t h);
00486    virtual ~TSessionOutputFrame();
00487 
00488    void           AddObject(TObject *obj);
00489    void           Build(TSessionViewer *gui);
00490    TGLVContainer  *GetLVContainer() { return fLVContainer; }
00491    void           OnElementClicked(TGLVEntry* entry, Int_t btn, Int_t x, Int_t y);
00492    void           OnElementDblClicked(TGLVEntry *entry ,Int_t btn, Int_t x, Int_t y);
00493    void           RemoveAll() { fLVContainer->RemoveAll(); }
00494 
00495    ClassDef(TSessionOutputFrame, 0) // Output frame
00496 };
00497 
00498 //////////////////////////////////////////////////////////////////////////
00499 //                                                                      //
00500 // TSessionInputFrame                                                   //
00501 // A composite Frame used in the right part of the Session Viewer GUI   //
00502 // displaying input list objects coming from query result.              //
00503 //                                                                      //
00504 //////////////////////////////////////////////////////////////////////////
00505 
00506 class TSessionInputFrame : public TGCompositeFrame {
00507 
00508 private:
00509    TSessionViewer   *fViewer;       // pointer on the main viewer
00510    TGLVContainer    *fLVContainer;  // container for the input list view
00511 
00512 public:
00513    TSessionInputFrame(TGWindow* parent, Int_t w, Int_t h);
00514    virtual ~TSessionInputFrame();
00515 
00516    void           AddObject(TObject *obj);
00517    void           Build(TSessionViewer *gui);
00518    void           RemoveAll() { fLVContainer->RemoveAll(); }
00519    TGLVContainer  *GetLVContainer() { return fLVContainer; }
00520 
00521    ClassDef(TSessionInputFrame, 0) // Input frame
00522 };
00523 
00524 
00525 //////////////////////////////////////////////////////////////////////////
00526 //                                                                      //
00527 // TSessionViewer                                                       //
00528 // This is the main widget, mother of all the previous classes          //
00529 // Used to manage sessions, servers, queries...                         //
00530 //                                                                      //
00531 //////////////////////////////////////////////////////////////////////////
00532 
00533 class TSessionViewer : public TGMainFrame {
00534 
00535 private:
00536    time_t                  fStart, fElapsed;    // time of connection
00537    Bool_t                  fChangePic;          // KTRUE if animation active
00538    Bool_t                  fBusy;               // KTRUE if busy i.e : connecting
00539    TGHorizontalFrame      *fHf;                 //
00540    TGVerticalFrame        *fV1;                 //
00541    TGVerticalFrame        *fV2;                 //
00542    TSessionServerFrame    *fServerFrame;        // right side server frame
00543    TSessionFrame          *fSessionFrame;       // right side session frame
00544    TSessionQueryFrame     *fQueryFrame;         // right side query frame
00545    TSessionOutputFrame    *fOutputFrame;        // output frame
00546    TSessionInputFrame     *fInputFrame;         // input frame
00547    TSessionLogView        *fLogWindow;          // external log window
00548    TSessionDescription    *fActDesc;            // actual session description
00549    TList                  *fSessions;           // list of sessions
00550    const TGPicture        *fLocal;              // local session icon picture
00551    const TGPicture        *fProofCon;           // connected server icon picture
00552    const TGPicture        *fProofDiscon;        // disconnected server icon picture
00553    const TGPicture        *fQueryCon;           // connected(?) query icon picture
00554    const TGPicture        *fQueryDiscon;        // disconnected(?) query icon picture
00555    const TGPicture        *fBaseIcon;           // base list tree icon picture
00556 
00557    TGFrame                *fActFrame;           // actual (displayed) frame
00558    TGToolBar              *fToolBar;            // application tool bar
00559    TGMenuBar              *fMenuBar;            // application main menu bar
00560    TGPopupMenu            *fFileMenu;           // file menu entry
00561    TGPopupMenu            *fSessionMenu;        // session menu entry
00562    TGPopupMenu            *fQueryMenu;          // query menu entry
00563    TGPopupMenu            *fOptionsMenu;        // options menu entry
00564    TGPopupMenu            *fCascadeMenu;        // options menu entry
00565    TGPopupMenu            *fHelpMenu;           // help menu entry
00566 
00567    TGPopupMenu            *fPopupSrv;           // server related popup menu
00568    TGPopupMenu            *fPopupQry;           // query related popup menu
00569    TContextMenu           *fContextMenu;        // input/output objects context menu
00570 
00571    TGHProgressBar         *fConnectProg;        // connection progress bar
00572    TGCanvas               *fTreeView;           // main right sessions/queries tree view
00573    TGListTree             *fSessionHierarchy;   // main sessions/queries hierarchy list tree
00574    TGListTreeItem         *fSessionItem;        // base (main) session list tree item
00575    TGStatusBar            *fStatusBar;          // bottom status bar
00576    TGPicture              *fRightIconPicture;   // lower bottom left icon used to show connection status
00577    TGIcon                 *fRightIcon;          // associated picture
00578    TTimer                 *fTimer;              // timer used to change icon picture
00579    UserGroup_t            *fUserGroup;          // user connected to session
00580    Bool_t                  fAutoSave;           // kTRUE if config is to be saved on exit
00581    TString                 fConfigFile;         // configuration file name
00582    TEnv                   *fViewerEnv;          // viewer's configuration
00583 
00584 public:
00585 
00586    TSessionViewer(const char *title = "ROOT Session Viewer", UInt_t w = 550, UInt_t h = 320);
00587    TSessionViewer(const char *title, Int_t x, Int_t y, UInt_t w, UInt_t h);
00588    virtual ~TSessionViewer();
00589    virtual void Build();
00590    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t);
00591 
00592    TSessionServerFrame    *GetServerFrame() const { return fServerFrame; }
00593    TSessionFrame          *GetSessionFrame() const { return fSessionFrame; }
00594    TSessionQueryFrame     *GetQueryFrame() const { return fQueryFrame; }
00595    TSessionOutputFrame    *GetOutputFrame() const { return fOutputFrame; }
00596    TSessionInputFrame     *GetInputFrame() const { return fInputFrame; }
00597    TSessionDescription    *GetActDesc() const { return fActDesc; }
00598    TList                  *GetSessions() const { return fSessions; }
00599    TGListTree             *GetSessionHierarchy() const { return fSessionHierarchy; }
00600    TGListTreeItem         *GetSessionItem() const { return fSessionItem; }
00601    const TGPicture        *GetLocalPict() const { return fLocal; }
00602    const TGPicture        *GetProofConPict() const { return fProofCon; }
00603    const TGPicture        *GetProofDisconPict() const { return fProofDiscon; }
00604    const TGPicture        *GetQueryConPict() const { return fQueryCon; }
00605    const TGPicture        *GetQueryDisconPict() const { return fQueryDiscon; }
00606    const TGPicture        *GetBasePict() const { return fBaseIcon; }
00607    TGPopupMenu            *GetPopupSrv() const { return fPopupSrv; }
00608    TGPopupMenu            *GetPopupQry() const { return fPopupQry; }
00609    TContextMenu           *GetContextMenu() const { return fContextMenu; }
00610    TGStatusBar            *GetStatusBar() const { return fStatusBar; }
00611    TGHProgressBar         *GetConnectProg() const { return fConnectProg; }
00612    TGPopupMenu            *GetCascadeMenu() const { return fCascadeMenu; }
00613    TGPopupMenu            *GetOptionsMenu() const { return fOptionsMenu; }
00614 
00615    void     ChangeRightLogo(const char *name);
00616    void     CleanupSession();
00617    void     CloseWindow();
00618    void     DisableTimer();
00619    void     EditQuery();
00620    void     EnableTimer();
00621    Bool_t   HandleTimer(TTimer *);
00622    Bool_t   IsBusy() const { return fBusy; }
00623    Bool_t   IsAutoSave() const { return fAutoSave; }
00624    void     LogMessage(const char *msg, Bool_t all);
00625    void     MyHandleMenu(Int_t);
00626    void     OnCascadeMenu();
00627    void     OnListTreeClicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y);
00628    void     OnListTreeDoubleClicked(TGListTreeItem *entry, Int_t btn);
00629    void     QueryResultReady(char *query);
00630    void     DeleteQuery();
00631    void     ReadConfiguration(const char *filename = 0);
00632    void     ResetSession();
00633    void     UpdateListOfProofs();
00634    void     UpdateListOfSessions();
00635    void     UpdateListOfPackages();
00636    void     WriteConfiguration(const char *filename = 0);
00637    void     SetBusy(Bool_t busy = kTRUE) { fBusy = busy; }
00638    void     SetChangePic(Bool_t change) { fChangePic = change;}
00639    void     SetLogWindow(TSessionLogView *log) { fLogWindow = log; }
00640    void     ShowEnabledPackages();
00641    void     ShowPackages();
00642    void     ShowInfo(const char *txt);
00643    void     ShowLog(const char *queryref);
00644    void     ShowStatus();
00645    void     StartupMessage(char *msg, Bool_t stat, Int_t curr, Int_t total);
00646    void     StartViewer();
00647    void     Terminate();
00648 
00649    ClassDef(TSessionViewer, 0) // Session Viewer
00650 };
00651 
00652 R__EXTERN TSessionViewer *gSessionViewer;
00653 
00654 #endif

Generated on Tue Jul 5 14:22:30 2011 for ROOT_528-00b_version by  doxygen 1.5.1