ROOT  6.06/09
Reference Guide
TSessionViewer.h
Go to the documentation of this file.
1 // @(#)root/sessionviewer:$Id$
2 // Author: Marek Biskup, Jakub Madejczyk, Bertrand Bellenot 10/08/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, 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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TSessionViewer //
15 // //
16 // Widget used to manage PROOF or local sessions, PROOF connections, //
17 // queries construction and results handling. //
18 // //
19 //////////////////////////////////////////////////////////////////////////
20 
21 #ifndef ROOT_TSessionViewer
22 #define ROOT_TSessionViewer
23 
24 #ifndef ROOT_TGFrame
25 #include "TGFrame.h"
26 #endif
27 
28 #ifndef ROOT_TString
29 #include "TString.h"
30 #endif
31 
32 #ifndef ROOT_TGTextEntry
33 #include "TGTextEntry.h"
34 #endif
35 
36 #ifndef ROOT_TGNumberEntry
37 #include "TGNumberEntry.h"
38 #endif
39 
40 #ifndef ROOT_TGTab
41 #include "TGTab.h"
42 #endif
43 
44 #ifndef ROOT_TGListView
45 #include "TGListView.h"
46 #endif
47 
48 #ifndef ROOT_TTime
49 #include "TTime.h"
50 #endif
51 
52 #include <stdio.h>
53 #include <time.h>
54 
55 class TList;
56 class TChain;
57 class TDSet;
58 class TGNumberEntry;
59 class TGTextEntry;
60 class TGTextButton;
61 class TGCheckButton;
62 class TGTextBuffer;
63 class TGTableLayout;
64 class TGIcon;
65 class TGLabel;
66 class TGHProgressBar;
67 class TGPopupMenu;
68 class TGLVContainer;
69 class TGListView;
70 class TGLVEntry;
71 class TGCanvas;
72 class TGListTree;
73 class TGListTreeItem;
74 class TGStatusBar;
75 class TGPicture;
76 class TGMenuBar;
77 class TGPopupMenu;
78 class TGToolBar;
79 class TGTextView;
80 class TGTab;
82 class TGListBox;
83 class TCanvas;
84 class TEnv;
85 struct UserGroup_t;
86 
87 class TProofMgr;
88 class TProof;
89 class TSessionViewer;
90 class TSessionLogView;
91 class TQueryResult;
92 class TContextMenu;
93 
94 //////////////////////////////////////////////////////////////////////////
95 // //
96 // TSessionViewer - A GUI for ROOT / PROOF Sessions //
97 // //
98 //////////////////////////////////////////////////////////////////////////
99 
100 //////////////////////////////////////////////////////////////////////////
101 // TQueryDescription class : Description of queries
102 //////////////////////////////////////////////////////////////////////////
103 
104 class TQueryDescription : public TObject {
105 
106 public:
116  };
117 
118  ESessionQueryStatus fStatus; // query status
119  TString fReference; // query reference string (unique identifier)
120  TString fQueryName; // query name
121  TString fSelectorString; // selector name
122  TString fTDSetString; // dataset name
123  TString fOptions; // query processing options
124  TString fEventList; // event list
125  Int_t fNbFiles; // number of files to process
126  Long64_t fNoEntries; // number of events/entries to process
127  Long64_t fFirstEntry; // first event/entry to process
128  TTime fStartTime; // start time of the query
129  TTime fEndTime; // end time of the query
130  TObject *fChain; // dataset on which to process selector
131  TQueryResult *fResult; // query result received back
132 
133  const char *GetName() const { return fQueryName; }
134 
135  ClassDef(TQueryDescription, 1) // Query description
136 };
137 
138 
143 };
144 
145 //////////////////////////////////////////////////////////////////////////
146 // TSessionDescription class : Description of Session
147 //////////////////////////////////////////////////////////////////////////
148 
149 class TSessionDescription : public TObject {
150 
151 public:
152  TString fTag; // session unique identifier
153  TString fName; // session name
154  TString fAddress; // server address
155  Int_t fPort; // communication port
156  TString fConfigFile; // configuration file name
157  Int_t fLogLevel; // log (debug) level
158  TString fUserName; // user name (on server)
159  Bool_t fConnected; // kTRUE if connected
160  Bool_t fAttached; // kTRUE if attached
161  Bool_t fLocal; // kTRUE if session is local
162  Bool_t fSync; // kTRUE if in sync mode
163  Bool_t fAutoEnable; // enable packages at session startup time
164  TList *fQueries; // list of queries in this session
165  TList *fPackages; // list of packages
166  TQueryDescription *fActQuery; // current (actual) query
167  TProof *fProof; // pointer on TProof used by this session
168  TProofMgr *fProofMgr; // Proof sessions manager
169  Int_t fNbHistos; // number of feedback histos
170 
171  const char *GetName() const { return fName; }
172 
173  ClassDef(TSessionDescription, 1) // Session description
174 };
175 
176 //////////////////////////////////////////////////////////////////////////
177 // TPackageDescription class : Description of Package
178 //////////////////////////////////////////////////////////////////////////
179 
180 class TPackageDescription : public TObject {
181 
182 public:
183  TString fName; // package name
184  TString fPathName; // full path name of package
185  Int_t fId; // package id
186  Bool_t fUploaded; // package has been uploaded
187  Bool_t fEnabled; // package has been enabled
188 
189  const char *GetName() const { return fName; }
190 
191  ClassDef(TPackageDescription, 1) // Package description
192 };
193 
194 //////////////////////////////////////////////////////////////////////////
195 // //
196 // TSessionServerFrame //
197 // A composite Frame used in the right part of the Session Viewer GUI //
198 // for any information relative to server side : address, port, user... //
199 // //
200 //////////////////////////////////////////////////////////////////////////
201 
203 
204 private:
205  TGCompositeFrame *fFrmNewServer; // main group frame
206  TGTextEntry *fTxtName; // connection name text entry
207  TGTextEntry *fTxtAddress; // server address text entry
208  TGNumberEntry *fNumPort; // port number selector
209  TGNumberEntry *fLogLevel; // log (debug) level selector
210  TGTextEntry *fTxtConfig; // configuration file text entry
211  TGTextEntry *fTxtUsrName; // user name text entry
212  TGCheckButton *fSync; // sync / async flag selector
213  TSessionViewer *fViewer; // pointer on the main viewer
214  TGTextButton *fBtnAdd; // "Add" button
215  TGTextButton *fBtnConnect; // "Connect" button
216 
217 public:
219  virtual ~TSessionServerFrame();
220 
221  void Build(TSessionViewer *gui);
222 
223  const char *GetName() const { return fTxtName->GetText(); }
224  const char *GetAddress() const { return fTxtAddress->GetText(); }
225  Int_t GetPortNumber() const { return fNumPort->GetIntNumber(); }
226  Int_t GetLogLevel() const { return fLogLevel->GetIntNumber(); }
227  const char *GetConfigText() const { return fTxtConfig->GetText(); }
228  const char *GetUserName() const { return fTxtUsrName->GetText(); }
229  Bool_t IsSync() const { return (Bool_t)(fSync->GetState() == kButtonDown); }
230 
232  on == kTRUE ? ShowFrame(fBtnAdd) : HideFrame(fBtnAdd); }
234  on == kTRUE ? ShowFrame(fBtnConnect) : HideFrame(fBtnConnect); }
235  void SetName(const char *str) { fTxtName->SetText(str); }
236  void SetAddress(const char *str) { fTxtAddress->SetText(str); }
237  void SetPortNumber(Int_t port) { fNumPort->SetIntNumber(port); }
238  void SetLogLevel(Int_t log) { fLogLevel->SetIntNumber(log); }
239  void SetConfigText(const char *str) { fTxtConfig->SetText(str); }
240  void SetUserName(const char *str) { fTxtUsrName->SetText(str); }
241  void SetSync(Bool_t sync) {
242  fSync->SetState(sync ? kButtonDown : kButtonUp); }
243 
244  void SettingsChanged();
245 
246  void OnBtnConnectClicked();
247  void OnBtnNewServerClicked();
248  void OnBtnDeleteClicked();
249  void OnBtnAddClicked();
250  void OnConfigFileClicked();
251  void Update(TSessionDescription* desc);
252  virtual Bool_t HandleExpose(Event_t *event);
253  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
254 
255  ClassDef(TSessionServerFrame, 0) // Server frame
256 };
257 
258 
259 //////////////////////////////////////////////////////////////////////////
260 // //
261 // TSessionFrame //
262 // A composite Frame used in the right part of the Session Viewer GUI //
263 // for any information, settings or controls relative to the current //
264 // session. //
265 // //
266 //////////////////////////////////////////////////////////////////////////
267 
269 
270 private:
271 
272  TGTab *fTab; // main tab frame
274  TGCompositeFrame *fFD, *fFE; // five tabs element
275  TGTextEntry *fCommandTxt; // Command line text entry
276  TGTextBuffer *fCommandBuf; // Command line text buffer
277  TGTextView *fInfoTextView; // summary on current query
278  TGCheckButton *fClearCheck; // clear text view after each command
279  TGTextButton *fBtnShowLog; // show log button
280  TGTextButton *fBtnNewQuery; // new query button
281  TGTextButton *fBtnGetQueries; // get entries button
282  // Packages tab related items
283  TGListBox *fLBPackages; // packages listbox
284  TGTextButton *fBtnAdd; // add package button
285  TGTextButton *fBtnRemove; // remove package button
286  TGTextButton *fBtnUp; // move package up button
287  TGTextButton *fBtnDown; // move package down button
288  TGTextButton *fBtnShow; // show packages button
289  TGTextButton *fBtnShowEnabled; // show enabled packages button
290  TGCheckButton *fChkMulti; // multiple selection check
291  TGCheckButton *fChkEnable; // enable at session startup check
292  TGTextButton *fBtnUpload; // upload packages button
293  TGTextButton *fBtnEnable; // enable packages button
294  TGTextButton *fBtnClear; // clear all packages button
295  TGTextButton *fBtnDisable; // disable packages button
296  // Datasets tab related items
297  TGCanvas *fDSetView; // dataset tree view
298  TGListTree *fDataSetTree; // dataset list tree
299  TGTextButton *fBtnUploadDSet; // upload dataset button
300  TGTextButton *fBtnRemoveDSet; // remove dataset button
301  TGTextButton *fBtnVerifyDSet; // verify dataset button
302  TGTextButton *fBtnRefresh; // refresh list button
303  // Options tab related items
304  TGTextEntry *fTxtParallel; // parallel nodes text entry
305  TGNumberEntry *fLogLevel; // log level number entry
306  TGTextButton *fApplyLogLevel; // apply log level button
307  TGTextButton *fApplyParallel; // apply parallel nodes button
308 
309  TSessionViewer *fViewer; // pointer on main viewer
310  TGLabel *fInfoLine[19]; // infos on session
311 
312 public:
313  TSessionFrame(TGWindow* parent, Int_t w, Int_t h);
314  virtual ~TSessionFrame();
315 
316  void Build(TSessionViewer *gui);
317  void CheckAutoEnPack(Bool_t checked = kTRUE) {
318  fChkEnable->SetState(checked ? kButtonDown : kButtonUp); }
319  Int_t GetLogLevel() const { return fLogLevel->GetIntNumber(); }
320  void SetLogLevel(Int_t log) { fLogLevel->SetIntNumber(log); }
321  TGTab *GetTab() const { return fTab; }
322 
323  //Function that handle input from user:
324  void OnApplyLogLevel();
325  void OnApplyParallel();
326  void OnBtnAddClicked();
327  void OnBtnRemoveClicked();
328  void OnBtnUpClicked();
329  void OnBtnDownClicked();
330  void OnBtnShowLogClicked();
331  void OnBtnNewQueryClicked();
332  void OnBtnGetQueriesClicked();
333  void OnBtnDisconnectClicked();
334  void OnCommandLine();
335  void OnUploadPackages();
336  void OnEnablePackages();
337  void OnDisablePackages();
338  void OnClearPackages();
339  void OnMultipleSelection(Bool_t on);
340  void OnStartupEnable(Bool_t on);
341  void ProofInfos();
342  void SetLocal(Bool_t local = kTRUE);
343  void ShutdownSession();
344  void UpdatePackages();
345  void OnBtnUploadDSet();
346  void OnBtnRemoveDSet();
347  void OnBtnVerifyDSet();
348  void UpdateListOfDataSets();
349 
350  ClassDef(TSessionFrame, 0) // Session frame
351 };
352 
353 //////////////////////////////////////////////////////////////////////////
354 // New Query Dialog
355 //////////////////////////////////////////////////////////////////////////
356 
358 
359 private:
360  TGCompositeFrame *fFrmMore; // options frame
361  TGTextButton *fBtnMore; // "more >>" / "less <<" button
362 
363  TGTextEntry *fTxtQueryName; // query name text entry
364  TGTextEntry *fTxtChain; // chain name text entry
365  TGTextEntry *fTxtSelector; // selector name text entry
366  TGTextEntry *fTxtOptions; // options text entry
367  TGNumberEntry *fNumEntries; // number of entries selector
368  TGNumberEntry *fNumFirstEntry; // first entry selector
369  TGTextEntry *fTxtParFile; // parameter file name text entry
370  TGTextEntry *fTxtEventList; // event list text entry
371  TSessionViewer *fViewer; // pointer on main viewer
372  TQueryDescription *fQuery; // query description class
373  TObject *fChain; // actual TChain
374 
375 public:
377  virtual ~TEditQueryFrame();
378  void Build(TSessionViewer *gui);
379  void OnNewQueryMore();
380  void OnBrowseChain();
381  void OnBrowseSelector();
382  void OnBrowseEventList();
383  void OnBtnSave();
385  void SettingsChanged();
386  void UpdateFields(TQueryDescription *desc);
387 
388  ClassDef(TEditQueryFrame, 0) // Edit query frame
389 };
390 
391 //////////////////////////////////////////////////////////////////////////
392 // //
393 // TSessionQueryFrame //
394 // A composite Frame used in the right part of the Session Viewer GUI //
395 // for any information, settings or controls relative to queries. //
396 // //
397 //////////////////////////////////////////////////////////////////////////
398 
400 
401 private:
402 
404 
405  TGTextButton *fBtnSubmit; // submit query button
406  TGTextButton *fBtnFinalize; // finalize query button
407  TGTextButton *fBtnStop; // stop process button
408  TGTextButton *fBtnAbort; // abort process button
409  TGTextButton *fBtnShowLog; // show log button
410  TGTextButton *fBtnRetrieve; // retrieve query button
411  TGTextButton *fBtnSave; // save query button
412  TGTextView *fInfoTextView; // summary on current query
413 
414  Bool_t fModified; // kTRUE if settings have changed
415  Int_t fFiles; // number of files processed
416  Long64_t fFirst; // first event/entry to process
417  Long64_t fEntries; // number of events/entries to process
418  Long64_t fPrevTotal; // used for progress bar
419  Long64_t fPrevProcessed; // used for progress bar
420  TGLabel *fLabInfos; // infos on current process
421  TGLabel *fLabStatus; // actual process status
422  TGLabel *fTotal; // total progress info
423  TGLabel *fRate; // rate of process in events/sec
424  EQueryStatus fStatus; // status of actual query
425  TGTab *fTab; // main tab frame
426  TGCompositeFrame *fFA, *fFB, *fFC; // three tabs element
427  TEditQueryFrame *fFD; // fourth tab element (edit query frame)
428  TGHProgressBar *frmProg; // current process progress bar
429  TRootEmbeddedCanvas *fECanvas; // node statistics embeded canvas
430  TCanvas *fStatsCanvas; // node statistics canvas
431  TSessionViewer *fViewer; // pointer on main viewer
432  TQueryDescription *fDesc; // query description
433 
434 public:
435  TSessionQueryFrame(TGWindow* parent, Int_t w, Int_t h);
436  virtual ~TSessionQueryFrame();
437 
438  void Build(TSessionViewer *gui);
439 
440  TCanvas *GetStatsCanvas() const { return fStatsCanvas; }
441  TEditQueryFrame *GetQueryEditFrame() const { return fFD; }
442  TGTab *GetTab() const { return fTab; }
443 
444  void Feedback(TList *objs);
445  void Modified(Bool_t mod = kTRUE);
446  void Progress(Long64_t total, Long64_t processed);
447  void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
448  Float_t initTime, Float_t procTime,
449  Float_t evtrti, Float_t mbrti, Int_t actw, Int_t tses, Float_t eses);
450  void Progress(Long64_t total, Long64_t processed, Long64_t bytesread,
451  Float_t initTime, Float_t procTime,
452  Float_t evtrti, Float_t mbrti) {
453  Progress(total, processed, bytesread, initTime, procTime,
454  evtrti, mbrti, -1, -1, -1.); }
455  void ProgressLocal(Long64_t total, Long64_t processed);
456  void IndicateStop(Bool_t aborted);
457  void ResetProgressDialog(const char *selec, Int_t files, Long64_t first, Long64_t entries);
458 
459  //Function that handle input from user:
460  void OnBtnSubmit();
461  void OnBtnFinalize();
462  void OnBtnStop();
463  void OnBtnAbort();
464  void OnBtnShowLog();
465  void OnBtnRetrieve();
466  void UpdateInfos();
467  void UpdateButtons(TQueryDescription *desc);
468  void UpdateHistos(TList *objs);
469 
470  ClassDef(TSessionQueryFrame, 0) // Query frame
471 };
472 
473 //////////////////////////////////////////////////////////////////////////
474 // //
475 // TSessionOutputFrame //
476 // A composite Frame used in the right part of the Session Viewer GUI //
477 // displaying output list objects coming from query result. //
478 // //
479 //////////////////////////////////////////////////////////////////////////
480 
482 
483 private:
484  TGLVEntry *fEntryTmp; // used to transfer to feedback
485  TGLVContainer *fLVContainer; // output list view
486  TSessionViewer *fViewer; // pointer on the main viewer
487 
488 public:
490  virtual ~TSessionOutputFrame();
491 
492  void AddObject(TObject *obj);
493  void Build(TSessionViewer *gui);
497  void RemoveAll() { fLVContainer->RemoveAll(); }
498 
499  ClassDef(TSessionOutputFrame, 0) // Output frame
500 };
501 
502 //////////////////////////////////////////////////////////////////////////
503 // //
504 // TSessionInputFrame //
505 // A composite Frame used in the right part of the Session Viewer GUI //
506 // displaying input list objects coming from query result. //
507 // //
508 //////////////////////////////////////////////////////////////////////////
509 
511 
512 private:
513  TSessionViewer *fViewer; // pointer on the main viewer
514  TGLVContainer *fLVContainer; // container for the input list view
515 
516 public:
517  TSessionInputFrame(TGWindow* parent, Int_t w, Int_t h);
518  virtual ~TSessionInputFrame();
519 
520  void AddObject(TObject *obj);
521  void Build(TSessionViewer *gui);
522  void RemoveAll() { fLVContainer->RemoveAll(); }
524 
525  ClassDef(TSessionInputFrame, 0) // Input frame
526 };
527 
528 
529 //////////////////////////////////////////////////////////////////////////
530 // //
531 // TSessionViewer //
532 // This is the main widget, mother of all the previous classes //
533 // Used to manage sessions, servers, queries... //
534 // //
535 //////////////////////////////////////////////////////////////////////////
536 
537 class TSessionViewer : public TGMainFrame {
538 
539 private:
540  time_t fStart, fElapsed; // time of connection
541  Bool_t fChangePic; // KTRUE if animation active
542  Bool_t fBusy; // KTRUE if busy i.e : connecting
546  TSessionServerFrame *fServerFrame; // right side server frame
547  TSessionFrame *fSessionFrame; // right side session frame
548  TSessionQueryFrame *fQueryFrame; // right side query frame
551  TSessionLogView *fLogWindow; // external log window
552  TSessionDescription *fActDesc; // actual session description
553  TList *fSessions; // list of sessions
554  const TGPicture *fLocal; // local session icon picture
555  const TGPicture *fProofCon; // connected server icon picture
556  const TGPicture *fProofDiscon; // disconnected server icon picture
557  const TGPicture *fQueryCon; // connected(?) query icon picture
558  const TGPicture *fQueryDiscon; // disconnected(?) query icon picture
559  const TGPicture *fBaseIcon; // base list tree icon picture
560 
561  TGFrame *fActFrame; // actual (displayed) frame
562  TGToolBar *fToolBar; // application tool bar
563  TGMenuBar *fMenuBar; // application main menu bar
564  TGPopupMenu *fFileMenu; // file menu entry
565  TGPopupMenu *fSessionMenu; // session menu entry
566  TGPopupMenu *fQueryMenu; // query menu entry
567  TGPopupMenu *fOptionsMenu; // options menu entry
568  TGPopupMenu *fCascadeMenu; // options menu entry
569  TGPopupMenu *fHelpMenu; // help menu entry
570 
571  TGPopupMenu *fPopupSrv; // server related popup menu
572  TGPopupMenu *fPopupQry; // query related popup menu
573  TContextMenu *fContextMenu; // input/output objects context menu
574 
575  TGHProgressBar *fConnectProg; // connection progress bar
576  TGCanvas *fTreeView; // main right sessions/queries tree view
577  TGListTree *fSessionHierarchy; // main sessions/queries hierarchy list tree
578  TGListTreeItem *fSessionItem; // base (main) session list tree item
579  TGStatusBar *fStatusBar; // bottom status bar
580  TGPicture *fRightIconPicture; // lower bottom left icon used to show connection status
581  TGIcon *fRightIcon; // associated picture
582  TTimer *fTimer; // timer used to change icon picture
583  UserGroup_t *fUserGroup; // user connected to session
584  Bool_t fAutoSave; // kTRUE if config is to be saved on exit
585  TString fConfigFile; // configuration file name
586  TEnv *fViewerEnv; // viewer's configuration
587 
588 public:
589 
590  TSessionViewer(const char *title = "ROOT Session Viewer", UInt_t w = 550, UInt_t h = 320);
591  TSessionViewer(const char *title, Int_t x, Int_t y, UInt_t w, UInt_t h);
592  virtual ~TSessionViewer();
593  virtual void Build();
594  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t);
595 
602  TList *GetSessions() const { return fSessions; }
605  const TGPicture *GetLocalPict() const { return fLocal; }
606  const TGPicture *GetProofConPict() const { return fProofCon; }
607  const TGPicture *GetProofDisconPict() const { return fProofDiscon; }
608  const TGPicture *GetQueryConPict() const { return fQueryCon; }
609  const TGPicture *GetQueryDisconPict() const { return fQueryDiscon; }
610  const TGPicture *GetBasePict() const { return fBaseIcon; }
611  TGPopupMenu *GetPopupSrv() const { return fPopupSrv; }
612  TGPopupMenu *GetPopupQry() const { return fPopupQry; }
614  TGStatusBar *GetStatusBar() const { return fStatusBar; }
618 
619  void ChangeRightLogo(const char *name);
620  void CleanupSession();
621  void CloseWindow();
622  void DisableTimer();
623  void EditQuery();
624  void EnableTimer();
626  Bool_t IsBusy() const { return fBusy; }
627  Bool_t IsAutoSave() const { return fAutoSave; }
628  void LogMessage(const char *msg, Bool_t all);
629  void MyHandleMenu(Int_t);
630  void OnCascadeMenu();
633  void QueryResultReady(char *query);
634  void DeleteQuery();
635  void ReadConfiguration(const char *filename = 0);
636  void ResetSession();
637  void UpdateListOfProofs();
638  void UpdateListOfSessions();
639  void UpdateListOfPackages();
640  void WriteConfiguration(const char *filename = 0);
641  void SetBusy(Bool_t busy = kTRUE) { fBusy = busy; }
642  void SetChangePic(Bool_t change) { fChangePic = change;}
643  void SetLogWindow(TSessionLogView *log) { fLogWindow = log; }
644  void ShowEnabledPackages();
645  void ShowPackages();
646  void ShowInfo(const char *txt);
647  void ShowLog(const char *queryref);
648  void ShowStatus();
649  void StartupMessage(char *msg, Bool_t stat, Int_t curr, Int_t total);
650  void StartViewer();
651  void Terminate();
652 
653  ClassDef(TSessionViewer, 0) // Session Viewer
654 };
655 
657 
658 #endif
TGTextButton * fBtnRemove
TGPopupMenu * fOptionsMenu
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1172
void OnBtnSubmit()
Submit query.
void OnUploadPackages()
Upload selected package(s) to the current session.
void Build(TSessionViewer *gui)
Build query information frame.
void OnApplyParallel()
Apply selected number of workers on current Proof session.
TGPopupMenu * GetCascadeMenu() const
void CleanupSession()
Clean-up Proof session.
void StartupMessage(char *msg, Bool_t stat, Int_t curr, Int_t total)
Handle startup message (connection progress) coming from Proof session.
void RemoveAll()
Remove all frames from composite frame.
void SetBusy(Bool_t busy=kTRUE)
void OnElementSelected(TObject *obj)
Handle OnElementSelected signal coming from new chain dialog.
TSessionServerFrame(TGWindow *parent, Int_t w, Int_t h)
Constructor.
TGHProgressBar * frmProg
const char * GetConfigText() const
void OnNewQueryMore()
Show/hide options frame and update button text accordingly.
TGListTree * fSessionHierarchy
void ChangeRightLogo(const char *name)
Change the right logo (used for animation).
TGVerticalFrame * fV2
TGTextEntry * fTxtAddress
long long Long64_t
Definition: RtypesCore.h:69
void UpdateInfos()
Update query information (header) text view.
virtual void RemoveAll()
Remove all items from the container.
Definition: TGCanvas.cxx:638
TGTextEntry * fTxtParFile
void OnStartupEnable(Bool_t on)
Handle multiple selection check button.
const TGPicture * fLocal
TGCompositeFrame * fFrmMore
TGCanvas * fDSetView
TSessionServerFrame * GetServerFrame() const
TEditQueryFrame * GetQueryEditFrame() const
Definition: TGTab.h:66
TGPopupMenu * fHelpMenu
void ProofInfos()
Display information on current session.
TGToolBar * fToolBar
float Float_t
Definition: RtypesCore.h:53
TGCompositeFrame * fFE
const TGPicture * GetLocalPict() const
void SetUserName(const char *str)
TGLVContainer * fLVContainer
void OnBtnDownClicked()
Move selected package entry one position down in the list.
void OnBrowseSelector()
Open file browser to choose selector macro.
TGLVContainer * GetLVContainer()
void ShowLog(const char *queryref)
Display the content of the temporary log file for queryref into a new text window.
TGTextButton * fBtnNewQuery
Definition: TDSet.h:153
TH1 * h
Definition: legend2.C:5
TGTextButton * fBtnClear
void OnListTreeDoubleClicked(TGListTreeItem *entry, Int_t btn)
Handle mouse double clicks in list tree (connect to server).
const char * GetUserName() const
void UpdateButtons(TQueryDescription *desc)
Update buttons state for the current query status.
void OnBtnAddClicked()
Open file dialog and add selected package file to the list.
void Update(TSessionDescription *desc)
Update fields with values from session description desc.
void OnBtnAbort()
Abort processing query.
void DeleteQuery()
Delete query from list tree and ask user if they want to delete it also from server.
TGPopupMenu * fFileMenu
void Build(TSessionViewer *gui)
Build query input information frame.
TGTextButton * fBtnRetrieve
static const char * filename()
TGTextButton * fBtnStop
void OnBtnStop()
Stop processing query.
TGPopupMenu * fCascadeMenu
void OnBrowseEventList()
Browse event list.
TSessionDescription * GetActDesc() const
The TEnv class reads config files, by default named .rootrc.
Definition: TEnv.h:128
Basic string class.
Definition: TString.h:137
TContextMenu * fContextMenu
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1186
int Int_t
Definition: RtypesCore.h:41
TGMenuBar * fMenuBar
bool Bool_t
Definition: RtypesCore.h:59
virtual ~TSessionQueryFrame()
Destructor.
virtual Bool_t HandleExpose(Event_t *event)
Handle expose event in server frame.
void SetPortNumber(Int_t port)
TGCheckButton * fChkMulti
TGCompositeFrame * fFB
TSessionServerFrame * fServerFrame
void Build(TSessionViewer *gui)
Build session frame.
TGTextButton * fBtnAdd
Basic time type with millisecond precision.
Definition: TTime.h:29
void OnApplyLogLevel()
Apply selected log level on current session.
void OnBtnRetrieve()
Retrieve query.
void AddObject(TObject *obj)
Add object to input list view.
void SetLogLevel(Int_t log)
virtual ~TSessionFrame()
Destructor.
void SetLogWindow(TSessionLogView *log)
TGTextButton * fApplyParallel
void OnBtnAddClicked()
Add newly created session configuration in the list of sessions.
const TGPicture * fProofCon
TList * GetSessions() const
void OnBtnRemoveDSet()
Remove dataset from the list and from the cluster.
TGPopupMenu * fSessionMenu
TGTextEntry * fCommandTxt
TGTextButton * fBtnMore
TSessionOutputFrame(TGWindow *parent, Int_t w, Int_t h)
Constructor.
virtual ~TSessionInputFrame()
Destructor.
TGVerticalFrame * fV1
const TGPicture * fProofDiscon
void OnBtnShowLogClicked()
Show session log.
TSessionViewer * fViewer
void OnCommandLine()
Command line handling.
TGTextButton * fBtnAdd
TGTextEntry * fTxtName
TGNumberEntry * fLogLevel
void OnBtnNewServerClicked()
Reset server configuration fields.
TGTextEntry * fTxtUsrName
const TGPicture * GetProofConPict() const
TGTextButton * fBtnEnable
TGCompositeFrame * fFrmNewServer
TSessionViewer(const char *title="ROOT Session Viewer", UInt_t w=550, UInt_t h=320)
Main Session viewer constructor.
TGTextEntry * fTxtConfig
void RemoveAll()
Remove all frames from composite frame.
TGTextButton * fBtnDisable
Double_t x[n]
Definition: legend1.C:17
TSessionViewer * fViewer
void DisableTimer()
Disable animation timer.
void OnBtnConnectClicked()
Connect to selected server.
const char * GetAddress() const
#define ClassDef(name, id)
Definition: Rtypes.h:254
void ShowStatus()
Retrieve and display Proof status.
void OnBtnDeleteClicked()
Delete selected session configuration (remove it from the list).
TGCheckButton * fClearCheck
TGTextButton * fBtnShowLog
Bool_t IsSync() const
TQueryDescription * fQuery
TGTextButton * fBtnSave
void SetLogLevel(Int_t log)
TGTextEntry * fTxtEventList
void ShowEnabledPackages()
Query list of enabled packages from proof and display it into a new text window.
TGStatusBar * fStatusBar
TGStatusBar * GetStatusBar() const
const char * GetText() const
Definition: TGTextEntry.h:140
TSessionViewer * fViewer
void OnListTreeClicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y)
Handle mouse clicks in list tree.
Definition: TGIcon.h:34
TRootEmbeddedCanvas * fECanvas
TGCompositeFrame * fFC
Int_t GetPortNumber() const
void OnBtnGetQueriesClicked()
Get list of queries from current Proof server and populate the list tree.
TGTab * GetTab() const
TGTextButton * fApplyLogLevel
TGLVContainer * fLVContainer
TGNumberEntry * fNumEntries
TGCanvas * fTreeView
TGCompositeFrame * fFB
TGTextButton * fBtnUp
TSessionInputFrame * GetInputFrame() const
TSessionFrame * GetSessionFrame() const
void OnCascadeMenu()
Handle feedback histograms configuration menu.
const TGPicture * fQueryDiscon
void WriteConfiguration(const char *filename=0)
Save actual configuration in config file "filename".
void UpdatePackages()
Update list of packages.
void UpdateHistos(TList *objs)
Update feedback histograms.
TGPopupMenu * fPopupQry
void SetSync(Bool_t sync)
void ShutdownSession()
Shutdown current session.
TEditQueryFrame * fFD
void EditQuery()
Edit currently selected query.
A container class for query results.
Definition: TQueryResult.h:44
TSessionQueryFrame * GetQueryFrame() const
TGTextButton * fBtnShowLog
TGTextView * fInfoTextView
TGTextButton * fBtnConnect
void OnElementClicked(TGLVEntry *entry, Int_t btn, Int_t x, Int_t y)
Handle mouse clicks on list view items.
void SetConfigText(const char *str)
TGTextBuffer * fCommandBuf
A doubly linked list.
Definition: TList.h:47
virtual ~TSessionViewer()
Destructor.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t)
Handle messages send to the TSessionViewer object.
virtual ~TSessionOutputFrame()
Destructor.
TGCompositeFrame * fFD
void Terminate()
Terminate Session : save configuration, clean temporary files and close Proof connections.
void UpdateListOfPackages()
Update the list of packages.
void ResetProgressDialog(const char *selec, Int_t files, Long64_t first, Long64_t entries)
Reset progress frame information fields.
void SetChangePic(Bool_t change)
TGCheckButton * fChkEnable
void SettingsChanged()
Settings have changed, update GUI accordingly.
const char * GetName() const
Returns name of object.
void MyHandleMenu(Int_t)
Handle session viewer custom popup menus.
TGNumberEntry * fNumPort
TGHProgressBar * fConnectProg
TSessionFrame(TGWindow *parent, Int_t w, Int_t h)
Constructor.
TGCheckButton * fSync
TGPicture * fRightIconPicture
void SetAddEnabled(Bool_t on=kTRUE)
TGListTree * fDataSetTree
TGTextButton * fBtnShow
virtual EButtonState GetState() const
Definition: TGButton.h:116
TQueryDescription * fActQuery
void Build(TSessionViewer *gui)
Build the "new query" dialog.
void OnElementDblClicked(TGLVEntry *entry, Int_t btn, Int_t x, Int_t y)
Handle double-clicks on list view items.
void IndicateStop(Bool_t aborted)
Indicate that Cancel or Stop was clicked.
TGListTree * GetSessionHierarchy() const
TSessionQueryFrame * fQueryFrame
void OnBtnNewQueryClicked()
Call "New Query" Dialog.
void Progress(Long64_t total, Long64_t processed)
Update progress bar and status labels.
TGLabel * fInfoLine[19]
TGFrame * fActFrame
void Build(TSessionViewer *gui)
Build server configuration frame.
This class provides an interface to context sensitive popup menus.
Definition: TContextMenu.h:44
TGCompositeFrame * fFA
Bool_t IsBusy() const
TGTextEntry * fTxtSelector
TEditQueryFrame(TGWindow *p, Int_t w, Int_t h)
Create a new Query dialog, used by the Session Viewer, to Edit a Query if the editmode flag is set...
TSessionViewer * fViewer
const char * GetName() const
Returns name of object.
unsigned int UInt_t
Definition: RtypesCore.h:42
void OnBtnSave()
Save current settings in main session viewer.
void ProgressLocal(Long64_t total, Long64_t processed)
Update progress bar and status labels.
TSessionViewer * fViewer
void OnConfigFileClicked()
Browse configuration files.
TGTextButton * fBtnUpload
const TGPicture * fBaseIcon
TSessionInputFrame(TGWindow *parent, Int_t w, Int_t h)
Constructor.
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:57
TGTab * GetTab() const
TGPopupMenu * GetPopupQry() const
TSessionDescription * fActDesc
const char * GetName() const
Return unique name, used in SavePrimitive methods.
void OnBtnRemoveClicked()
Remove selected package from the list.
virtual void SetIntNumber(Long_t val)
void SetAddress(const char *str)
Long64_t entry
TSessionFrame * fSessionFrame
TGPopupMenu * GetOptionsMenu() const
virtual ~TEditQueryFrame()
Delete query dialog.
TContextMenu * GetContextMenu() const
void OnBrowseChain()
Call new chain dialog.
void SetLocal(Bool_t local=kTRUE)
Switch widgets status/visibility for local/remote sessions.
void Progress(Long64_t total, Long64_t processed, Long64_t bytesread, Float_t initTime, Float_t procTime, Float_t evtrti, Float_t mbrti)
TSessionOutputFrame * GetOutputFrame() const
void UpdateListOfProofs()
Update list of existing Proof sessions.
const TGPicture * GetBasePict() const
void UpdateFields(TQueryDescription *desc)
Update entry fields with query description values.
TGTextButton * fBtnShowEnabled
void Feedback(TList *objs)
Feedback function connected to Feedback signal.
void ShowInfo(const char *txt)
Display text in status bar.
static unsigned int total
void OnDisablePackages()
Disable selected package(s) in the current session.
void Build(TSessionViewer *gui)
Build query output information frame.
long Long_t
Definition: RtypesCore.h:50
The Canvas class.
Definition: TCanvas.h:48
TGTextEntry * fTxtOptions
virtual ~TSessionServerFrame()
Destructor.
TGLVContainer * GetLVContainer()
EMenuIdentification
void Modified(Bool_t mod=kTRUE)
Notify changes in query editor settings.
TGTextButton * fBtnAbort
TQueryDescription * fDesc
void CheckAutoEnPack(Bool_t checked=kTRUE)
TGTextButton * fBtnRemoveDSet
TGCompositeFrame * fFA
void AddObject(TObject *obj)
Add object to output list view.
TSessionOutputFrame * fOutputFrame
void LogMessage(const char *msg, Bool_t all)
Load/append a log msg in the log frame.
Int_t GetLogLevel() const
TGListBox * fLBPackages
void OnBtnShowLog()
Show query log.
Definition: TProof.h:339
void OnBtnUploadDSet()
Open Upload Dataset dialog.
Double_t y[n]
Definition: legend1.C:17
void CloseWindow()
Close main Session Viewer window.
TGTextButton * fBtnDown
Bool_t IsAutoSave() const
TGNumberEntry * fNumFirstEntry
TGPopupMenu * fQueryMenu
void OnClearPackages()
Clear (disable) all packages in the current session.
void SetConnectEnabled(Bool_t on=kTRUE)
TGTextButton * fBtnGetQueries
TGPopupMenu * fPopupSrv
#define name(a, b)
Definition: linkTestLib0.cpp:5
void OnBtnDisconnectClicked()
Disconnect from current Proof session.
void ShowPackages()
Query the list of uploaded packages from proof and display it into a new text window.
virtual void Build()
Build main session viewer frame and subframes.
TSessionInputFrame * fInputFrame
Mother of all ROOT objects.
Definition: TObject.h:58
UserGroup_t * fUserGroup
Int_t GetLogLevel() const
TGListTreeItem * GetSessionItem() const
void UpdateListOfSessions()
Update list of existing Proof sessions.
#define R__EXTERN
Definition: DllImport.h:27
TGTextButton * fBtnUploadDSet
TGListTreeItem * fSessionItem
TGHProgressBar * GetConnectProg() const
EQueryStatus fStatus
TGHorizontalFrame * fHf
void SetName(const char *str)
const TGPicture * GetQueryDisconPict() const
R__EXTERN TSessionViewer * gSessionViewer
TGTextEntry * fTxtChain
const char * GetName() const
Returns name of object.
TSessionViewer * fViewer
A chain is a collection of files containg TTree objects.
Definition: TChain.h:35
TSessionQueryFrame(TGWindow *parent, Int_t w, Int_t h)
Constructor.
TQueryResult * fResult
TGTextButton * fBtnFinalize
void QueryResultReady(char *query)
Handle signal "query result ready" coming from Proof session.
virtual Long_t GetIntNumber() const
TGPopupMenu * GetPopupSrv() const
TGTextView * fInfoTextView
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for session server frame.
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
const TGPicture * GetQueryConPict() const
void ReadConfiguration(const char *filename=0)
Read configuration file and populate list of sessions list of queries and list of packages...
Bool_t HandleTimer(TTimer *)
Handle animation timer.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
void OnBtnFinalize()
Finalize query.
void OnBtnUpClicked()
Move selected package entry one position up in the list.
void OnEnablePackages()
Enable selected package(s) in the current session.
TGTextButton * fBtnVerifyDSet
TGCompositeFrame * fFC
const Bool_t kTRUE
Definition: Rtypes.h:91
TGTextEntry * fTxtQueryName
TObject * obj
TGTextButton * fBtnSubmit
void ResetSession()
Reset Proof session.
ESessionQueryStatus fStatus
TGIcon * fRightIcon
const TGPicture * fQueryCon
TGTextButton * fBtnRefresh
void EnableTimer()
Enable animation timer.
TGTextEntry * fTxtParallel
void SettingsChanged()
Settings have changed, update GUI accordingly.
double log(double)
void StartViewer()
Start TreeViewer from selected TChain.
void OnMultipleSelection(Bool_t on)
Handle multiple selection check button.
void UpdateListOfDataSets()
Update list of dataset present on the cluster.
TGNumberEntry * fLogLevel
TCanvas * GetStatsCanvas() const
void OnBtnVerifyDSet()
Verify that the files in the selected dataset are present on the cluster.
const TGPicture * GetProofDisconPict() const
TSessionLogView * fLogWindow