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// //
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
27class TList;
28class TSeqCollection;
29class TChain;
30class TDSet;
31class TGTextEntry;
32class TGTextButton;
33class TGTextBuffer;
34class TGCheckButton;
35class TGLabel;
36class TGListView;
37class TGPicture;
38class TGFileContainer;
39
40//////////////////////////////////////////////////////////////////////////
41// New Chain Dialog
42//////////////////////////////////////////////////////////////////////////
43
45
46private:
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
57public:
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
79private:
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
100public:
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();
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
128private:
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
147public:
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
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
long Long_t
Definition: RtypesCore.h:50
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:326
A chain is a collection of files containing TTree objects.
Definition: TChain.h:34
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:153
A doubly linked list.
Definition: TList.h:44
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
TSeqCollection * fChains
TGLVContainer * fLVContainer
void UpdateList()
Update Memory list view.
TGFileContainer * fContents
virtual void DisplayDirectory(const TString &fname)
Display content of directory.
TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0)
Create a new chain dialog box.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for new chain dialog.
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.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for new query dialog.
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
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,...
TGTextEntry * fTxtQueryName
TGTextButton * fBtnSave
void OnBrowseChain()
Call new chain dialog.
TGNumberEntry * fNumEntries
void Build(TSessionViewer *gui)
Build the "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:37
Sequenceable collection abstract base class.
Basic string class.
Definition: TString.h:131
void ClearFiles()
Clear content of the list view.
TUploadDataSetDlg(TSessionViewer *gui, Int_t w, Int_t h)
Create a Upload DataSet dialog box. Used to create and upload a dataset.
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.
void OnOverwriteDataset(Bool_t on)
Notification of Overwrite Dataset check button.
TGLVContainer * fLVContainer
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for upload dataset dialog.
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
int main(int argc, char **argv)