Logo ROOT  
Reference Guide
TSessionDialogs.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 #ifndef ROOT_TSessionDialogs
13 #define ROOT_TSessionDialogs
14 
15 
16 #include "TSessionViewer.h"
17 
18 class TList;
19 class TSeqCollection;
20 class TChain;
21 class TDSet;
22 class TGTextEntry;
23 class TGTextButton;
24 class TGTextBuffer;
25 class TGCheckButton;
26 class TGLabel;
27 class TGListView;
28 class TGPicture;
29 class TGFileContainer;
30 
31 //////////////////////////////////////////////////////////////////////////
32 // New Chain Dialog
33 //////////////////////////////////////////////////////////////////////////
34 
36 
37 private:
38  TGFileContainer *fContents; // macro files container
39  TGListView *fListView; // memory objects list view
40  TGLVContainer *fLVContainer; // and its container
41  TGTextBuffer *fNameBuf; // buffer for dataset name
42  TGTextEntry *fName; // dataset name text entry
43  TGTextButton *fOkButton; // ok button
44  TGTextButton *fCancelButton; // cancel button
45  TSeqCollection *fChains; // collection of datasets
46  TObject *fChain; // actual TDSet or TChain
47 
48 public:
49  TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0);
50  virtual ~TNewChainDlg();
51 
52  void UpdateList();
53  virtual void OnDoubleClick(TGLVEntry*,Int_t);
54  virtual void DisplayDirectory(const TString &fname);
55  void OnElementClicked(TGLVEntry* entry, Int_t btn);
56  void OnElementSelected(TObject *obj); //*SIGNAL*
57 
58  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
59  virtual void CloseWindow();
60 
61  ClassDef(TNewChainDlg, 0) // New chain dialog
62 };
63 
64 //////////////////////////////////////////////////////////////////////////
65 // New Query Dialog
66 //////////////////////////////////////////////////////////////////////////
67 
69 
70 private:
71  Bool_t fEditMode; // kTRUE if used to edit existing query
72  Bool_t fModified; // kTRUE if settings have changed
73  TGCompositeFrame *fFrmNewQuery; // top (main) frame
74  TGCompositeFrame *fFrmMore; // options frame
75  TGTextButton *fBtnMore; // "more >>" / "less <<" button
76  TGTextButton *fBtnClose; // close button
77  TGTextButton *fBtnSave; // save button
78  TGTextButton *fBtnSubmit; // save & submit button
79 
80  TGTextEntry *fTxtQueryName; // query name text entry
81  TGTextEntry *fTxtChain; // chain name text entry
82  TGTextEntry *fTxtSelector; // selector name text entry
83  TGTextEntry *fTxtOptions; // options text entry
84  TGNumberEntry *fNumEntries; // number of entries selector
85  TGNumberEntry *fNumFirstEntry; // first entry selector
86  TGTextEntry *fTxtEventList; // event list text entry
87  TSessionViewer *fViewer; // pointer on main viewer
88  TQueryDescription *fQuery; // query description class
89  TObject *fChain; // actual TChain
90 
91 public:
92  TNewQueryDlg(TSessionViewer *gui, Int_t Width, Int_t Height,
93  TQueryDescription *query = 0, Bool_t editmode = kFALSE);
94  virtual ~TNewQueryDlg();
95  void Build(TSessionViewer *gui);
96  void OnNewQueryMore();
97  void OnBrowseChain();
98  void OnBrowseSelector();
99  void OnBrowseEventList();
100  void OnBtnSaveClicked();
101  void OnBtnCloseClicked();
102  void OnBtnSubmitClicked();
103  void OnElementSelected(TObject *obj);
104  void CloseWindow();
105  void Popup();
106  void SettingsChanged();
107  void UpdateFields(TQueryDescription *desc);
108  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
109 
110  ClassDef(TNewQueryDlg, 0) // New query dialog
111 };
112 
113 //////////////////////////////////////////////////////////////////////////
114 // Upload DataSet Dialog
115 //////////////////////////////////////////////////////////////////////////
116 
118 
119 private:
121  TList *fSkippedFiles; // List of skipped files
122  TGTextEntry *fDSetName; // dataset name text entry
123  TGTextEntry *fDestinationURL; // destination URL text entry
124  TGTextEntry *fLocationURL; // location URL text entry
125  TGListView *fListView; // dataset files list view
126  TGLVContainer *fLVContainer; // and its container
127  TGTextButton *fAddButton; // Add >> button
128  TGTextButton *fBrowseButton; // Browse... button
129  TGTextButton *fRemoveButton; // Remove button
130  TGTextButton *fClearButton; // Clear button
131  TGCheckButton *fOverwriteDSet; // overwrite DataSet
132  TGCheckButton *fOverwriteFiles; // overwrite All Files
133  TGCheckButton *fAppendFiles; // append files
134  TGTextButton *fUploadButton; // Upload button
135  TGTextButton *fCloseDlgButton; // Close Dialog button
136  TSessionViewer *fViewer; // pointer on main viewer
137 
138 public:
140  virtual ~TUploadDataSetDlg();
141 
142  virtual void CloseWindow();
143  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
144  void AddFiles(const char *fileName);
145  void AddFiles(TList *fileList);
146  void BrowseFiles();
147  void ClearFiles();
148  void RemoveFile();
149  void UploadDataSet();
150  void OnOverwriteDataset(Bool_t on);
151  void OnOverwriteFiles(Bool_t on);
152  void OnAppendFiles(Bool_t on);
153 
154  ClassDef(TUploadDataSetDlg, 0) // New query dialog
155 };
156 
157 #endif
TNewQueryDlg::Popup
void Popup()
Display dialog and set focus to query name text entry.
Definition: TSessionDialogs.cxx:732
TGTransientFrame
Defines transient windows that typically are used for dialogs windows.
Definition: TGFrame.h:498
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TNewChainDlg::fNameBuf
TGTextBuffer * fNameBuf
Definition: TSessionDialogs.h:41
TGFileContainer
Definition: TGFSContainer.h:115
TGPicture
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
TUploadDataSetDlg::fViewer
TSessionViewer * fViewer
Definition: TSessionDialogs.h:136
TNewQueryDlg::OnBrowseChain
void OnBrowseChain()
Call new chain dialog.
Definition: TSessionDialogs.cxx:568
TSessionViewer
Widget used to manage PROOF or local sessions, PROOF connections, queries construction and results ha...
Definition: TSessionViewer.h:515
TNewChainDlg
Definition: TSessionDialogs.h:35
TNewQueryDlg::fModified
Bool_t fModified
Definition: TSessionDialogs.h:72
TNewChainDlg::CloseWindow
virtual void CloseWindow()
Close file dialog.
Definition: TSessionDialogs.cxx:331
TNewChainDlg::fListView
TGListView * fListView
Definition: TSessionDialogs.h:39
TNewQueryDlg::CloseWindow
void CloseWindow()
Called when window is closed via the window manager.
Definition: TSessionDialogs.cxx:545
TNewChainDlg::fLVContainer
TGLVContainer * fLVContainer
Definition: TSessionDialogs.h:40
TUploadDataSetDlg::fDSetName
TGTextEntry * fDSetName
Definition: TSessionDialogs.h:122
TNewChainDlg::fName
TGTextEntry * fName
Definition: TSessionDialogs.h:42
TGLabel
This class handles GUI labels.
Definition: TGLabel.h:24
TNewQueryDlg::fTxtQueryName
TGTextEntry * fTxtQueryName
Definition: TSessionDialogs.h:80
TNewQueryDlg::fFrmMore
TGCompositeFrame * fFrmMore
Definition: TSessionDialogs.h:74
TNewQueryDlg::fBtnClose
TGTextButton * fBtnClose
Definition: TSessionDialogs.h:76
TGTextButton
Yield an action as soon as it is clicked.
Definition: TGButton.h:142
TGLVEntry
Definition: TGListView.h:36
TNewQueryDlg::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for new query dialog.
Definition: TSessionDialogs.cxx:794
TNewQueryDlg::SettingsChanged
void SettingsChanged()
Settings have changed, update GUI accordingly.
Definition: TSessionDialogs.cxx:741
TUploadDataSetDlg::RemoveFile
void RemoveFile()
Remove the selected entry from the list view.
Definition: TSessionDialogs.cxx:1199
TUploadDataSetDlg::fClearButton
TGTextButton * fClearButton
Definition: TSessionDialogs.h:130
TNewQueryDlg::fNumFirstEntry
TGNumberEntry * fNumFirstEntry
Definition: TSessionDialogs.h:85
TNewQueryDlg::fQuery
TQueryDescription * fQuery
Definition: TSessionDialogs.h:88
TNewQueryDlg::Build
void Build(TSessionViewer *gui)
Build the "new query" dialog.
Definition: TSessionDialogs.cxx:398
TNewQueryDlg::fChain
TObject * fChain
Definition: TSessionDialogs.h:89
TNewChainDlg::OnElementClicked
void OnElementClicked(TGLVEntry *entry, Int_t btn)
Handle click in the Memory list view and put the type and name of selected object in the text entry.
Definition: TSessionDialogs.cxx:192
TUploadDataSetDlg::ClearFiles
void ClearFiles()
Clear content of the list view.
Definition: TSessionDialogs.cxx:1163
TNewChainDlg::fChain
TObject * fChain
Definition: TSessionDialogs.h:46
TUploadDataSetDlg::fUploadButton
TGTextButton * fUploadButton
Definition: TSessionDialogs.h:134
TString
Basic string class.
Definition: TString.h:136
TGListView
A list view is a widget that can contain a number of items arranged in a grid or list.
Definition: TGListView.h:115
TUploadDataSetDlg::~TUploadDataSetDlg
virtual ~TUploadDataSetDlg()
Delete chain dialog.
Definition: TSessionDialogs.cxx:1009
TUploadDataSetDlg::fDestinationURL
TGTextEntry * fDestinationURL
Definition: TSessionDialogs.h:123
TUploadDataSetDlg::fCloseDlgButton
TGTextButton * fCloseDlgButton
Definition: TSessionDialogs.h:135
bool
TGTextBuffer
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Definition: TGTextBuffer.h:19
TNewQueryDlg::fTxtSelector
TGTextEntry * fTxtSelector
Definition: TSessionDialogs.h:82
TNewChainDlg::OnDoubleClick
virtual void OnDoubleClick(TGLVEntry *, Int_t)
Handle double click in the File container.
Definition: TSessionDialogs.cxx:259
TUploadDataSetDlg::OnOverwriteDataset
void OnOverwriteDataset(Bool_t on)
Notification of Overwrite Dataset check button.
Definition: TSessionDialogs.cxx:1174
TNewQueryDlg::OnNewQueryMore
void OnNewQueryMore()
Show/hide options frame and update button text accordingly.
Definition: TSessionDialogs.cxx:553
TGCheckButton
Selects different options.
Definition: TGButton.h:264
TUploadDataSetDlg::OnAppendFiles
void OnAppendFiles(Bool_t on)
Notification of Append Files check button.
Definition: TSessionDialogs.cxx:1190
TUploadDataSetDlg::fListView
TGListView * fListView
Definition: TSessionDialogs.h:125
TUploadDataSetDlg::fLVContainer
TGLVContainer * fLVContainer
Definition: TSessionDialogs.h:126
TUploadDataSetDlg::CloseWindow
virtual void CloseWindow()
Close upload dataset dialog.
Definition: TSessionDialogs.cxx:1018
TUploadDataSetDlg::fAppendFiles
TGCheckButton * fAppendFiles
Definition: TSessionDialogs.h:133
TNewQueryDlg::fBtnSave
TGTextButton * fBtnSave
Definition: TSessionDialogs.h:77
TNewQueryDlg::TNewQueryDlg
TNewQueryDlg(TSessionViewer *gui, Int_t Width, Int_t Height, TQueryDescription *query=0, Bool_t editmode=kFALSE)
Create a new Query dialog, used by the Session Viewer, to Edit a Query if the editmode flag is set,...
Definition: TSessionDialogs.cxx:345
TUploadDataSetDlg::TUploadDataSetDlg
TUploadDataSetDlg(TSessionViewer *gui, Int_t w, Int_t h)
Create a Upload DataSet dialog box. Used to create and upload a dataset.
Definition: TSessionDialogs.cxx:843
TUploadDataSetDlg::fOverwriteFiles
TGCheckButton * fOverwriteFiles
Definition: TSessionDialogs.h:132
TNewChainDlg::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for new chain dialog.
Definition: TSessionDialogs.cxx:285
h
#define h(i)
Definition: RSha256.hxx:106
TUploadDataSetDlg::fOverwriteDSet
TGCheckButton * fOverwriteDSet
Definition: TSessionDialogs.h:131
TGTextEntry
A TGTextEntry is a one line text input widget.
Definition: TGTextEntry.h:24
TUploadDataSetDlg
Definition: TSessionDialogs.h:117
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TNewQueryDlg
Definition: TSessionDialogs.h:68
TNewQueryDlg::fBtnSubmit
TGTextButton * fBtnSubmit
Definition: TSessionDialogs.h:78
Long_t
long Long_t
Definition: RtypesCore.h:54
TUploadDataSetDlg::BrowseFiles
void BrowseFiles()
Opens the TGFileDialog to allow user to select local file(s) to be added in the list view of dataset ...
Definition: TSessionDialogs.cxx:1146
TNewQueryDlg::~TNewQueryDlg
virtual ~TNewQueryDlg()
Delete query dialog.
Definition: TSessionDialogs.cxx:389
TNewChainDlg::TNewChainDlg
TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0)
Create a new chain dialog box.
Definition: TSessionDialogs.cxx:81
TNewQueryDlg::fBtnMore
TGTextButton * fBtnMore
Definition: TSessionDialogs.h:75
TNewQueryDlg::fNumEntries
TGNumberEntry * fNumEntries
Definition: TSessionDialogs.h:84
TUploadDataSetDlg::UploadDataSet
void UploadDataSet()
Upload the dataset to the server.
Definition: TSessionDialogs.cxx:1212
TNewQueryDlg::fTxtEventList
TGTextEntry * fTxtEventList
Definition: TSessionDialogs.h:86
TNewQueryDlg::fFrmNewQuery
TGCompositeFrame * fFrmNewQuery
Definition: TSessionDialogs.h:73
TUploadDataSetDlg::ProcessMessage
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for upload dataset dialog.
Definition: TSessionDialogs.cxx:1027
TDSet
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:153
TNewChainDlg::fChains
TSeqCollection * fChains
Definition: TSessionDialogs.h:45
TNewChainDlg::fOkButton
TGTextButton * fOkButton
Definition: TSessionDialogs.h:43
TUploadDataSetDlg::AddFiles
void AddFiles(const char *fileName)
Add File name(s) from the file location URL to the list view.
Definition: TSessionDialogs.cxx:1075
TNewChainDlg::UpdateList
void UpdateList()
Update Memory list view.
Definition: TSessionDialogs.cxx:211
TUploadDataSetDlg::fUploading
Bool_t fUploading
Definition: TSessionDialogs.h:120
TNewQueryDlg::OnBtnSaveClicked
void OnBtnSaveClicked()
Save current settings in main session viewer.
Definition: TSessionDialogs.cxx:611
TNewChainDlg::fCancelButton
TGTextButton * fCancelButton
Definition: TSessionDialogs.h:44
TSeqCollection
Sequenceable collection abstract base class.
Definition: TSeqCollection.h:28
TNewChainDlg::DisplayDirectory
virtual void DisplayDirectory(const TString &fname)
Display content of directory.
Definition: TSessionDialogs.cxx:246
TNewChainDlg::fContents
TGFileContainer * fContents
Definition: TSessionDialogs.h:38
TQueryDescription
Definition: TSessionViewer.h:82
TSessionViewer.h
TNewQueryDlg::OnBrowseSelector
void OnBrowseSelector()
Open file browser to choose selector macro.
Definition: TSessionDialogs.cxx:592
TGLVContainer
Definition: TGListView.h:178
TNewQueryDlg::fViewer
TSessionViewer * fViewer
Definition: TSessionDialogs.h:87
TNewQueryDlg::fEditMode
Bool_t fEditMode
Definition: TSessionDialogs.h:71
TNewQueryDlg::OnElementSelected
void OnElementSelected(TObject *obj)
Handle OnElementSelected signal coming from new chain dialog.
Definition: TSessionDialogs.cxx:578
TNewQueryDlg::fTxtChain
TGTextEntry * fTxtChain
Definition: TSessionDialogs.h:81
TNewChainDlg::~TNewChainDlg
virtual ~TNewChainDlg()
Delete chain dialog.
Definition: TSessionDialogs.cxx:169
TUploadDataSetDlg::fAddButton
TGTextButton * fAddButton
Definition: TSessionDialogs.h:127
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TNewQueryDlg::UpdateFields
void UpdateFields(TQueryDescription *desc)
Update entry fields with query description values.
Definition: TSessionDialogs.cxx:777
TUploadDataSetDlg::OnOverwriteFiles
void OnOverwriteFiles(Bool_t on)
Notification of Overwrite Files check button.
Definition: TSessionDialogs.cxx:1183
TNewQueryDlg::OnBtnSubmitClicked
void OnBtnSubmitClicked()
Save and submit query description.
Definition: TSessionDialogs.cxx:704
TChain
A chain is a collection of files containing TTree objects.
Definition: TChain.h:33
TGNumberEntry
TGNumberEntry is a number entry input widget with up/down buttons.
Definition: TGNumberEntry.h:148
TUploadDataSetDlg::fBrowseButton
TGTextButton * fBrowseButton
Definition: TSessionDialogs.h:128
TUploadDataSetDlg::fSkippedFiles
TList * fSkippedFiles
Definition: TSessionDialogs.h:121
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TNewQueryDlg::fTxtOptions
TGTextEntry * fTxtOptions
Definition: TSessionDialogs.h:83
TUploadDataSetDlg::fRemoveButton
TGTextButton * fRemoveButton
Definition: TSessionDialogs.h:129
TList
A doubly linked list.
Definition: TList.h:44
TUploadDataSetDlg::fLocationURL
TGTextEntry * fLocationURL
Definition: TSessionDialogs.h:124
TNewQueryDlg::OnBtnCloseClicked
void OnBtnCloseClicked()
Close dialog.
Definition: TSessionDialogs.cxx:713
main
int main(int argc, char *argv[])
Definition: cef_main.cxx:54
TNewQueryDlg::OnBrowseEventList
void OnBrowseEventList()
Browse event list.
Definition: TSessionDialogs.cxx:604
int
TNewChainDlg::OnElementSelected
void OnElementSelected(TObject *obj)
Emits OnElementSelected signal if dset is not zero.
Definition: TSessionDialogs.cxx:180