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 
143 
156 
163 
165  void FillListOfUserClasses();
166  void SetUserClassList();
167  void SetUserClass(const Char_t*);
169  void DisableUserClassList();
170  void EnableUserClassList();
171  void GenerateNewUserClass();
173 
176 
177 public:
178  TString GetSavedResource(const TString& name, const TString& defaultvalue = "");
179  KVDataAnalysisLauncher(const TGWindow* p = 0, UInt_t w = 200, UInt_t h = 400);
181 
182  virtual void Exit(void)
183  {
186  }
187  void SetRepositoryList(void);
189  void SetDataSetList(const TString& repository);
190  void SelectedDataSet(Int_t);
191  void SetTaskList(const TString& s);
192  void SetSystemList(Int_t s);
193  void SetRunsList();
194  void SelectedUserClass(Int_t);
195  void UserClassSelected(const TString&);
196  void SelectAll(void);
197  void DeselectAll(void);
198  void Process(void);
199  void EnterRunlist(void);
200 
201  void SystemSelectionChanged();
202 
203  TString GetRepository(void);
204  TString GetDataSet(void);
205  TString GetTask(void);
206  TString GetSystem(void);
207  TString GetRuns(void);
208 
209  void SetRepository(const TString& r = "");
210  void SetDataSet(const TString& ds = "");
211  void SetTask(const TString& t = "");
212  void SetSystem(const TString& s = "");
213  void SetRuns(const TString& s = "");
214 
216  {
217  return withBatch->IsDown();
218  }
219  void SetBatch();
221 
222  void SetUserLibraries(void);
223  void SetUserIncludes(void);
224 
225  Bool_t WarningBox(const char* title = "Warning", const char* msg = "Warning", Bool_t confirm = kFALSE);
228  void EditUserClassFiles();
229 
231  void DoStageSelection();
232  void UpdateAvailableRuns();
233 
234  ClassDefOverride(KVDataAnalysisLauncher, 0) //Graphical interface for launching analysis tasks: KaliVedaGUI
235 };
236 
237 #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.
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:146
Base class to describe database of an experiment ,,.
Definition: KVExpDB.h:61
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)