KaliVeda
Toolkit for HIC analysis
KVDataAnalysisLauncher.h
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 
32 class KVGFileList : public TGTransientFrame {
33  enum ElementId {
39  };
40 
41 protected:
50 
51  virtual void Init(const TString& fileList, const TString& title);
52  void InitFileList();
53 
54 public:
55  KVGFileList(const TString& st, const TString& titre = "File list",
56  const TGWindow* p = 0, const TGWindow* main = 0, Bool_t ok = kTRUE);
57  ~KVGFileList();
58 
59  void AddFile();
60  void RemoveFiles();
61  void RemoveAllFiles();
62  void Done();
63  virtual TString GetFileFromDialog();
64  virtual Bool_t CanAdd(const TString& s);
65 
67 };
68 
76 class KVGDirectoryList : public KVGFileList {
77 
78 protected:
79  void Init(const TString& fileList, const TString& title) override;
80 public:
81  KVGDirectoryList(const TString& st, const TString& titre = "File list",
82  const TGWindow* p = 0, const TGWindow* main = 0, Bool_t ok = kTRUE);
83 
84  TString GetFileFromDialog(void) override;
85  Bool_t CanAdd(const TString& s) override;
86 
88 };
89 
100 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
101  void RemoveAll(TGComboBox* box) override;
102  void RemoveAll(TGListBox* box) override;
103 #endif
104  enum ElementId {
114  B_Quit
115  };
116 
118 protected:
122  void SetResource(const TString& name, const TString& value);
123  TString GetResource(const TString& name, const TString& defaultvalue = "");
124  void BuildResourceName(const TString& name, TString&, TString&);
125 
128 
140 
153 
160 
162  void FillListOfUserClasses();
163  void SetUserClassList();
164  void SetUserClass(const Char_t*);
166  void DisableUserClassList();
167  void EnableUserClassList();
168  void GenerateNewUserClass();
170 
173 
174 public:
175  TString GetSavedResource(const TString& name, const TString& defaultvalue = "");
176  KVDataAnalysisLauncher(const TGWindow* p = 0, UInt_t w = 200, UInt_t h = 400);
178 
179  virtual void Exit(void)
180  {
183  }
184  void SetRepositoryList(void);
186  void SetDataSetList(const TString& repository);
187  void SelectedDataSet(Int_t);
188  void SetTaskList(const TString& s);
189  void SetSystemList(Int_t s);
190  void SetRunsList();
191  void SelectedUserClass(Int_t);
192  void UserClassSelected(const TString&);
193  void SelectAll(void);
194  void DeselectAll(void);
195  void Process(void);
196  void EnterRunlist(void);
197 
198  void SystemSelectionChanged();
199 
200  TString GetRepository(void);
201  TString GetDataSet(void);
202  TString GetTask(void);
203  TString GetSystem(void);
204  TString GetRuns(void);
205 
206  void SetRepository(const TString& r = "");
207  void SetDataSet(const TString& ds = "");
208  void SetTask(const TString& t = "");
209  void SetSystem(const TString& s = "");
210  void SetRuns(const TString& s = "");
211 
213  {
214  return withBatch->IsDown();
215  }
216  void SetBatch();
218 
219  void SetUserLibraries(void);
220  void SetUserIncludes(void);
221 
222  Bool_t WarningBox(const char* title = "Warning", const char* msg = "Warning", Bool_t confirm = kFALSE);
225  void EditUserClassFiles();
226 
228  void DoStageSelection();
229  void UpdateAvailableRuns();
230 
231  ClassDefOverride(KVDataAnalysisLauncher, 0) //Graphical interface for launching analysis tasks: KaliVedaGUI
232 };
233 
234 #endif
int Int_t
unsigned int UInt_t
bool Bool_t
char Char_t
constexpr Bool_t kTRUE
#define ClassDef(name, id)
#define ClassDefOverride(name, id)
R__EXTERN TApplication * gApplication
winID h TVirtualViewer3D TVirtualGLPainter p
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:51
GUI for running data analysis tasks.
KVList ResourceNames
used by Get/SetResource
UInt_t fMainGuiHeight
heigth of main window in pixels
TString GetUserClass()
Returns currently selected user class name.
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.
void SetRepositoryList(void)
Sets the list of all possible repositories in the repository combo box.
void DeselectAll(void)
Deselect all runs currently in the displayed list of runs.
void SetSystem(const TString &s="")
void Process(void)
Run the analysis task.
void SetTaskList(const TString &s)
void SetDataSet(const TString &ds="")
void SetUserClass(const Char_t *)
void UpdateAvailableRuns()
Update available runs for current selected task (=datatype)
Int_t NbResNames
number of names in list
void DisableUserClassList()
Remove all entries from user class combo box & disable text entry.
void SetUserIncludes(void)
Set the User's includes.
void SetTask(const TString &t="")
TString GetResource(const TString &name, const TString &defaultvalue="")
TString SystemBatchName()
Get the system name for the batch name.
void SetDataSetList(const TString &repository)
Sets the list of all available data sets in the data sets combo box.
void BuildResourceName(const TString &name, TString &, TString &)
void UserClassSelected(const TString &)
void ClearListOfSelectedRuns()
Empty displayed list of selected runs.
TString GetSavedResource(const TString &name, const TString &defaultvalue="")
Bool_t WarningBox(const char *title="Warning", const char *msg="Warning", Bool_t confirm=kFALSE)
void SelectAll(void)
Select all runs currently in the displayed list of runs.
KVDataSetAnalyser * GetDataAnalyser(KVDataAnalysisTask *task=0)
void SetResource(const TString &name, const TString &value)
KVDataAnalysisLauncher(const TGWindow *p=0, UInt_t w=200, UInt_t h=400)
void SetRuns(const TString &s="")
void SetUserLibraries(void)
Set the User's libraries.
TEnv * GUIenv
Declaration des boutons de la fenetre principale.
UInt_t fMainGuiWidth
width of main window in pixels
void SetRepository(const TString &r="")
Define and manage data analysis tasks.
Pilots user analysis of experimental data.
Directory dialogue box for KVDataAnalysisLauncher.
void Init(const TString &fileList, const TString &title) override
init window
KVGDirectoryList(const TString &st, const TString &titre="File list", const TGWindow *p=0, const TGWindow *main=0, Bool_t ok=kTRUE)
Createur.
TString GetFileFromDialog(void) override
Gets the file name from a TGFileDialog.
Bool_t CanAdd(const TString &s) override
tells whether the file in ths string fn can be added to the list box
File dialogue box for KVDataAnalysisLauncher.
KVGFileList(const TString &st, const TString &titre="File list", const TGWindow *p=0, const TGWindow *main=0, Bool_t ok=kTRUE)
Createur.
TGTextEntry * teFileName
void RemoveFiles()
Remove all the selected files from the TGListBox.
TGTextButton * boutRem
~KVGFileList()
Destructeur.
virtual TString GetFileFromDialog()
Gets the file name from a TGFileDialog.
void Done()
build the file list string from the content of the TGListBox
virtual void Init(const TString &fileList, const TString &title)
Init window.
TGTextButton * boutAllRem
void RemoveAllFiles()
Remove all the files from the TGListBox.
TGTextButton * boutAdd
virtual Bool_t CanAdd(const TString &s)
tells whether the file in ths string fn can be added to the list box
TGListBox * lbFileList
Enhanced version of ROOT TGListView widget.
Definition: KVListView.h:146
Extended TList class which owns its objects by default.
Definition: KVList.h:22
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
Extended TList class which does not own its objects by default.
Definition: KVUnownedList.h:20
virtual void Terminate(Int_t status=0)
void SetReturnFromRun(Bool_t ret)
virtual Bool_t IsDown() const
virtual void RemoveAll()
List of runfiles specified by run number and file index ,.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
int main(int argc, char **argv)