60 "ROOT files",
"*.root",
66 "C files",
"*.[C|c]*",
67 "ROOT files",
"*.root",
85 if (!p || !main)
return;
100 this,
"OnElementClicked(TGLVEntry* ,Int_t)");
116 AddFrame(
new TGLabel(
this,
"Double-click on the macro to be executed to create a new Chain:"),
125 gClient->GetColorByName(
"white",white);
142 0, 0, ax, ay, wdummy);
143 Move(ax + 200, ay + 35);
184 Emit(
"OnElementSelected(TObject *)", (
Long_t)obj);
202 ((
TDSet *)fChain)->GetObjName());
221 while ((obj = (
TObject *)next())) {
226 ((
TChain *)obj)->SetTitle(
"TChain");
267 if (
name.Contains(
".C")) {
360 if (editmode && query)
362 else if (!editmode) {
382 0, 0, ax, ay, wdummy);
430 btnTmp->
Connect(
"Clicked()",
"TNewQueryDlg",
this,
"OnBrowseChain()");
441 btnTmp->
Connect(
"Clicked()",
"TNewQueryDlg",
this,
"OnBrowseSelector()");
446 fBtnMore->
Connect(
"Clicked()",
"TNewQueryDlg",
this,
"OnNewQueryMore()");
490 btnTmp->
Connect(
"Clicked()",
"TNewQueryDlg",
this,
"OnBrowseEventList()");
501 "SettingsChanged()");
503 "SettingsChanged()");
505 "SettingsChanged()");
507 "SettingsChanged()");
509 "SettingsChanged()");
511 "SettingsChanged()");
513 "SettingsChanged()");
533 fBtnSave->
Connect(
"Clicked()",
"TNewQueryDlg",
this,
"OnBtnSaveClicked()");
537 fBtnClose->
Connect(
"Clicked()",
"TNewQueryDlg",
this,
"OnBtnCloseClicked()");
571 dlg->
Connect(
"OnElementSelected(TObject *)",
"TNewQueryDlg",
572 this,
"OnElementSelected(TObject *)");
653 int e = 1, j = 0, idx = 0;
655 for (
int i=strlen(name)-1;i>0;i--) {
656 if (isdigit(name[i])) {
657 idx += (name[i]-
'0') * e;
718 "Do you wish to SAVE changes ?", 0,
724 if (result ==
kMBNo) {
937 "OnOverwriteDataset(Bool_t)");
939 "OnOverwriteFiles(Bool_t)");
941 "OnAppendFiles(Bool_t)");
993 0, 0, ax, ay, wdummy);
994 Move(ax + 250, ay + 200);
1077 if (strlen(fileName) < 5)
1079 if (strstr(fileName,
"*.")) {
1096 gClient->GetPicture(
"rootdb_t.xpm"));
1107 gClient->GetPicture(
"rootdb_t.xpm"));
1123 TIter next(fileList);
1132 gClient->GetPicture(
"rootdb_t.xpm"));
1242 flags &= ~
TProof::kNoOverwriteDataSet;
1259 if (strlen(destination) < 2) destination = 0;
1266 datasetFiles, destination, flags, skippedFiles);
1268 if (ret == TProof::kDataSetExists) {
1272 TString::Format(
"The dataset \"%s\" already exists on the cluster ! Overwrite ?",
1277 datasetFiles, destination,
1284 datasetFiles, destination,
1294 "Failed uploading dataset/files to the cluster",
1302 if (skippedFiles->
GetSize()) {
1303 TIter nexts(skippedFiles);
1308 TString::Format(
"The file \"%s\" already exists on the cluster ! Overwrite ?",
1313 skippedFiles, destination,
1325 "Files have been successfully uploaded to the cluster",
1339 obj->GetFirstUrl()->GetUrl(), destination,
1350 "Files have been successfully uploaded to the cluster",
1355 skippedFiles->
Clear();
1359 "Files have been successfully uploaded to the cluster",
virtual void HideFrame(TGFrame *f)
Hide sub frame.
TGLVContainer * fLVContainer
void OnBtnSubmit()
Submit query.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
Process a single command line, either a C++ statement or an interpreter command starting with a "...
TGFileContainer * fContents
virtual UInt_t GetOptions() const
TGListTreeItem * FindChildByData(TGListTreeItem *item, void *userData)
Find child of item by userData.
TGListTree * GetSessionHierarchy() const
void Popup()
Display dialog and set focus to query name text entry.
virtual void RemoveAll()
Remove all items from the container.
virtual void AdjustHeaders()
void StopRefreshTimer()
stop refresh timer
Collectable string class.
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
TSessionQueryFrame * GetQueryFrame() const
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
TGTextEntry * fLocationURL
const TGWindow * GetRoot() const
Returns current root (i.e.
void OnElementSelected(TObject *obj)
Handle OnElementSelected signal coming from new chain dialog.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
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.
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...
static Pixel_t GetWhitePixel()
Get white pixel value.
void ClearFiles()
Clear content of the list view.
void SetHeaders(Int_t ncolumns)
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
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.
Regular expression class.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual ~TUploadDataSetDlg()
Delete chain dialog.
TGTextEntry * fDestinationURL
TGTextEntry * fTxtEventList
virtual void Associate(const TGWindow *w)
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
TGTextButton * fBtnSubmit
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual ~TNewQueryDlg()
Delete query dialog.
Bool_t GetColorByName(const char *name, Pixel_t &pixel) const
Get a color by name.
static const char * gDatasetTypes[]
void OnOverwriteDataset(Bool_t on)
Notification of Overwrite Dataset check button.
R__EXTERN TApplication * gApplication
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode for container.
virtual void Layout()
Layout list view components (container and contents of container).
TGTextButton * fUploadButton
virtual void Layout()
Layout the elements of the composite frame.
TGListTreeItem * GetSelected() const
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
TGListTreeItem * GetSessionItem() const
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
virtual void SelectAll()
Selects all text (i.e.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual void CloseWindow()
Close file dialog.
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
TGCompositeFrame * fFrmMore
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void OnBtnSubmitClicked()
Save and submit query description.
virtual Long_t GetIntNumber() const
virtual void ChangeDirectory(const char *path)
Change current directory.
virtual void SetUserData(void *, Bool_t=kFALSE)
void SettingsChanged()
Settings have changed, update GUI accordingly.
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
const TGPicture * GetQueryConPict() const
void OnListTreeClicked(TGListTreeItem *entry, Int_t btn, Int_t x, Int_t y)
Handle mouse clicks in list tree.
TGCheckButton * fOverwriteDSet
void OnAppendFiles(Bool_t on)
Notification of Append Files check button.
TGLVContainer * fLVContainer
virtual void SetFocus()
Set focus to this text entry.
TGCompositeFrame(const TGCompositeFrame &)
TString & Append(const char *cs)
TGTextButton * fCloseDlgButton
int main(int argc, char **argv)
void WriteConfiguration(const char *filename=0)
Save actual configuration in config file "filename".
virtual TList * GetList() const
TGTextButton * fClearButton
Int_t UploadDataSet(const char *, TList *, const char *=0, Int_t=0, TList *=0)
*** This function is deprecated and will disappear in future versions *** *** It is just a wrapper ar...
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.
virtual void * FindItem(const TString &name, Bool_t direction=kTRUE, Bool_t caseSensitive=kTRUE, Bool_t subString=kFALSE)
void UpdateList()
Update Memory list view.
void CloseWindow()
Called when window is closed via the window manager.
TGCheckButton * fOverwriteFiles
virtual void RemoveItem(TGFrame *item)
Remove item from container.
R__ALWAYS_INLINE Bool_t IsZombie() const
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
TSessionDescription * GetActDesc() const
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void SetUserData(void *userData)
virtual void Associate(const TGWindow *w)
Make w the window that will receive the generated messages.
const TString & GetString() const
TSessionFrame * GetSessionFrame() const
void AddFiles(const char *fileName)
Add File name(s) from the file location URL to the list view.
TGCheckButton * fAppendFiles
TGTextEntry * fTxtOptions
R__EXTERN TSystem * gSystem
Bool_t fMultipleSelection
void * GetUserData() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void SetMinWidth(UInt_t w)
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
const char * GetDirectory() const
virtual TGFileItem * AddFile(const char *name, const TGPicture *pic=0, const TGPicture *lpic=0)
Add file in container.
char * Form(const char *fmt,...)
void ClearHighlighted()
Un highlight items.
void OnNewQueryMore()
Show/hide options frame and update button text accordingly.
virtual void CloseWindow()
Close upload dataset dialog.
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
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 void AddItem(TGLVEntry *item)
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.
virtual void SetIntNumber(Long_t val)
virtual const char * GetTitle() const
Returns title of object.
TGTextButton * fAddButton
void UploadDataSet()
Upload the dataset to the server.
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual void SetText(TGHotString *new_label)
Set new button text.
virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Process messages for upload dataset dialog.
const char * GetText() const
TString & Remove(Ssiz_t pos)
virtual UInt_t GetDefaultHeight() const
void UpdateFields(TQueryDescription *desc)
Update entry fields with query description values.
static const char * gFileTypes[]
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void SetPictures(const TGPicture *bigpic=0, const TGPicture *smallpic=0)
change pictures
This class controls a Parallel ROOT Facility, PROOF, cluster.
static constexpr double s
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
TGTextEntry * fTxtSelector
virtual ~TNewChainDlg()
Delete chain dialog.
Mother of all ROOT objects.
virtual const char * GetTitle() const
Returns title of object.
virtual void SetFilter(const char *filter)
Set file selection filter.
virtual void Add(TObject *obj)
TGTextButton * fCancelButton
A chain is a collection of files containing TTree objects.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void DisplayDirectory()
Display the contents of the current directory in the container.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
void OnOverwriteFiles(Bool_t on)
Notification of Overwrite Files check button.
virtual TGFrame * GetLastActive() const
Class describing a generic file including meta information.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
void SetHeader(const char *s, Int_t hmode, Int_t cmode, Int_t idx)
TQueryDescription * fQuery
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
void HighlightItem(TGListTreeItem *item)
Highlight item.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void DeleteWindow()
Delete window.
ESessionQueryStatus fStatus
TGTextButton * fBrowseButton
void SetSelected(TGListTreeItem *item)
void UpdateListOfDataSets()
Update list of dataset present on the cluster.
void RenameItem(TGListTreeItem *item, const char *string)
Rename item in list tree.
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.
const char * Data() const