Logo ROOT   6.12/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 #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
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:151
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:125
TGTextButton * fBtnSubmit
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
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:320
TGCheckButton * fOverwriteDSet
TSeqCollection * fChains
TGLVContainer * fLVContainer
TGTextButton * fCloseDlgButton
int main(int argc, char **argv)
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:44
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
const Bool_t kFALSE
Definition: RtypesCore.h:88
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 containing TTree objects.
Definition: TChain.h:33
TQueryDescription * fQuery
TGTextButton * fBrowseButton
TGNumberEntry * fNumFirstEntry
TGNumberEntry * fNumEntries
virtual void OnDoubleClick(TGLVEntry *, Int_t)
Handle double click in the File container.
TGTextButton * fBtnMore