Logo ROOT   6.08/07
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 #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);
66  void OnElementClicked(TGLVEntry* entry, Int_t btn);
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();
114  void OnElementSelected(TObject *obj);
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
TGTextBuffer * fNameBuf
TGTextEntry * fTxtChain
TGTextButton * fRemoveButton
TGCompositeFrame * fFrmNewQuery
TGTextEntry * fLocationURL
TGTextEntry * fDSetName
This class implements a data set to be used for PROOF processing.
Definition: TDSet.h:153
TSessionViewer * fViewer
TH1 * h
Definition: legend2.C:5
TGTextButton * fOkButton
TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0)
Create a new chain dialog box.
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
const Bool_t kFALSE
Definition: Rtypes.h:92
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
TGCheckButton * fOverwriteDSet
TSeqCollection * fChains
TGLVContainer * fLVContainer
TGTextButton * fCloseDlgButton
TGTextButton * fClearButton
virtual void DisplayDirectory(const TString &fname)
Display content of directory.
void UpdateList()
Update Memory list view.
TGCheckButton * fOverwriteFiles
A doubly linked list.
Definition: TList.h:47
TGTextButton * fBtnClose
TSessionViewer * fViewer
TGCheckButton * fAppendFiles
TGTextEntry * fTxtOptions
TObject * fChain
TGListView * fListView
TGTextEntry * fTxtQueryName
void OnElementSelected(TObject *obj)
Emits OnElementSelected signal if dset is not zero.
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...
TGTextButton * fAddButton
long Long_t
Definition: RtypesCore.h:50
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 containg TTree objects.
Definition: TChain.h:35
TQueryDescription * fQuery
TGTextButton * fBrowseButton
int main(int argc, char **argv)
TGNumberEntry * fNumFirstEntry
TGNumberEntry * fNumEntries
virtual void OnDoubleClick(TGLVEntry *, Int_t)
Handle double click in the File container.
TGTextButton * fBtnMore