ROOT  6.07/01
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 #ifndef ROOT_TSessionViewer
26 #include "TSessionViewer.h"
27 #endif
28 
29 class TList;
30 class TSeqCollection;
31 class TChain;
32 class TDSet;
33 class TGTextEntry;
34 class TGTextButton;
35 class TGTextBuffer;
36 class TGCheckButton;
37 class TGLabel;
38 class TGListView;
39 class TGPicture;
40 class TGFileContainer;
41 
42 //////////////////////////////////////////////////////////////////////////
43 // New Chain Dialog
44 //////////////////////////////////////////////////////////////////////////
45 
47 
48 private:
49  TGFileContainer *fContents; // macro files container
50  TGListView *fListView; // memory objects list view
51  TGLVContainer *fLVContainer; // and its container
52  TGTextBuffer *fNameBuf; // buffer for dataset name
53  TGTextEntry *fName; // dataset name text entry
54  TGTextButton *fOkButton; // ok button
55  TGTextButton *fCancelButton; // cancel button
56  TSeqCollection *fChains; // collection of datasets
57  TObject *fChain; // actual TDSet or TChain
58 
59 public:
60  TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0);
61  virtual ~TNewChainDlg();
62 
63  void UpdateList();
64  virtual void OnDoubleClick(TGLVEntry*,Int_t);
65  virtual void DisplayDirectory(const TString &fname);
67  void OnElementSelected(TObject *obj); //*SIGNAL*
68 
69  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
70  virtual void CloseWindow();
71 
72  ClassDef(TNewChainDlg, 0) // New chain dialog
73 };
74 
75 //////////////////////////////////////////////////////////////////////////
76 // New Query Dialog
77 //////////////////////////////////////////////////////////////////////////
78 
80 
81 private:
82  Bool_t fEditMode; // kTRUE if used to edit existing query
83  Bool_t fModified; // kTRUE if settings have changed
84  TGCompositeFrame *fFrmNewQuery; // top (main) frame
85  TGCompositeFrame *fFrmMore; // options frame
86  TGTextButton *fBtnMore; // "more >>" / "less <<" button
87  TGTextButton *fBtnClose; // close button
88  TGTextButton *fBtnSave; // save button
89  TGTextButton *fBtnSubmit; // save & submit button
90 
91  TGTextEntry *fTxtQueryName; // query name text entry
92  TGTextEntry *fTxtChain; // chain name text entry
93  TGTextEntry *fTxtSelector; // selector name text entry
94  TGTextEntry *fTxtOptions; // options text entry
95  TGNumberEntry *fNumEntries; // number of entries selector
96  TGNumberEntry *fNumFirstEntry; // first entry selector
97  TGTextEntry *fTxtEventList; // event list text entry
98  TSessionViewer *fViewer; // pointer on main viewer
99  TQueryDescription *fQuery; // query description class
100  TObject *fChain; // actual TChain
101 
102 public:
103  TNewQueryDlg(TSessionViewer *gui, Int_t Width, Int_t Height,
104  TQueryDescription *query = 0, Bool_t editmode = kFALSE);
105  virtual ~TNewQueryDlg();
106  void Build(TSessionViewer *gui);
107  void OnNewQueryMore();
108  void OnBrowseChain();
109  void OnBrowseSelector();
110  void OnBrowseEventList();
111  void OnBtnSaveClicked();
112  void OnBtnCloseClicked();
113  void OnBtnSubmitClicked();
115  void CloseWindow();
116  void Popup();
117  void SettingsChanged();
118  void UpdateFields(TQueryDescription *desc);
119  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
120 
121  ClassDef(TNewQueryDlg, 0) // New query dialog
122 };
123 
124 //////////////////////////////////////////////////////////////////////////
125 // Upload DataSet Dialog
126 //////////////////////////////////////////////////////////////////////////
127 
129 
130 private:
132  TList *fSkippedFiles; // List of skipped files
133  TGTextEntry *fDSetName; // dataset name text entry
134  TGTextEntry *fDestinationURL; // destination URL text entry
135  TGTextEntry *fLocationURL; // location URL text entry
136  TGListView *fListView; // dataset files list view
137  TGLVContainer *fLVContainer; // and its container
138  TGTextButton *fAddButton; // Add >> button
139  TGTextButton *fBrowseButton; // Browse... button
140  TGTextButton *fRemoveButton; // Remove button
141  TGTextButton *fClearButton; // Clear button
142  TGCheckButton *fOverwriteDSet; // overwrite DataSet
143  TGCheckButton *fOverwriteFiles; // overwrite All Files
144  TGCheckButton *fAppendFiles; // append files
145  TGTextButton *fUploadButton; // Upload button
146  TGTextButton *fCloseDlgButton; // Close Dialog button
147  TSessionViewer *fViewer; // pointer on main viewer
148 
149 public:
151  virtual ~TUploadDataSetDlg();
152 
153  virtual void CloseWindow();
154  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
155  void AddFiles(const char *fileName);
156  void AddFiles(TList *fileList);
157  void BrowseFiles();
158  void ClearFiles();
159  void RemoveFile();
160  void UploadDataSet();
161  void OnOverwriteDataset(Bool_t on);
162  void OnOverwriteFiles(Bool_t on);
163  void OnAppendFiles(Bool_t on);
164 
165  ClassDef(TUploadDataSetDlg, 0) // New query dialog
166 };
167 
168 #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:153
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:137
TGTextButton * fBtnSubmit
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual ~TNewQueryDlg()
Delete query dialog.
const Bool_t kFALSE
Definition: Rtypes.h:92
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:254
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:47
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
tuple main
Definition: hsum.py:20
TObject * fChain
TGListView * fListView
void OnNewQueryMore()
Show/hide options frame and update button text accordingly.
virtual void CloseWindow()
Close upload dataset dialog.
tuple w
Definition: qtexample.py:51
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
Long64_t entry
void UploadDataSet()
Upload the dataset to the server.
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:58
TGTextButton * fCancelButton
A chain is a collection of files containg TTree objects.
Definition: TChain.h:35
void OnOverwriteFiles(Bool_t on)
Notification of Overwrite Files check button.
TQueryDescription * fQuery
TObject * obj
TGTextButton * fBrowseButton
TGNumberEntry * fNumFirstEntry
TGNumberEntry * fNumEntries
void Build(TSessionViewer *gui)
Build the "new query" dialog.
virtual void OnDoubleClick(TGLVEntry *, Int_t)
Handle double click in the File container.
TGTextButton * fBtnMore