KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVDataAnalysisLauncher.h
Go to the documentation of this file.
1 #ifndef KVDataAnalysisLauncher_h
2 #define KVDataAnalysisLauncher_h
3 
4 #include "TROOT.h"
5 #include "TSystem.h"
6 #include "TGClient.h"
7 #include "TGButton.h"
8 #include "TGTextEntry.h"
9 #include "TGComboBox.h"
10 #include "TGSlider.h"
11 #include "TGListBox.h"
12 #include "TGNumberEntry.h"
13 #include "TSortedList.h"
14 #include "TGLabel.h"
15 #include "TGTab.h"
16 #include "TEnv.h"
17 #include "TApplication.h"
18 
19 
20 #include "KVDBSystem.h"
21 #include "KVNumberList.h"
22 #include "KVDataSetAnalyser.h"
23 #include "KVListView.h"
24 #include "KVConfig.h"
25 
31 class KVGFileList : public TGTransientFrame {
32  enum ElementId {
38  };
39 
40 protected:
49 
50  virtual void Init(TString& fileList, const Char_t* title);
51  virtual void InitFileList();
52 
53 public:
54  KVGFileList(TString& st, const Char_t* titre = "File list",
55  const TGWindow* p = 0, const TGWindow* main = 0, Bool_t ok = kTRUE);
56  ~KVGFileList();
57 
58  virtual void AddFile(void);
59  virtual void RemoveFiles(void);
60  virtual void RemoveAllFiles(void);
61  virtual void Done(void);
62  virtual Char_t* GetFileFromDialog(void);
63  virtual Bool_t CanAdd(const Char_t* s);
64 
66 };
67 
74 class KVGDirectoryList : public KVGFileList {
75 
76 protected:
77  virtual void Init(TString& fileList, const Char_t* title);
78 public:
79  KVGDirectoryList(TString& st, const Char_t* titre = "File list",
80  const TGWindow* p = 0, const TGWindow* main = 0, Bool_t ok = kTRUE);
82 
83  virtual Char_t* GetFileFromDialog(void);
84  virtual Bool_t CanAdd(const Char_t* s);
85 
87 };
88 
98 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
99  void RemoveAll(TGComboBox* box);
100  void RemoveAll(TGListBox* box);
101 #endif
102  enum ElementId {
112  B_Quit
113  };
114 
116 protected:
120  void SetResource(const Char_t* name, const Char_t* value);
121  const Char_t* GetSavedResource(const Char_t* name, const Char_t* defaultvalue = "");
122  const Char_t* GetResource(const Char_t* name, const Char_t* defaultvalue = "");
123  void BuildResourceName(const Char_t* name, TString&, TString&);
124 
127 
137  std::unique_ptr<TList> list_of_runs;
138 
148 
155 
157  void FillListOfUserClasses();
158  void SetUserClassList();
159  void SetUserClass(const Char_t*);
160  const Char_t* GetUserClass();
161  void DisableUserClassList();
162  void EnableUserClassList();
163  void GenerateNewUserClass();
165 
168 
169 public:
170  KVDataAnalysisLauncher(const TGWindow* p = 0, UInt_t w = 200, UInt_t h = 400);
172 
173  virtual void Exit(void)
174  {
177  }
178  virtual void SetRepositoryList(void);
179  virtual void SetDataSetList(Char_t* s);
180  virtual void SetTaskList(Char_t* s);
181  virtual void SetSystemList(Int_t s);
182  virtual void SetRunsList();
183  void UserClassSelected(char*);
184  virtual void SelectAll(void);
185  virtual void DeselectAll(void);
186  virtual void Process(void);
187  virtual void EnterRunlist(void);
188 
189  void SystemSelectionChanged();
190 
191  virtual const Char_t* GetRepository(void);
192  virtual const Char_t* GetDataSet(void);
193  virtual const Char_t* GetTask(void);
194  virtual const Char_t* GetSystem(void);
195  virtual const Char_t* GetRuns(void);
196 
197  virtual void SetRepository(const Char_t* r = "");
198  virtual void SetDataSet(const Char_t* ds = "");
199  virtual void SetTask(const Char_t* t = "");
200  virtual void SetSystem(const Char_t* s = "");
201  virtual void SetRuns(const Char_t* s = "");
202 
203  virtual Bool_t IsBatch(void)
204  {
205  return withBatch->IsDown();
206  }
207  void SetBatch();
209 
210  virtual void SetUserLibraries(void);
211  virtual void SetUserIncludes(void);
212 
213  virtual Bool_t WarningBox(const char* title = "Warning", const char* msg = "Warning", Bool_t confirm = kFALSE);
216  void EditUserClassFiles();
217 
218  ClassDef(KVDataAnalysisLauncher, 0) //Graphical interface for launching analysis tasks: KaliVedaGUI
219 };
220 
221 #endif
int Int_t
unsigned int UInt_t
char Char_t
bool Bool_t
const Bool_t kTRUE
#define ClassDef(name, id)
R__EXTERN TApplication * gApplication
Database class used to store information on different colliding systems studied during an experiment.
Definition: KVDBSystem.h:51
GUI for running data analysis tasks.
virtual const Char_t * GetDataSet(void)
UInt_t fMainGuiHeight
heigth of main window in pixels
virtual const Char_t * GetRepository(void)
TList * UserClassNames
list of user classes present in working directory
void SetUserClassList()
Sets the list of all available user classes in the drop down list.
const Char_t * GetSavedResource(const Char_t *name, const Char_t *defaultvalue="")
virtual void SetRepositoryList(void)
Sets the list of all possible repositories in the repository combo box.
virtual void DeselectAll(void)
Deselect all runs currently in the displayed list of runs.
virtual void Process(void)
Run the analysis task.
void SetUserClass(const Char_t *)
Int_t NbResNames
number of names in list
void DisableUserClassList()
Remove all entries from user class combo box & disable text entry.
TList * ResourceNames
used by Get/SetResource
virtual void SetUserIncludes(void)
Set the User's includes.
TString SystemBatchName()
Get the system name for the batch name.
virtual void SetRepository(const Char_t *r="")
virtual void SetRuns(const Char_t *s="")
virtual void SetRunsList()
Sets the list of all available runs in the runs list box.
const Char_t * GetResource(const Char_t *name, const Char_t *defaultvalue="")
void ClearListOfSelectedRuns()
Empty displayed list of selected runs.
virtual void SetSystemList(Int_t s)
void SetResource(const Char_t *name, const Char_t *value)
std::unique_ptr< TList > list_of_runs
virtual Bool_t WarningBox(const char *title="Warning", const char *msg="Warning", Bool_t confirm=kFALSE)
virtual void SelectAll(void)
Select all runs currently in the displayed list of runs.
virtual const Char_t * GetRuns(void)
void BuildResourceName(const Char_t *name, TString &, TString &)
KVDataSetAnalyser * GetDataAnalyser(KVDataAnalysisTask *task=0)
virtual const Char_t * GetTask(void)
virtual Bool_t IsBatch(void)
KVDataAnalysisLauncher(const TGWindow *p=0, UInt_t w=200, UInt_t h=400)
const Char_t * GetUserClass()
Returns currently selected user class name.
virtual void SetDataSet(const Char_t *ds="")
virtual void SetUserLibraries(void)
Set the User's libraries.
TEnv * GUIenv
Declaration des boutons de la fenetre principale.
virtual const Char_t * GetSystem(void)
virtual void SetSystem(const Char_t *s="")
UInt_t fMainGuiWidth
width of main window in pixels
virtual void SetDataSetList(Char_t *s)
Sets the list of all available data sets in the data sets combo box.
virtual void SetTaskList(Char_t *s)
virtual void SetTask(const Char_t *t="")
Define and manage data analysis tasks.
Pilots user analysis of experimental data.
Directory dialogue box for KVDataAnalysisLauncher.
virtual void Init(TString &fileList, const Char_t *title)
init window
virtual Char_t * GetFileFromDialog(void)
Gets the file name from a TGFileDialog.
virtual Bool_t CanAdd(const Char_t *s)
tells whether the file in ths string fn can be added to the list box
KVGDirectoryList(TString &st, const Char_t *titre="File list", const TGWindow *p=0, const TGWindow *main=0, Bool_t ok=kTRUE)
Createur.
File dialogue box for KVDataAnalysisLauncher.
TGTextEntry * teFileName
TGTextButton * boutRem
virtual void Done(void)
build the file list string from the content of the TGListBox
~KVGFileList()
Destructeur.
virtual Bool_t CanAdd(const Char_t *s)
tells whether the file in ths string fn can be added to the list box
virtual void AddFile(void)
TString * fileListString
virtual void Init(TString &fileList, const Char_t *title)
Init window.
virtual Char_t * GetFileFromDialog(void)
Gets the file name from a TGFileDialog.
TGTextButton * boutAllRem
virtual void RemoveFiles(void)
Remove all the selected files from the TGListBox.
TGTextButton * boutAdd
KVGFileList(TString &st, const Char_t *titre="File list", const TGWindow *p=0, const TGWindow *main=0, Bool_t ok=kTRUE)
Createur.
virtual void RemoveAllFiles(void)
Remove all the files from the TGListBox.
TGListBox * lbFileList
virtual void InitFileList()
Enhanced version of ROOT TGListView widget.
Definition: KVListView.h:145
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
virtual void Terminate(Int_t status=0)
void SetReturnFromRun(Bool_t ret)
virtual Bool_t IsDown() const
virtual void RemoveAll()
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
int main(int argc, char **argv)
const long double s
Definition: KVUnits.h:94