Logo ROOT   6.10/00
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 // //
17 // TSessionDialogs //
18 // //
19 // This file defines several dialogs that are used by TSessionViewer. //
20 // The following dialogs are available: TNewChainDlg and TNewQueryDlg. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TSessionViewer.h"
26 
27 class TList;
28 class TSeqCollection;
29 class TChain;
30 class TDSet;
31 class TGTextEntry;
32 class TGTextButton;
33 class TGTextBuffer;
34 class TGCheckButton;
35 class TGLabel;
36 class TGListView;
37 class TGPicture;
38 class TGFileContainer;
39 
40 //////////////////////////////////////////////////////////////////////////
41 // New Chain Dialog
42 //////////////////////////////////////////////////////////////////////////
43 
45 
46 private:
47  TGFileContainer *fContents; // macro files container
48  TGListView *fListView; // memory objects list view
49  TGLVContainer *fLVContainer; // and its container
50  TGTextBuffer *fNameBuf; // buffer for dataset name
51  TGTextEntry *fName; // dataset name text entry
52  TGTextButton *fOkButton; // ok button
53  TGTextButton *fCancelButton; // cancel button
54  TSeqCollection *fChains; // collection of datasets
55  TObject *fChain; // actual TDSet or TChain
56 
57 public:
58  TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0);
59  virtual ~TNewChainDlg();
60 
61  void UpdateList();
62  virtual void OnDoubleClick(TGLVEntry*,Int_t);
63  virtual void DisplayDirectory(const TString &fname);
64  void OnElementClicked(TGLVEntry* entry, Int_t btn);
65  void OnElementSelected(TObject *obj); //*SIGNAL*
66 
67  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
68  virtual void CloseWindow();
69 
70  ClassDef(TNewChainDlg, 0) // New chain dialog
71 };
72 
73 //////////////////////////////////////////////////////////////////////////
74 // New Query Dialog
75 //////////////////////////////////////////////////////////////////////////
76 
78 
79 private:
80  Bool_t fEditMode; // kTRUE if used to edit existing query
81  Bool_t fModified; // kTRUE if settings have changed
82  TGCompositeFrame *fFrmNewQuery; // top (main) frame
83  TGCompositeFrame *fFrmMore; // options frame
84  TGTextButton *fBtnMore; // "more >>" / "less <<" button
85  TGTextButton *fBtnClose; // close button
86  TGTextButton *fBtnSave; // save button
87  TGTextButton *fBtnSubmit; // save & submit button
88 
89  TGTextEntry *fTxtQueryName; // query name text entry
90  TGTextEntry *fTxtChain; // chain name text entry
91  TGTextEntry *fTxtSelector; // selector name text entry
92  TGTextEntry *fTxtOptions; // options text entry
93  TGNumberEntry *fNumEntries; // number of entries selector
94  TGNumberEntry *fNumFirstEntry; // first entry selector
95  TGTextEntry *fTxtEventList; // event list text entry
96  TSessionViewer *fViewer; // pointer on main viewer
97  TQueryDescription *fQuery; // query description class
98  TObject *fChain; // actual TChain
99 
100 public:
101  TNewQueryDlg(TSessionViewer *gui, Int_t Width, Int_t Height,
102  TQueryDescription *query = 0, Bool_t editmode = kFALSE);
103  virtual ~TNewQueryDlg();
104  void Build(TSessionViewer *gui);
105  void OnNewQueryMore();
106  void OnBrowseChain();
107  void OnBrowseSelector();
108  void OnBrowseEventList();
109  void OnBtnSaveClicked();
110  void OnBtnCloseClicked();
111  void OnBtnSubmitClicked();
112  void OnElementSelected(TObject *obj);
113  void CloseWindow();
114  void Popup();
115  void SettingsChanged();
116  void UpdateFields(TQueryDescription *desc);
117  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
118 
119  ClassDef(TNewQueryDlg, 0) // New query dialog
120 };
121 
122 //////////////////////////////////////////////////////////////////////////
123 // Upload DataSet Dialog
124 //////////////////////////////////////////////////////////////////////////
125 
127 
128 private:
130  TList *fSkippedFiles; // List of skipped files
131  TGTextEntry *fDSetName; // dataset name text entry
132  TGTextEntry *fDestinationURL; // destination URL text entry
133  TGTextEntry *fLocationURL; // location URL text entry
134  TGListView *fListView; // dataset files list view
135  TGLVContainer *fLVContainer; // and its container
136  TGTextButton *fAddButton; // Add >> button
137  TGTextButton *fBrowseButton; // Browse... button
138  TGTextButton *fRemoveButton; // Remove button
139  TGTextButton *fClearButton; // Clear button
140  TGCheckButton *fOverwriteDSet; // overwrite DataSet
141  TGCheckButton *fOverwriteFiles; // overwrite All Files
142  TGCheckButton *fAppendFiles; // append files
143  TGTextButton *fUploadButton; // Upload button
144  TGTextButton *fCloseDlgButton; // Close Dialog button
145  TSessionViewer *fViewer; // pointer on main viewer
146 
147 public:
149  virtual ~TUploadDataSetDlg();
150 
151  virtual void CloseWindow();
152  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
153  void AddFiles(const char *fileName);
154  void AddFiles(TList *fileList);
155  void BrowseFiles();
156  void ClearFiles();
157  void RemoveFile();
158  void UploadDataSet();
159  void OnOverwriteDataset(Bool_t on);
160  void OnOverwriteFiles(Bool_t on);
161  void OnAppendFiles(Bool_t on);
162 
163  ClassDef(TUploadDataSetDlg, 0) // New query dialog
164 };
165 
166 #endif
TGTextEntry * fName
TGLVContainer * fLVContainer
TGFileContainer * fContents
void Popup()
Display dialog and set focus to query name text entry.
TGTextBuffer * fNameBuf
TGTextEntry * fTxtChain
void OnBrowseChain()
Call new chain dialog.
void RemoveFile()
Remove the selected entry from the list view.
void OnBrowseSelector()
Open file browser to choose selector macro.
TGTextButton * fRemoveButton
TGCompositeFrame * fFrmNewQuery
TGTextEntry * fLocationURL
TGTextEntry * fDSetName
void OnElementSelected(TObject *obj)
Handle OnElementSelected signal coming from new chain dialog.
void OnBtnSaveClicked()
Save current settings in main session viewer.
void OnBrowseEventList()
Browse event list.
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:151
TSessionViewer * fViewer
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...
TH1 * h
Definition: legend2.C:5
void ClearFiles()
Clear content of the list view.
TGTextButton * fOkButton
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for new query dialog.
TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0)
Create a new chain dialog box.
virtual ~TUploadDataSetDlg()
Delete chain dialog.
TGTextEntry * fDestinationURL
TGTextEntry * fTxtEventList
Basic string class.
Definition: TString.h:129
TGTextButton * fBtnSubmit
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual ~TNewQueryDlg()
Delete query dialog.
void OnOverwriteDataset(Bool_t on)
Notification of Overwrite Dataset check button.
TGTextButton * fBtnSave
TGTextButton * fUploadButton
TGListView * fListView
virtual void CloseWindow()
Close file dialog.
Sequenceable collection abstract base class.
TGCompositeFrame * fFrmMore
#define ClassDef(name, id)
Definition: Rtypes.h:297
void OnBtnSubmitClicked()
Save and submit query description.
void SettingsChanged()
Settings have changed, update GUI accordingly.
TGCheckButton * fOverwriteDSet
void OnAppendFiles(Bool_t on)
Notification of Append Files check button.
TSeqCollection * fChains
TGLVContainer * fLVContainer
TGTextButton * fCloseDlgButton
TGTextButton * fClearButton
virtual void DisplayDirectory(const TString &fname)
Display content of directory.
TUploadDataSetDlg(TSessionViewer *gui, Int_t w, Int_t h)
Create a Upload DataSet dialog box. Used to create and upload a dataset.
void UpdateList()
Update Memory list view.
void CloseWindow()
Called when window is closed via the window manager.
TGCheckButton * fOverwriteFiles
A doubly linked list.
Definition: TList.h:43
TGTextButton * fBtnClose
TSessionViewer * fViewer
void AddFiles(const char *fileName)
Add File name(s) from the file location URL to the list view.
TGCheckButton * fAppendFiles
TGTextEntry * fTxtOptions
TObject * fChain
TGListView * fListView
void OnNewQueryMore()
Show/hide options frame and update button text accordingly.
virtual void CloseWindow()
Close upload dataset dialog.
TGTextEntry * fTxtQueryName
void OnElementSelected(TObject *obj)
Emits OnElementSelected signal if dset is not zero.
void BrowseFiles()
Opens the TGFileDialog to allow user to select local file(s) to be added in the list view of dataset ...
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for new chain dialog.
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...
void OnBtnCloseClicked()
Close dialog.
TGTextButton * fAddButton
void UploadDataSet()
Upload the dataset to the server.
const Bool_t kFALSE
Definition: RtypesCore.h:92
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for upload dataset dialog.
long Long_t
Definition: RtypesCore.h:50
void UpdateFields(TQueryDescription *desc)
Update entry fields with query description values.
TObject * fChain
TGTextEntry * fTxtSelector
virtual ~TNewChainDlg()
Delete chain dialog.
Mother of all ROOT objects.
Definition: TObject.h:37
TGTextButton * fCancelButton
A chain is a collection of files containing TTree objects.
Definition: TChain.h:33
void OnOverwriteFiles(Bool_t on)
Notification of Overwrite Files check button.
TQueryDescription * fQuery
TGTextButton * fBrowseButton
int main(int argc, char **argv)
TGNumberEntry * fNumFirstEntry
TGNumberEntry * fNumEntries
void Build(TSessionViewer *gui)
Build the &quot;new query&quot; dialog.
virtual void OnDoubleClick(TGLVEntry *, Int_t)
Handle double click in the File container.
TGTextButton * fBtnMore