1 #include "KVDataAnalysisLauncher.h"
15 #include "KVDataRepositoryManager.h"
16 #include "KVDataSetRepository.h"
17 #include "KVDataSetManager.h"
18 #include "KVDataSet.h"
19 #include "KVDataAnalysisTask.h"
21 #include "KVNucleus.h"
23 #include "KVBatchSystemManager.h"
25 #include "KVInputDialog.h"
26 #include "KVBatchSystemGUI.h"
27 #include "KVBatchSystemParametersGUI.h"
28 #include <KVRunFile.h>
34 #define MAX_LENGTH_SELECTED_RUNS 40
47 void KVGFileList::Init(
const TString& fileList,
const TString& title)
51 kLHintsExpandX | kLHintsExpandY,
58 lbFileList =
new TGListBox(
this, LB_Files);
59 lbFileList->SetMultipleSelections(kTRUE);
60 lbFileList->Resize(350, 96);
61 this->AddFrame(lbFileList, eXeY);
65 this->AddFrame(teFileName, eX);
70 boutAdd->SetToolTipText(
"Add a file to the list", TTDELAY);
71 boutAdd->Connect(
"Clicked()",
78 boutRem->SetToolTipText(
"Remove the selected file from the list", TTDELAY);
79 boutRem->Connect(
"Clicked()",
86 boutAllRem->SetToolTipText(
"Remove all files from the list", TTDELAY);
87 boutAllRem->Connect(
"Clicked()",
93 this->AddFrame(cf, eX);
101 this->AddFrame(bout, eX);
105 Resize(GetDefaultSize());
106 SetWindowName(title);
109 fileListString = fileList;
128 Init(fileList, title);
156 void KVGFileList::InitFileList()
161 fileListString.
Begin(
" ");
164 while (!fileListString.
End()) {
165 auto fileName = fileListString.
Next();
166 if (fileName.Length() && !lbFileList->
FindEntry(fileName)) {
243 for (
Int_t i = 0; i < entryMax; i++) {
245 if (fileListString.
Length()) fileListString +=
" ";
246 fileListString +=
e->GetText()->GetString();
261 const char* filTypes[] = {
"Shared Object Files",
"*.so",
289 "File does not exist",
290 Form(
"The file \"%s\" does not exist. Nothing added.",
296 if (!fname.EndsWith(
".so")) {
299 "Not a share object",
300 Form(
"The file \"%s\" is not a shared object. Nothing added.",
317 void KVGDirectoryList::Init(
const TString& fileList,
const TString& title)
320 KVGFileList::Init(fileList, title);
322 boutAdd->SetText(
"Add Directory");
323 boutAdd->SetToolTipText(
"Add a directory to the list.", TTDELAY);
326 boutRem->SetText(
"Remove Directory");
327 boutRem->SetToolTipText(
"Remove the selected directories from the list.", TTDELAY);
330 boutAllRem->SetText(
"Remove All Directories");
331 boutAllRem->SetToolTipText(
"Remove all directories from the list.", TTDELAY);
332 boutAllRem->Layout();
348 Init(fileList, title);
364 const char* filTypes[] = {
"Include Files",
"*.[h,H]*",
392 "Directory does not exist",
393 Form(
"The directory \"%s\" does not exist. Nothing added.",
402 Form(
"The path \"%s\" is not a directory. Nothing added.",
432 GUIenv =
new TEnv(
".KVDataAnalysisGUIrc");
434 ResourceNames.Add(
new TNamed(
"Repository",
""));
435 ResourceNames.Add(
new TNamed(
"DataSet",
""));
436 ResourceNames.Add(
new TNamed(
"Task",
""));
437 NbResNames = ResourceNames.GetEntries();
440 UserClassNames =
new TList;
444 if (!gDataRepositoryManager) {
446 gDataRepositoryManager->
Init();
468 fMainGuiWidth =
gEnv->
GetValue(
"KaliVedaGUI.MainGUIWidth", 400);
469 fMainGuiHeight =
gEnv->
GetValue(
"KaliVedaGUI.MainGUIHeight", 600);
482 cbRepository =
new TGComboBox(cf, CB_DataRepository);
483 cbRepository->Select(-1);
484 cbRepository->Resize(150, 20);
485 cbRepository->Connect(
"Selected(Int_t)",
486 "KVDataAnalysisLauncher",
488 "SelectedRepository(Int_t)");
489 cf->
AddFrame(cbRepository, LHtopleft);
492 lab =
new TGLabel(cf,
"DATASET : ");
499 cbDataSet->Select(-1);
500 cbDataSet->Resize(150, 20);
501 cbDataSet->Connect(
"Selected(Int_t)",
502 "KVDataAnalysisLauncher",
504 "SelectedDataSet(Int_t)");
510 lab =
new TGLabel(cf,
"ANALYSIS TASK : ");
518 cbTask->Resize(350, 20);
519 cbTask->Connect(
"Selected(int)",
520 "KVDataAnalysisLauncher",
522 "SetSystemList(int)");
531 lvSystems->SetDataColumns(6);
532 lvSystems->SetMaxColumnSize(
gEnv->
GetValue(
"KaliVedaGUI.MaxColWidth", 200));
533 lvSystems->SetDataColumn(1,
"Zproj");
534 lvSystems->SetDataColumn(2,
"Ztarget");
535 lvSystems->SetDataColumn(3,
"Ebeam");
536 lvSystems->GetDataColumn(3)->SetDataFormat(
"%4.1lf");
537 lvSystems->SetDataColumn(4,
"Runs",
"GetNumberRuns");
538 lvSystems->SetDataColumn(5,
"Events");
539 lvSystems->SetDataColumn(0,
"System",
"GetName");
540 lvSystems->ActivateSortButtons();
542 lvSystems->AllowBrowse(
kFALSE);
543 lvSystems->AllowContextMenu(
kFALSE);
544 lvSystems->AllowMultipleSelection(
kTRUE);
545 lvSystems->Connect(
"SelectionChanged()",
"KVDataAnalysisLauncher",
this,
"SystemSelectionChanged()");
553 lvRuns->SetDataColumns(8);
554 lvRuns->SetMaxColumnSize(
gEnv->
GetValue(
"KaliVedaGUI.MaxColWidth", 200));
556 lvRuns->SetDataColumn(iicc++,
"Run/Index",
"GetRunIndexString");
557 lvRuns->SetDataColumn(iicc++,
"Events",
"",
kTextRight);
558 lvRuns->SetDataColumn(iicc++,
"File",
"GetName");
559 lvRuns->SetDataColumn(iicc,
"Date",
"GetFileWrittenDatime");
560 lvRuns->GetDataColumn(iicc++)->SetIsDateTime();
561 lvRuns->SetDataColumn(iicc++,
"Comments",
"",
kTextLeft);
562 lvRuns->SetDataColumn(iicc++,
"Trigger",
"");
563 lvRuns->SetDataColumn(iicc++,
"Version");
564 lvRuns->SetDataColumn(iicc++,
"User");
565 lvRuns->ActivateSortButtons();
567 lvRuns->AllowBrowse(
kFALSE);
568 lvRuns->AllowContextMenu(
kFALSE);
569 lvRuns->Connect(
"SelectionChanged()",
"KVDataAnalysisLauncher",
this,
"UpdateListOfSelectedRuns()");
577 BrefreshDir->Resize(20, 20);
578 cfSelAll->
AddFrame(BrefreshDir, eX);
579 BrefreshDir->SetToolTipText(
"Update available runfiles for this datatype");
580 BrefreshDir->Connect(
"Clicked()",
"KVDataAnalysisLauncher",
this,
"UpdateAvailableRuns()");
582 bout->
SetToolTipText(
"Select all runs for the analysis.", TTDELAY);
584 "KVDataAnalysisLauncher",
591 "KVDataAnalysisLauncher",
598 "KVDataAnalysisLauncher",
602 bStageSelect =
new TGTextButton(cfSelAll,
"Stage selection");
603 bStageSelect->SetToolTipText(
"Select all unconverted runs", TTDELAY);
608 bStageSelect->Connect(
"Clicked()",
609 "KVDataAnalysisLauncher",
611 "DoStageSelection()");
612 bStageSelect->SetEnabled(
false);
613 cfSelAll->
AddFrame(bStageSelect, eX);
617 selectedRuns =
new TGLabel(runs_and_nbevents,
" ");
623 #ifdef __WITHOUT_TGNUMBERENTRY_SETNUMSTYLE
628 #ifdef __WITHOUT_TGNUMBERENTRY_SETNUMATTR
633 teNbToRead->GetNumberEntry()->SetToolTipText(
"Number of events to read [0 => all events]", TTDELAY);
634 teNbToRead->Resize(150, 20);
637 cfRuns->
AddFrame(runs_and_nbevents, eX);
639 AddFrame(cfRuns, eXeY);
645 fUserClassLabel =
new TGLabel(cf,
"User Class");
648 lab =
new TGLabel(cf,
"User class options");
651 cfAnalysis->AddFrame(cf, eX);
655 cbUserClass->Select(-1);
656 cbUserClass->Resize(150, 20);
658 cbUserClass->Connect(
"Selected(Int_t)",
"KVDataAnalysisLauncher",
this,
659 "SelectedUserClass(Int_t)");
661 btEditClass->SetEnabled(
kFALSE);
662 btEditClass->Connect(
"Clicked()",
"KVDataAnalysisLauncher",
this,
"EditUserClassFiles()");
663 btEditClass->SetToolTipText(
Form(
"Open analysis class source files in %s",
gSystem->
Getenv(
"EDITOR")), TTDELAY);
667 teUserOptions->SetToolTipText(
"Comma-separated list of options for user analysis class: PAR1=VAL1,PAR2=VAL2,etc.", TTDELAY);
670 cfAnalysis->AddFrame(cf, eX);
672 AddFrame(cfAnalysis, eX);
676 bout =
new TGTextButton(cf,
"User's libraries", B_Libs);
678 "KVDataAnalysisLauncher",
680 "SetUserLibraries()");
685 "KVDataAnalysisLauncher",
687 "SetUserIncludes()");
690 this->AddFrame(cf, eX);
694 cout <<
"Creation Process/Quit" << endl;
698 withBatch->SetToolTipText(gBatchSystem->
GetTitle());
699 withBatch->AllowStayDown(
kTRUE);
700 withBatch->Connect(
"Clicked()",
"KVDataAnalysisLauncher",
this,
"SetBatch()");
702 doBatchParams =
new TGTextButton(cfProcess,
"Batch Parameters");
703 doBatchParams->SetToolTipText(
"Set parameters of batch jobs");
704 doBatchParams->Connect(
"Clicked()",
"KVDataAnalysisLauncher",
this,
"SetBatchParameters()");
705 cfProcess->
AddFrame(doBatchParams, eX);
707 bout =
new TGTextButton(cfProcess,
"&Process", B_Process);
709 bout->
Connect(
"Clicked()",
"KVDataAnalysisLauncher",
this,
"Process()");
715 bout->
Connect(
"Clicked()",
"KVDataAnalysisLauncher",
this,
"Exit()");
719 this->AddFrame(cfProcess, eX);
723 Resize(GetDefaultSize());
729 SetWMSize(fMainGuiWidth, fMainGuiHeight);
733 FillListOfUserClasses();
736 checkCompilation =
kFALSE;
739 TString tmp(GetResource(
"Repository",
""));
740 SetRepository(tmp.
Data());
742 if (GUIenv->GetValue(
"KVDataAnalysisLauncher.Batch",
kFALSE))
748 fUserLibraries = GUIenv->GetValue(
"KVDataAnalysisLauncher.UserLibraries",
"");
749 fUserIncludes = GUIenv->GetValue(
"KVDataAnalysisLauncher.UserIncludes",
"");
762 if (GUIenv)
delete GUIenv;
763 delete UserClassNames;
774 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
783 while ((o = next())) {
819 KVError::Warning(
this,
"SetDataSetList",
"Called for undefined repository '%s'", repository.
Data());
823 SetResource(
"Repository", repository);
827 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
883 SetResource(
"DataSet", dataset);
887 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
894 cout <<
"DataSet : [" << dataset <<
"]" << endl;
896 current_dataset = gDataSetManager->
GetDataSet(dataset);
898 current_database = current_dataset->
GetDataBase(
"minimal");
901 GetDataAnalyser()->
SetDataSet(current_dataset);
977 if (current_batch ==
"PROOFLite" && data_reader !=
"TFile") {
980 Info(
"SetSystemList",
"Switched batch system to %s: %s", gBatchSystem->
GetName(), gBatchSystem->
GetTitle());
983 else if (current_batch ==
"Xterm" && data_reader ==
"TFile") {
986 Info(
"SetSystemList",
"Switched batch system to %s: %s", gBatchSystem->
GetName(), gBatchSystem->
GetTitle());
990 GetDataAnalyser(task);
992 SetResource(
"Task", task->
GetTitle());
996 DisableUserClassList();
1000 EnableUserClassList();
1017 lastSelectedSystem = 0;
1020 if (!sys_list.IsEmpty()) {
1021 lvSystems->
Display(&sys_list);
1044 listOfSystemRuns.
Clear();
1045 if (entryMax > -1) {
1047 list_of_runs.
Clear();
1053 if (!noSystems || !strcmp(task->
GetPrereq(),
"*")) {
1057 system = lastSelectedSystem;
1072 SetResource(
"System", system->
GetName());
1076 SetResource(
"System",
"All");
1081 SetResource(
"System",
"Unknown");
1086 list_of_runs.
Clear();
1088 for (
auto sys_p : listofSelectedSystems) {
1093 list_of_runs.
AddAll(&lor);
1094 lor.Clear(
"nodelete");
1097 listOfSystemRuns = run_list;
1098 lvRuns->
Display(&list_of_runs);
1166 bool online_analysis = !strcmp(task->
GetPrereq(),
"*");
1169 gDataAnalyser = datan;
1177 else if (!online_analysis) {
1178 WarningBox(
"Empty Run List",
"The list of runs to process is empty.");
1182 if (fUserIncludes.
Length()) {
1185 if (fUserLibraries.
Length()) {
1197 checkCompilation =
kFALSE;
1202 checkCompilation =
kTRUE;
1210 checkCompilation =
kTRUE;
1211 WarningBox(
"No User Class",
"Please enter the user analysis class name.");
1221 if (
IsBatch() && nbEventRead) {
1222 if (!
WarningBox(
"Read all events in batch mode?",
1223 "This will submit batch jobs which will not read all events.\nAre you sure that is what you want?",
1232 && (!fBatchParameters.
GetNpar()
1239 SetResource(
"RunsList", listOfRuns.
AsString());
1240 SetResource(
"UserClassOptions", teUserOptions->
GetText());
1241 SetResource(
"NbEventsToRead",
Form(
"%.0f", teNbToRead->
GetNumber()));
1247 if(current_dataset!=gDataSet || current_database->
IsMinimal())
1249 std::vector<std::string> selected_system_names;
1250 for (
auto it : listofSelectedSystems) {
1251 selected_system_names.push_back(it->GetName());
1253 listofSelectedSystems.Clear();
1254 auto list_of_runs_backup = listOfRuns;
1255 current_dataset->
cd();
1256 current_database = gExpDB;
1259 for(
auto& sys_name : selected_system_names){
1263 SetRuns(list_of_runs_backup.AsString());
1269 for (
auto it : listofSelectedSystems) {
1274 for (
auto it_r : sys->GetRuns()) {
1276 auto runfiles_for_run =
dynamic_cast<KVDBRun*
>(it_r)->GetRunIndexList();
1277 sys_run_list += runfiles_for_run && listOfRuns;
1281 gBatchSystem->
Clear();
1288 std::cout <<
"data_analyser dataset before SetRuns = " << datan->
GetDataSet() << std::endl;
1289 datan->
SetRuns(sys_run_list,
false);
1304 return e->GetText()->GetString();
1318 return e->GetText()->GetString();
1332 return e->GetText()->GetString();
1345 if (noSystems)
return "";
1372 #ifdef __WITHOUT_TGCOMBOBOX_SELECT_BOOL_T
1392 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
1398 SetResource(
"Repository",
"");
1405 #ifdef __WITHOUT_TGCOMBOBOX_SELECT_BOOL_T
1426 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
1432 SetResource(
"DataSet",
"");
1439 #ifdef __WITHOUT_TGCOMBOBOX_SELECT_BOOL_T
1461 SetResource(
"Task",
"");
1463 DisableUserClassList();
1466 list_of_runs.
Clear();
1489 if (listofSelectedSystems.
IsEmpty())
1490 lastSelectedSystem =
nullptr;
1504 SetResource(
"Trigger",
"All");
1505 SetResource(
"RunsList",
"");
1511 SetResource(
"RunsList", listOfRuns.
AsString());
1529 else withBatch->
SetText(
"BatchMode: Off");
1548 fBatchParameters.
SetFromEnv(GUIenv,
"KVDataAnalysisLauncher");
1551 GetDataAnalyser()->
SetDataSet(current_dataset);
1556 fBatchParameters.
WriteToEnv(GUIenv,
"KVDataAnalysisLauncher");
1572 new KVGFileList(fUserLibraries,
"User's Libraries",
1574 GUIenv->
SetValue(
"KVDataAnalysisLauncher.UserLibraries", fUserLibraries.
Data());
1576 checkCompilation = ori.
CompareTo(fUserLibraries);
1590 GUIenv->
SetValue(
"KVDataAnalysisLauncher.UserIncludes", fUserIncludes.
Data());
1592 checkCompilation = ori.
CompareTo(fUserIncludes);
1617 reply = (ret_code &
kMBYes);
1624 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
1633 Int_t n =
box->GetListBox()->GetNumberOfEntries();
1634 if (n)
box->RemoveEntries(0, n - 1);
1635 if (
box->GetSelectedEntry()) {
1640 box->GetTextEntry()->SetTitle(
"");
1654 if (n)
box->RemoveEntries(0, n - 1);
1655 if (
box->GetSelectedEntry()) {
1696 void KVDataAnalysisLauncher::SetResource(
const TString& name,
const TString& value)
1730 BuildResourceName(name, res, ful_res);
1756 res.
Prepend(
"KVDataAnalysisLauncher.");
1792 BuildResourceName(
name, res, ful_res);
1807 TString KVDataAnalysisLauncher::SystemBatchName(
void)
1846 void KVDataAnalysisLauncher::BuildResourceName(
const TString& name,
TString& cur_res,
TString& saved_res)
1875 cur_res.
Prepend(
"KVDataAnalysisLauncher.");
1882 if ((resource = ResourceNames.
FindObject(name))) {
1891 if (index == -1)
index = NbResNames;
1897 saved_res = cur_res;
1898 TIter next_res(&ResourceNames);
1902 while ((resource = next_res()) && (i++ < index)) {
1912 if (!strcmp(resource->
GetName(),
"Task") && current_dataset) {
1922 if (name ==
"UserClassOptions") {
1923 if (GetResource(
"UserClass",
"").Length())
1924 saved_res += GetResource(
"UserClass",
"").
Prepend(
".");
1928 if (!ok) saved_res =
"";
1942 void KVDataAnalysisLauncher::FillListOfUserClasses()
1952 unique_ptr<TList> lf(dir.GetListOfFiles());
1953 if (!lf.get())
return;
1954 UserClassNames->
Clear();
1956 TIter next(lf.get());
1970 TIter next_cl(UserClassNames);
1977 UserClassNames->
Remove(obj);
1981 UserClassNames->
Add(
new TNamed(
"[NEW]",
"[NEW]"));
1990 void KVDataAnalysisLauncher::SetUserClassList()
1994 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
2004 while (i < nbcl + 1) {
2023 if (class_name ==
"[NEW]") {
2024 GenerateNewUserClass();
2029 SetResource(
"UserClassOptions", teUserOptions->
GetText());
2030 SetResource(
"UserClass", class_name);
2032 SetResource(
"UserClassOptions", teUserOptions->
GetText());
2033 if (strcmp(
"", class_name)) {
2038 checkCompilation =
kTRUE;
2050 void KVDataAnalysisLauncher::GenerateNewUserClass()
2060 new KVInputDialog(
this,
"Enter name of new analysis class", &classname, &ok,
"Enter name of new analysis class");
2064 ok = ok &&
WarningBox(
"Replacing existing class",
2065 Form(
"%s is the name of an existing class defined in [%s,%s].\nDo you want to overwrite this class?\n(All existing code will be lost)",
2071 gDataSet=current_dataset;
2073 FillListOfUserClasses();
2077 SetUserClass(classname);
2090 void KVDataAnalysisLauncher::SetUserClass(
const Char_t* class_name)
2100 #ifdef __WITHOUT_TGCOMBOBOX_SELECT_BOOL_T
2103 cbUserClass->
Select(i, kFALSE);
2107 SetResource(
"UserClass", class_name);
2116 SetResource(
"UserClass",
"");
2120 checkCompilation =
kTRUE;
2129 TString KVDataAnalysisLauncher::GetUserClass()
2134 return e->GetText()->GetString();
2147 void KVDataAnalysisLauncher::DisableUserClassList()
2151 #ifdef __WITHOUT_TGCOMBOBOX_REMOVEALL
2169 void KVDataAnalysisLauncher::EnableUserClassList()
2196 if (editor ==
"")
return;
2197 TString uclass = GetUserClass();
2198 if (uclass ==
"")
return;
2244 if (fStageSelections.
IsEmpty()) {
2245 fStageSelections.
SetValue(
"Missing",
true);
2246 fStageSelections.
SetValue(
"Date",
false);
2252 param_gui->MutuallyExclusive({
"Missing",
"Date"});
2253 param_gui->EnableDependingOnBool(
" - earliest",
"Date");
2254 param_gui->EnableDependingOnBool(
" - latest",
"Date");
2255 param_gui->DisplayDialog();
2258 std::optional<KVDatime> Dmin, Dmax;
2329 if (novolist.GetEntries() > 0) {
2330 TIter nxt(&novolist);
2332 while ((s = (
KVRunFile*)nxt())) listOfRuns.
Add(s->GetRunIndex());
2335 SetResource(
"RunsList", listOfRuns.
AsString());
2337 selectedRuns->
SetText(
Form(
"%d Selected Run%s : %s",
2340 listOfRuns.
AsString(MAX_LENGTH_SELECTED_RUNS).
Data()));
2356 SetResource(
"RunsList",
"");
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
char * Form(const char *fmt,...)
char * StrDup(const char *str)
R__EXTERN TSystem * gSystem
virtual const Char_t * GetType() const
static Bool_t FindClassSourceFiles(const KVString &class_name, KVString &imp_file, KVString &dec_file, const KVString &dir_name=".")
KVBatchSystem * GetDefaultBatchSystem() const
KVBatchSystem * GetBatchSystem(const Char_t *name)
Get batch system by name.
Utility GUI used for setting batch system parameters.
void Clear(Option_t *opt="") override
void cd()
Make this the default batch system.
virtual void SetBatchSystemParameters(const KVNameValueList &)
Use the parameters in the list to set all relevant parameters for batch system.
virtual void GetBatchSystemParameterList(KVNameValueList &)
Description of an experimental run in database ,,.
Database class used to store information on different colliding systems studied during an experiment....
virtual void Run()
Check all task variables, then run analyser.
void SetBatchSystem(KVBatchSystem *bs)
void SetUserClassOptions(const Char_t *o="")
void SetUserLibraries(const Char_t *libs=0)
void SetAnalysisTask(KVDataAnalysisTask *at)
void SetUserClass(const UserClass &kvs, Bool_t check=kTRUE)
static KVDataAnalyser * GetAnalyser(const Char_t *plugin)
void SetUserIncludes(const Char_t *incDirs=0)
Bool_t IsUserClassValid() const
void SetNbEventToRead(Long64_t nb=0)
GUI for running data analysis tasks.
void SelectedDataSet(Int_t)
void SelectedUserClass(Int_t)
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 SystemSelectionChanged()
void SetSystem(const TString &s="")
void Process(void)
Run the analysis task.
void SetTaskList(const TString &s)
void SetDataSet(const TString &ds="")
void UpdateAvailableRuns()
Update available runs for current selected task (=datatype)
void SetUserIncludes(void)
Set the User's includes.
void SelectedRepository(Int_t)
Bool_t SetBatchParameters()
void SetTask(const TString &t="")
TString GetRepository(void)
void SetDataSetList(const TString &repository)
Sets the list of all available data sets in the data sets combo box.
void UserClassSelected(const TString &)
void ClearListOfSelectedRuns()
Empty displayed list of selected runs.
void SetSystemList(Int_t s)
TString GetSavedResource(const TString &name, const TString &defaultvalue="")
void EditUserClassFiles()
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 SetRuns(const TString &s="")
void SetUserLibraries(void)
Set the User's libraries.
void SelectAllUnconvertedRuns()
void UpdateListOfSelectedRuns()
void SetRepository(const TString &r="")
~KVDataAnalysisLauncher()
Destructeur.
Define and manage data analysis tasks.
KVString GetOutputDataType() const
virtual Bool_t WithUserClass() const
virtual const Char_t * GetDataAnalyser() const
virtual const Char_t * GetUserBaseClass() const
virtual const Char_t * GetPrereq() const
Manages access to one or more data repositories.
const KVSeqCollection * GetListOfRepositories() const
KVDataSetRepository * GetRepository(const TString &name) const
Pilots user analysis of experimental data.
void SetDataSet(KVDataSet *ds)
void SetRuns(const run_index_list &nl, Bool_t check=kTRUE)
const KVDataSet * GetDataSet() const
void SetSystem(KVDBSystem *syst)
Set the System used in the analysis.
TString SystemBatchName() const
void SetFullRunList(const run_index_list &nl)
Int_t GetNavailable() const
KVDataSet * GetDataSet(Int_t) const
Return pointer to DataSet using index in list of all datasets, index>=0.
KVDataSet * GetAvailableDataSet(Int_t) const
run_index_list GetRunList(const Char_t *data_type, const KVDBSystem *sys=0) const
run_index_list GetRunList_DateSelection(const TString &type, const KVUnownedList &systems, std::optional< KVDatime > min_date=std::nullopt, std::optional< KVDatime > max_date=std::nullopt)
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
KVList GetListOfAvailableRunFilesForSystem(const TString &datatype, KVDBSystem *systol)
KVExpDB * GetDataBase(const TString &opt="") const
run_index_list GetRunList_StageSelection(const TString &other_type, const TString &base_type, KVDBSystem *sys=0, Bool_t OnlyCol=kFALSE)
void UpdateAvailableRuns(const KVString &type)
bool MakeAnalysisClass(const Char_t *task, const Char_t *classname)
ValType GetDataSetEnv(const Char_t *type, const ValType &defval={}) const
KVUnownedList GetListOfAvailableSystems(const TString &datatype)
Extension of TDatime to handle various useful date formats.
virtual KVSeqCollection * GetSystems() const
run_index_list SetRunIndexListFromString(const TString &, bool interpret_run_number_as_whole_run=false) const
Directory dialogue box for KVDataAnalysisLauncher.
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.
void RemoveFiles()
Remove all the selected files from the TGListBox.
~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
void RemoveAllFiles()
Remove all the files from the TGListBox.
virtual Bool_t CanAdd(const TString &s)
tells whether the file in ths string fn can be added to the list box
Enhanced version of ROOT TGListView widget.
virtual void UnSelectAll()
void ActivateItemsWithColumnData(const Char_t *colname, const KVNumberList &data, Bool_t activate=kTRUE)
virtual void Display(const TCollection *l)
KVUnownedList GetSelectedObjects() const
TObject * GetLastSelectedObject() const
void ActivateItemWithColumnData(const Char_t *colname, const Char_t *data, Bool_t activate=kTRUE)
GUI for setting KVNameValueList parameters.
void SetValue(const Char_t *name, value_type value)
void SetFromEnv(TEnv *tenv, const TString &prefix="")
Int_t GetNpar() const
return the number of stored parameters
Bool_t HasBoolParameter(const Char_t *name) const
Bool_t GetBoolValue(const Char_t *name) const
TString GetTStringValue(const Char_t *name) const
void WriteToEnv(TEnv *tenv, const TString &prefix="")
Description of an individual data file in an experimental dataset.
TObject * FindObject(const char *name) const override
Int_t GetSize() const override
void Clear(Option_t *option="") override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
virtual void AddAll(const TCollection *col)
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
virtual Bool_t IsEmpty() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
virtual void SaveLevel(EEnvLevel level)
void WaitFor(TGWindow *w)
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
virtual Int_t GetSelected() const
void RemoveAll() override
virtual TGLBEntry * GetSelectedEntry() const
virtual void Select(Int_t id, Bool_t emit=kTRUE)
virtual void SetEnabled(Bool_t on=kTRUE)
virtual TGLBEntry * FindEntry(const char *s) const
virtual void AddEntry(const char *s, Int_t id)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
void MapSubwindows() override
virtual void Resize(TGDimension size)
void MapRaised() override
void SetTextJustify(Int_t tmode)
void SetText(const char *newText)
virtual void RemoveEntry(Int_t id=-1)
virtual void AddEntry(const char *s, Int_t id)
virtual TGLBEntry * GetEntry(Int_t id) const
virtual void GetSelectedEntries(TList *selected)
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
virtual TGLBEntry * FindEntry(const char *s) const
virtual void CloseWindow()
virtual void SetIntNumber(Long_t val, Bool_t emit=kTRUE)
virtual Long_t GetIntNumber() const
virtual Double_t GetNumber() const
virtual void SetText(const TString &new_label)
const char * GetText() const
void SetEnabled(Bool_t flag=kTRUE)
virtual void SetText(const char *text, Bool_t emit=kTRUE)
void Clear(Option_t *option="") override
TObject * FindObject(const char *name) const override
void Add(TObject *obj) override
TObject * Remove(const TObjLinkPtr_t &lnk)
TObject * At(Int_t idx) const override
const char * GetName() const override
const char * GetTitle() const override
virtual const char * GetName() const
virtual void Info(const char *method, const char *msgfmt,...) const
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
virtual Int_t IndexOf(const TObject *obj) const
int CompareTo(const char *cs, ECaseCompare cmp=kExact) const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
const char * Data() const
TString & Prepend(char c, Ssiz_t rep=1)
Bool_t IsWhitespace() const
void Form(const char *fmt,...)
TString & Remove(EStripType s, char c)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual void Unload(const char *module)
virtual const char * Getenv(const char *env)
virtual const char * GetIncludePath()
virtual Int_t Exec(const char *shellcmd)
virtual void SetIncludePath(const char *includePath)
virtual int GetPathInfo(const char *path, FileStat_t &buf)
virtual const char * HostName()
virtual char * ExpandPathName(const char *path)
virtual Bool_t ProcessEvents()
List of runfiles specified by run number and file index ,.
TString AsString(Int_t maxlen=0) const
void Add(const run_index_t &r)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
int main(int argc, char **argv)
void Warning(UserClass p, const char *location, const char *va_(fmt),...)