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(TString& fileList, const Char_t* title);
52  virtual void InitFileList();
53 
54 public:
55  KVGFileList(TString& st, const Char_t* titre = "File list",
56  const TGWindow* p = 0, const TGWindow* main = 0, Bool_t ok = kTRUE);
57  ~KVGFileList();
58 
59  virtual void AddFile(void);
60  virtual void RemoveFiles(void);
61  virtual void RemoveAllFiles(void);
62  virtual void Done(void);
63  virtual Char_t* GetFileFromDialog(void);
64  virtual Bool_t CanAdd(const Char_t* s);
65 
67 };
68 
76 class KVGDirectoryList : public KVGFileList {
77 
78 protected:
79  void Init(TString& fileList, const Char_t* title) override;
80 public:
81  KVGDirectoryList(TString& st, const Char_t* titre = "File list",
82  const TGWindow* p = 0, const TGWindow* main = 0, Bool_t ok = kTRUE);
84 
85  Char_t* GetFileFromDialog(void) override;
86  Bool_t CanAdd(const Char_t* s) override;
87 
89 };
90 
101 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
102  void RemoveAll(TGComboBox* box) override;
103  void RemoveAll(TGListBox* box) override;
104 #endif
105  enum ElementId {
115  B_Quit
116  };
117 
119 protected:
123  void SetResource(const Char_t* name, const Char_t* value);
124  const Char_t* GetSavedResource(const Char_t* name, const Char_t* defaultvalue = "");
125  const Char_t* GetResource(const Char_t* name, const Char_t* defaultvalue = "");
126  void BuildResourceName(const Char_t* name, TString&, TString&);
127 
128  run_index_list listOfRuns;
129  run_index_list listOfSystemRuns;
130 
140  std::unique_ptr<TList> list_of_runs;
141 
151 
158 
160  void FillListOfUserClasses();
161  void SetUserClassList();
162  void SetUserClass(const Char_t*);
163  const Char_t* GetUserClass();
164  void DisableUserClassList();
165  void EnableUserClassList();
166  void GenerateNewUserClass();
168 
171 
172 public:
173  KVDataAnalysisLauncher(const TGWindow* p = 0, UInt_t w = 200, UInt_t h = 400);
175 
176  virtual void Exit(void)
177  {
180  }
181  void SetRepositoryList(void);
182  void SetDataSetList(Char_t* s);
183  void SetTaskList(Char_t* s);
184  void SetSystemList(Int_t s);
185  void SetRunsList();
186  void UserClassSelected(char*);
187  void SelectAll(void);
188  void DeselectAll(void);
189  void Process(void);
190  void EnterRunlist(void);
191 
192  void SystemSelectionChanged();
193 
194  const Char_t* GetRepository(void);
195  const Char_t* GetDataSet(void);
196  const Char_t* GetTask(void);
197  const Char_t* GetSystem(void);
198  TString GetRuns(void);
199 
200  void SetRepository(const Char_t* r = "");
201  void SetDataSet(const Char_t* ds = "");
202  void SetTask(const Char_t* t = "");
203  void SetSystem(const Char_t* s = "");
204  void SetRuns(const Char_t* s = "");
205 
207  {
208  return withBatch->IsDown();
209  }
210  void SetBatch();
212 
213  void SetUserLibraries(void);
214  void SetUserIncludes(void);
215 
216  Bool_t WarningBox(const char* title = "Warning", const char* msg = "Warning", Bool_t confirm = kFALSE);
219  void EditUserClassFiles();
220 
221  ClassDefOverride(KVDataAnalysisLauncher, 0) //Graphical interface for launching analysis tasks: KaliVedaGUI
222 };
223 
224 #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:52
GUI for running data analysis tasks.
UInt_t fMainGuiHeight
heigth of main window in pixels
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="")
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 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
void SetUserIncludes(void)
Set the User's includes.
TString SystemBatchName()
Get the system name for the batch name.
void SetRepository(const Char_t *r="")
void SetRuns(const Char_t *s="")
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.
void SetResource(const Char_t *name, const Char_t *value)
std::unique_ptr< TList > list_of_runs
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.
void BuildResourceName(const Char_t *name, TString &, TString &)
KVDataSetAnalyser * GetDataAnalyser(KVDataAnalysisTask *task=0)
KVDataAnalysisLauncher(const TGWindow *p=0, UInt_t w=200, UInt_t h=400)
const Char_t * GetUserClass()
Returns currently selected user class name.
void SetDataSet(const Char_t *ds="")
void SetUserLibraries(void)
Set the User's libraries.
TEnv * GUIenv
Declaration des boutons de la fenetre principale.
void SetSystem(const Char_t *s="")
UInt_t fMainGuiWidth
width of main window in pixels
void SetDataSetList(Char_t *s)
Sets the list of all available data sets in the data sets combo box.
void SetTask(const Char_t *t="")
Define and manage data analysis tasks.
Pilots user analysis of experimental data.
Directory dialogue box for KVDataAnalysisLauncher.
Bool_t CanAdd(const Char_t *s) override
tells whether the file in ths string fn can be added to the list box
Char_t * GetFileFromDialog(void) override
Gets the file name from a TGFileDialog.
KVGDirectoryList(TString &st, const Char_t *titre="File list", const TGWindow *p=0, const TGWindow *main=0, Bool_t ok=kTRUE)
Createur.
void Init(TString &fileList, const Char_t *title) override
init window
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:146
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
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)