Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
18class TList;
19class TSeqCollection;
20class TChain;
21class TDSet;
22class TGTextEntry;
23class TGTextButton;
24class TGTextBuffer;
25class TGCheckButton;
26class TGLabel;
27class TGListView;
28class TGPicture;
29class TGFileContainer;
30
31//////////////////////////////////////////////////////////////////////////
32// New Chain Dialog
33//////////////////////////////////////////////////////////////////////////
34
36
37private:
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
48public:
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(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
59 virtual void CloseWindow();
60
61 ClassDef(TNewChainDlg, 0) // New chain dialog
62};
63
64//////////////////////////////////////////////////////////////////////////
65// New Query Dialog
66//////////////////////////////////////////////////////////////////////////
67
69
70private:
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
91public:
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();
108 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2);
109
110 ClassDef(TNewQueryDlg, 0) // New query dialog
111};
112
113//////////////////////////////////////////////////////////////////////////
114// Upload DataSet Dialog
115//////////////////////////////////////////////////////////////////////////
116
118
119private:
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
138public:
140 virtual ~TUploadDataSetDlg();
141
142 virtual void CloseWindow();
143 virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_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
int main()
Definition Prototype.cxx:12
#define h(i)
Definition RSha256.hxx:106
long Longptr_t
Definition RtypesCore.h:82
const Bool_t kFALSE
Definition RtypesCore.h:101
#define ClassDef(name, id)
Definition Rtypes.h:325
A chain is a collection of files containing TTree objects.
Definition TChain.h:33
This class implements a data set to be used for PROOF processing.
Definition TDSet.h:153
Selects different options.
Definition TGButton.h:264
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
This class handles GUI labels.
Definition TGLabel.h:24
A list view is a widget that can contain a number of items arranged in a grid or list.
Definition TGListView.h:115
TGNumberEntry is a number entry input widget with up/down buttons.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition TGPicture.h:25
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
Defines transient windows that typically are used for dialogs windows.
Definition TGFrame.h:499
ROOT GUI Window base class.
Definition TGWindow.h:23
A doubly linked list.
Definition TList.h:38
virtual void OnDoubleClick(TGLVEntry *, Int_t)
Handle double click in the File container.
TGTextButton * fOkButton
TGTextButton * fCancelButton
TGListView * fListView
virtual ~TNewChainDlg()
Delete chain dialog.
void OnElementSelected(TObject *obj)
Emits OnElementSelected signal if dset is not zero.
TObject * fChain
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages for new chain dialog.
TSeqCollection * fChains
TGLVContainer * fLVContainer
void UpdateList()
Update Memory list view.
TGFileContainer * fContents
virtual void DisplayDirectory(const TString &fname)
Display content of directory.
TGTextBuffer * fNameBuf
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.
virtual void CloseWindow()
Close file dialog.
TGTextEntry * fName
void UpdateFields(TQueryDescription *desc)
Update entry fields with query description values.
void OnElementSelected(TObject *obj)
Handle OnElementSelected signal coming from new chain dialog.
void OnBtnSubmitClicked()
Save and submit query description.
TGTextButton * fBtnMore
TGTextButton * fBtnClose
TGTextEntry * fTxtEventList
TGCompositeFrame * fFrmNewQuery
TGTextEntry * fTxtOptions
void OnBtnSaveClicked()
Save current settings in main session viewer.
TQueryDescription * fQuery
TGTextEntry * fTxtChain
virtual ~TNewQueryDlg()
Delete query dialog.
void OnBtnCloseClicked()
Close dialog.
void SettingsChanged()
Settings have changed, update GUI accordingly.
TGTextButton * fBtnSubmit
TSessionViewer * fViewer
void Popup()
Display dialog and set focus to query name text entry.
void OnBrowseSelector()
Open file browser to choose selector macro.
TGNumberEntry * fNumFirstEntry
TGCompositeFrame * fFrmMore
TGTextEntry * fTxtQueryName
TGTextButton * fBtnSave
void OnBrowseChain()
Call new chain dialog.
TGNumberEntry * fNumEntries
void Build(TSessionViewer *gui)
Build the "new query" dialog.
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages for new query dialog.
void OnNewQueryMore()
Show/hide options frame and update button text accordingly.
void CloseWindow()
Called when window is closed via the window manager.
TGTextEntry * fTxtSelector
void OnBrowseEventList()
Browse event list.
TObject * fChain
Mother of all ROOT objects.
Definition TObject.h:41
Sequenceable collection abstract base class.
Widget used to manage PROOF or local sessions, PROOF connections, queries construction and results ha...
Basic string class.
Definition TString.h:136
void ClearFiles()
Clear content of the list view.
void OnAppendFiles(Bool_t on)
Notification of Append Files check button.
void RemoveFile()
Remove the selected entry from the list view.
void BrowseFiles()
Opens the TGFileDialog to allow user to select local file(s) to be added in the list view of dataset ...
TSessionViewer * fViewer
void UploadDataSet()
Upload the dataset to the server.
virtual ~TUploadDataSetDlg()
Delete chain dialog.
virtual Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Process messages for upload dataset dialog.
void OnOverwriteDataset(Bool_t on)
Notification of Overwrite Dataset check button.
TGLVContainer * fLVContainer
TGTextButton * fRemoveButton
TGTextButton * fUploadButton
TGTextEntry * fLocationURL
TGCheckButton * fOverwriteDSet
TGTextEntry * fDestinationURL
TGTextEntry * fDSetName
TGTextButton * fAddButton
virtual void CloseWindow()
Close upload dataset dialog.
TGTextButton * fCloseDlgButton
TGTextButton * fBrowseButton
TGCheckButton * fOverwriteFiles
void OnOverwriteFiles(Bool_t on)
Notification of Overwrite Files check button.
TGTextButton * fClearButton
void AddFiles(const char *fileName)
Add File name(s) from the file location URL to the list view.
TGCheckButton * fAppendFiles
TGListView * fListView