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