KaliVeda
Toolkit for HIC analysis
KVDataSetAnalyser.cpp
1 //Created by KVClassFactory on Tue Feb 14 12:32:06 2017
2 //Author: John Frankland,,,
3 
4 #include "KVDataSetAnalyser.h"
5 #include "KVDataRepositoryManager.h"
6 #include "KVDataRepository.h"
7 #include "KVDataSetManager.h"
8 #include "KVDataSet.h"
9 #include "KVDBSystem.h"
10 #include "KV2Body.h"
11 #include "KVDBRun.h"
12 #include <iostream>
13 using namespace std;
14 
16 
17 
18 
19 
23  : KVDataAnalyser()
24 {
25  // Default constructor
26  fSystem = nullptr;
27  fDataSet = nullptr;
28  fChoozDataSet = kTRUE;
29  fChoozTask = kFALSE;
30  fChoozSystem = kFALSE;
31  fChoozRuns = kFALSE;
32 }
33 
34 
35 
36 
39 
41 {
42  // Destructor
43 }
44 
45 
46 
47 
49 
51 {
53  fDataSet = nullptr;
54  fRunList.Clear();
55  fSystem = nullptr;
56  fChoozDataSet = kTRUE;
57  fChoozTask = kFALSE;
58  fChoozSystem = kFALSE;
59  fChoozRuns = kFALSE;
60 }
61 
62 
63 
67 
69 {
70  // Called just before SubmitTask() in Run()
71  // Checks if remote repository is connected if necessary
72  if (GetParent() && gDataRepository->IsRemote() && !gDataRepository->IsConnected()) return kFALSE;
73  return kTRUE;
74 }
75 
76 
77 
80 
82 {
83  // Called at end of Run() after execution of analysis task
85  fChoozDataSet = kTRUE;
86 }
87 
88 
89 
91 
93 {
94  while (!IsQuit()) {
95  if (fChoozSystem)
96  ChooseSystem();
97  else if (fChoozRuns)
98  ChooseRuns();
99  else
100  break;
101  }
102 }
103 
104 
105 
107 
109 {
110  while (!IsQuit()) {
111  if (fChoozDataSet)
112  ChooseDataSet();
113  else if (IsChooseTask())
114  ChooseAnalysisTask();
115  else
116  break;
117  }
118 }
119 
120 
121 
123 
125 {
126  if (!fDataSet) {
127  ChooseDataSet();
128  if (!fDataSet) {
129  //if after calling ChooseDataSet we STILL don't have a dataset,
130  //there is something seriously wrong...
131  Error("CheckTaskVariables", "By the pricking of my thumb, something wicked this way comes...");
132  Error("CheckTaskVariables", " *** ABORTING THE ANALYSIS ***");
133  return kFALSE;
134  }
135  }
136 
137  if (!GetAnalysisTask()) {
138  ChooseAnalysisTask();
139  }
140 
141  if (fRunList.IsEmpty()) {
142  ChooseSystem();
143  ChooseRuns();
144  }
145  return kTRUE;
146 }
147 
148 
149 
150 
155 
157 {
158  //Print list of available datasets and get user to choose one
159  //A pointer to the chosen dataset can be retrieved with GetDataSet()
160 
161  //not possible in batch mode
162  if (BatchMode()) return;
163 
164  fChoozDataSet = kFALSE;
165  SetQuit(kFALSE);
166  _set_dataset_pointer(nullptr);
167  if (GetAnalysisTask()) SetAnalysisTask(nullptr);
168 
169  cout << "Available datasets :" << endl << endl;
170  gDataSetManager->Print("available");
171  Int_t n_dataset = -1;
172  Int_t n_avail = gDataSetManager->GetNavailable();
173 
174  if (n_avail < 1) {
175  //no datasets available - force termination
176  SetQuit();
177  return;
178  }
179 
180  if (n_avail == 1) {
181  //1 dataset available - automatic choice
182  n_dataset = 1;
183  }
184  else {
185  KVString tmp;
186  while (!IsQuit() && (n_dataset < 1 || n_dataset > n_avail)) {
187  cout << endl << "Your choice (1-" << gDataSetManager->
188  GetNavailable() << ")";
189  if (IsMenus()) cout << " [q - quit]";
190  cout << " : ";
191  tmp.ReadLine(cin);
192  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
193  SetQuit();
194  return;
195  }
196  else if (tmp.IsDigit()) {
197  n_dataset = tmp.Atoi();
198  }
199  }
200  }
201  //we have chosen a dataset
202  _set_dataset_pointer(gDataSetManager->GetAvailableDataSet(n_dataset));
203  //in menu-driven mode, next step is choice of analysis task
204  SetChooseTask();
205 }
206 
207 
208 
213 
215 {
216  //Print list of available types of data for the chosen dataset
217  //and get user to choose one.
218 
219  //not possible in batch mode
220  if (BatchMode()) return;
221 
222  SetChooseTask(kFALSE);
223  SetQuit(kFALSE);
224  SetChooseSystem(kFALSE);
225  SetChooseDataSet(kFALSE);
226  SetAnalysisTask(nullptr);
227 
228  fDataSet->Print("data");
229  cout << endl << "Choose data type [d - change dataset | q - quit] : ";
230  TString tmp;
231  while (!IsQuit() && !IsChooseDataSet() && !IsChooseSystem()) {
232 
233  tmp.ReadLine(cin);
234  if (tmp == "raw" || tmp == "recon" || tmp == "ident" || tmp == "root") {
235  fChoozSystem = kTRUE;
236  SetDataType(tmp);
237  }
238  else if (tmp.Contains("q") || tmp.Contains("Q")) {
239  SetQuit();
240  }
241  else if (tmp.Contains("d") || tmp.Contains("D")) {
242  SetChooseDataSet();
243  }
244 
245  }
246 }
247 
248 
249 
250 
259 
261 {
262  //Print list of all possible data analysis tasks for the chosen data set and invite the user
263  //to choose one of them.
264  //
265  //If only one task available, it is automatically selected
266  //
267  //Enter 'c1', 'c2', etc. to generate a new user analysis class for task '1', '2', etc.
268 
269  //not possible in batch mode
270  if (BatchMode()) return;
271 
272  SetChooseTask(kFALSE);
273  SetAnalysisTask(nullptr);
274  if (fSystem) {
275  fSystem = nullptr;
276  }
277 
278  cout << endl << "Available data analysis tasks :" << endl << endl;
279  fDataSet->Print("tasks");
280  Int_t n_tasks = fDataSet->GetNtasks();
281  if (n_tasks == 1) {
282  SetAnalysisTask(fDataSet->GetAnalysisTask(1));
283  fChoozSystem = kTRUE;
284  return;
285  }
286 
287  Int_t n_task = -1;
288  KVString tmp;
289 
290  while (!IsQuit() && (n_task < 1 || n_task > n_tasks)) {
291  cout << endl << "Your choice (1-" << n_tasks <<
292  ")";
293  if (IsMenus()) {
294  cout << " [d - change dataset | cn - generate new analysis class | q - quit] : \n";
295  cout << "\t - to generate analysis class for task '1', enter 'c1'; for task '2', enter 'c2', etc.\n";
296  }
297  tmp.ReadLine(cin);
298  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
299  SetQuit();
300  return;
301  }
302  else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
303  fChoozDataSet = kTRUE;
304  return;
305  }
306  else if (IsMenus() && tmp.BeginsWith("c")) {
307  auto nt = TString(tmp(1, tmp.Length() - 1)).Atoi();
308  std::cout << "Enter name for new analysis class : ";
309  tmp.ReadLine(cin);
310  fDataSet->MakeAnalysisClass(nt, tmp);
311  }
312  else if (tmp.IsDigit()) {
313  n_task = tmp.Atoi();
314  }
315  }
316  SetAnalysisTask(fDataSet->GetAnalysisTask(n_task));
317  //in menu-driven mode, next step is choice of system
318  fChoozSystem = kTRUE;
319 }
320 
321 
322 
323 
333 
335 {
336  //Print out list of all available systems for the given data type of the chosen dataset
337  //and invite the user to choose one. Return pointer to chosen system.
338  //If 'data_type' is not given, we assume that ChooseAnalysisTask was previously
339  //called and we use the prerequisite data type for the chosen task (fTask->GetPrereq()).
340  //The available system list is deduced from the 'availableruns' file corresponding to the
341  //chosen dataset repository subdirectory and the
342  //chosen data type (="raw", "recon", "ident", "root").
343 
344  //not possible in batch mode
345  if (BatchMode()) return;
346 
347  fChoozSystem = kFALSE;
348  fSystem = 0;
349  ClearRunList();
350 
351  //if no systems are defined for the dataset, we just want to pick from the runlist
352  if (!fDataSet->GetDataBase()->GetSystems()->GetSize()) {
353  fChoozRuns = kTRUE;
354  return;
355  }
356 
357  TString d_t(data_type);
358  //If 'data_type' is not given, we assume that ChooseAnalysisTask or ChooseDataType
359  //was previously called and we use the value of fDataType
360  if (d_t == "")
361  d_t = GetDataType();
362 
363  unique_ptr<TList> sys_list(fDataSet->GetListOfAvailableSystems(d_t.Data()));
364  if (!sys_list.get() || sys_list->GetSize() < 1) {
365  cout << "No systems found for dataset: " << fDataSet->
366  GetName() << ", datatype: " << d_t.Data() << endl;
367  //choose a different data type or analysis task
368  fChoozTask = kTRUE;
369  return;
370  }
371  TIter next_sys(sys_list.get());
372  KVDBSystem* sys;
373  int nsys = 0;
374  cout << endl << "Available systems : " << endl << endl;
375  while ((sys = (KVDBSystem*) next_sys())) {
376  nsys++;
377  cout << " " << Form("%3d.", nsys);
378  cout << " " << Form("%-30s", sys->GetName());
379  cout << " (" << Form("%-3d",
380  sys->GetNumberRuns()) << " runs)" << endl;
381  }
382 
383  if (sys_list->GetSize() == 1) {
384  fChoozRuns = kTRUE;
385  fSystem = (KVDBSystem*) sys_list->At(0);
386  return;
387  }
388 
389  int nsys_pick = -1;
390  KVString tmp;
391 
392  SetQuit(kFALSE);
393  SetChooseTask(kFALSE);
394  fChoozRuns = kFALSE;
395 
396  while (!IsQuit() && !IsChooseTask() && !fChoozRuns && !fChoozDataSet) {
397  cout << endl << "Your choice (1-" << nsys << ")";
398  if (IsMenus()) {
399  cout << " [r - choose runs | "; //ignore systems list & choose from all runs
400  if (GetAnalysisTask())
401  cout << "t - change task";
402  else
403  cout << "t - change type";
404  cout << " | d - change dataset | q - quit]";
405  }
406  cout << " : ";
407  tmp.ReadLine(cin);
408  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
409  SetQuit();
410  }
411  else if (IsMenus() && (tmp.Contains("t") || tmp.Contains("T"))) {
412  SetChooseTask();
413  }
414  else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
415  fChoozDataSet = kTRUE;
416  }
417  else if (IsMenus() && (tmp.Contains("r") || tmp.Contains("R"))) {
418  fChoozRuns = kTRUE;
419  return;
420  }
421  else if (tmp.IsDigit()) {
422  nsys_pick = tmp.Atoi();
423  if (nsys_pick >= 1 && nsys_pick <= nsys)
424  fChoozRuns = kTRUE;
425  }
426  }
427  if (fChoozRuns)
428  fSystem = (KVDBSystem*) sys_list->At(nsys_pick - 1);
429 }
430 
431 
432 
433 
444 
446  const Char_t* data_type)
447 {
448  //Print out list of available runs for chosen dataset, task/data type and system
449  //and invite user to choose from among them
450  //
451  //If 'data_type' is not given, we assume that ChooseAnalysisTask was previously
452  //called and we use the prerequisite data type for the chosen task (fTask->GetPrereq()).
453  //
454  //If 'system' is not given, we assume ChooseSystem was previously called and use
455  //the internally-stored value of that choice (fSystem).
456 
457  //not possible in batch mode
458  if (BatchMode()) return;
459 
460  fChoozRuns = kFALSE;
461  //clear any previous list of runs
462  fRunList.Clear();
463 
464  if (system)
465  fSystem = system;
466 
467  KVString d_t(data_type);
468  //If 'data_type' is not given, we assume that ChooseAnalysisTask or ChooseDataType
469  //was previously called and we use the value of fDataType
470  if (d_t == "")
471  d_t = GetDataType();
472 
473  if (fSystem) {
474  cout << endl << " Chosen system : " << endl;
475  fSystem->Print();
476  }
477  cout << endl << endl << " Available runfiles: " << endl << endl;
478 
479  auto all_runs = PrintAvailableRuns(d_t);
480 
481  if (all_runs.IsEmpty()) {
482  //no runs - choose another system
483  fChoozSystem = kTRUE;
484  return;
485  }
486 
487  cout << endl << "Enter list of runfiles:\n\t - run numbers as \"1 2 3\" or \"1-3 4\" etc.: analyse all files for these runs\n\t - use index for individual files e.g. \"1.0 2.1\")";
488  cout << endl << "[a - all";
489  if (IsMenus()) {
490  cout << " | ";
491  if (fSystem) cout << "s - change system | ";
492  if (GetAnalysisTask())
493  cout << "t - change task";
494  else
495  cout << "t - change type";
496  cout << " | d - change dataset | q - quit";
497  }
498  cout << "] : ";
499  TString tmp;
500  tmp.ReadLine(cin);
501  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
502  SetQuit();
503  }
504  else if (IsMenus() && (tmp.Contains("s") || tmp.Contains("S"))) {
505  fChoozSystem = kTRUE;
506  }
507  else if (IsMenus() && (tmp.Contains("t") || tmp.Contains("T"))) {
508  SetChooseTask();
509  }
510  else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
511  fChoozDataSet = kTRUE;
512  }
513  else if (tmp.Contains("a") || tmp.Contains("A")) {
514  fRunList = all_runs;
515  SetSubmit();
516  }
517  else {
518  fRunList.SetListSelection(tmp, all_runs);
519  if (fRunList.IsEmpty()) {
520  Error("ChooseRuns",
521  "None of the files you chose appear in the list");
522  //we force the user to choose again
523  fChoozRuns = kTRUE;
524  }
525  else
526  SetSubmit();
527  }
528  if (IsSubmit())
529  cout << endl << "Chosen runfiles : " << fRunList.GetList() << endl;
530 }
531 
532 
533 
534 
542 
544 {
545  //Set dataset to be used for analysis.
546  //If the chosen dataset is not available, an error message is printed
547  //Only available datasets can be analysed
548  //Moreover, only datasets in the currently active data repository,
549  //gDataRepository, can be analysed. This is also checked.
550 
551  //allow user to reset dataset pointer to 0
552  fDataSet = ds;
553  if (!ds)
554  return;
555 
556  //check availablility
557  if (!ds->IsAvailable()) {
558  Error("SetDataSet",
559  "Dataset %s is not available for analysis", ds->GetName());
560  fDataSet = nullptr;
561  }
562  //check repository
563  if (ds->GetRepository() != gDataRepository) {
564  Error("SetDataSet",
565  "%ld is address of dataset in repository \"%s\", not of the dataset in the current repository, \"%s\"",
566  (ULong_t) ds, ds->GetRepository()->GetName(),
567  gDataRepository->GetName());
568  fDataSet = nullptr;
569  }
570 }
571 
572 
573 
574 
580 
582 {
583  //Set dataset to be analysed.
584  //If 'name' is not the name of a valid and available dataset
585  //in the currently active data repository, gDataRepository,
586  //an error message is printed.
587 
588  fDataSet = nullptr;
589  KVDataSet* ds = gDataSetManager->GetDataSet(name);
590  if (!ds) {
591  Error("SetDataSet", "Unknown dataset %s", name);
592  }
593  else {
594  set_dataset_pointer(ds);
595  }
596 }
597 
598 
599 
603 
605 {
606  //Prints list of available runs for selected dataset, data type/analysis task, and system
607  //Returns list containing all run numbers
608 
609  auto all_runs = fDataSet->GetRunList(datatype.Data(), fSystem);
610  for (auto& next_file : all_runs) {
611  auto dbrun = fDataSet->GetDataBase()->GetDBRun(next_file.run());
612  if (dbrun) {
613  auto& runfile = fDataSet->GetDataBase()->GetDBRunFile(next_file);
614  cout << " " << next_file << " " << runfile.GetFileName();
615  cout << Form("\t(%9llu events)", runfile.GetEvents());
616  if (dbrun->GetComments())
617  cout << "\t" << dbrun->GetComments();
618  cout << endl;
619  }
620  }
621 
622  return all_runs;
623 }
624 
625 
626 
627 
630 
632 {
633  // Set the System used in the analysis
634 
635  fSystem = syst;
636 }
637 
638 
639 
640 
645 
646 void KVDataSetAnalyser::SetRuns(const run_index_list& nl, Bool_t check)
647 {
648  // Sets the run list
649  //If check=kTRUE (default), we check that the runs are available, and if they belong to different
650  //systems we print a warning message
651  if (!fDataSet) {
652  Warning("SetRuns", "Data Set not defined... Nothing done");
653  return;
654  }
655  if (!check) {
656  fRunList = nl;
657  //set fSystem using first run
658  KVDBRun* run = fDataSet->GetDataBase()->GetDBRun(nl.First().run());
659  if (run) fSystem = run->GetSystem();
660  else fSystem = 0;
661  return;
662  }
663  // Check if all runs are available for this data set and if they all correspond to the same system
664  Int_t i = 0;
665  Info("SetRuns", "Checking runs %s for Data type %s",
666  nl.AsString().Data(), GetDataType().Data());
667  fRunList.Clear();
668  for (auto& run_no : nl) {
669 
670  if (!(fDataSet->CheckRunfileAvailable(GetDataType(), run_no))) {
671  Warning("SetRuns",
672  "The run %s is not present for the data type \"%s\" of data set \"%s\".",
673  run_no.as_string().Data(), GetDataType().Data(), fDataSet->GetName());
674  }
675  else {
676  fRunList.Add(run_no);
677  }
678  KVDBRun* run = fDataSet->GetDataBase()->GetDBRun(run_no.run());
679  if (!i) {
680  fSystem = run->GetSystem();
681  i = 1;
682  }
683  else {
684  if (run->GetSystem() != fSystem) {
685  if (fSystem)
686  Warning("SetRuns",
687  "The system \"%s\" of run %s differs from the system \"%s\" of the previous runs.",
688  run->GetSystem()->GetName(), run_no.as_string().Data(), fSystem->GetName());
689  }
690  }
691  }
692  Info("SetRuns", "Accepted runs : %s", fRunList.AsString().Data());
693 }
694 
695 
696 
697 
703 
705 {
706  //Save (in the TEnv fBatchEnv) all necessary information on analysis task which can be used to execute it later
707  //(i.e. when batch processing system executes the job).
708  //If save=kTRUE (default), write the information in a file whose name is given by ".jobname"
709  //where 'jobname' is the name of the job as given to the batch system.
710 
712 
713  GetBatchInfoFile()->SetValue("DataRepository", gDataRepository->GetName());
714  GetBatchInfoFile()->SetValue("DataSet", fDataSet->GetName());
715  GetBatchInfoFile()->SetValue("Runs", fRunList.GetList());
716  GetBatchInfoFile()->SetValue("FullRunList", fFullRunList.GetList());
717  if (save) GetBatchInfoFile()->SaveLevel(kEnvUser);
718 }
719 
720 
721 
722 
727 
729 {
730  //Read the batch env file "filename" and initialise the analysis task using the
731  //informations in the file
732  //Returns kTRUE if all goes well
733 
734  Bool_t ok = kFALSE;
735 
736  OpenBatchInfoFile(filename);
737 
738  TString val = GetBatchInfoFile()->GetValue("DataRepository", "");
739  if (val != "") {
740  gDataRepositoryManager->GetRepository(val.Data())->cd();
741  }
742  else {
743  Error("ReadBatchEnvFile", "Name of data repository not given");
744  return ok;
745  }
746  val = GetBatchInfoFile()->GetValue("DataSet", "");
747  if (val != "") {
748  gDataSetManager->GetDataSet(val.Data())->cd();
749  SetDataSet(gDataSet);
750  }
751  else {
752  Error("ReadBatchEnvFile", "Name of dataset not given");
753  return ok;
754  }
755  val = GetBatchInfoFile()->GetValue("AnalysisTask", "");
756  SetAnalysisTask(nullptr);
757  if (val != "") {
758  SetAnalysisTask(gDataSet->GetAnalysisTask(val.Data()));
759  }
760  else {
761  Error("ReadBatchEnvFile", "Name of analysis task not given");
762  return ok;
763  }
764  if (!GetAnalysisTask()) {
765  Error("ReadBatchEnvFile", "Analysis task \"%s\"not found for dataset %s",
766  val.Data(), gDataSet->GetName());
767  return ok;
768  }
769 
770  // we call the parent class' method only once the analysis task has been retrieved
771  // and set - in case dataset modifies task's title
772  if (!(ok = KVDataAnalyser::ReadBatchEnvFile(filename))) return ok;
773 
774  val = GetBatchInfoFile()->GetValue("Runs", "");
775  if (val != "") {
776  SetRuns(val);
777  }
778  else {
779  Error("ReadBatchEnvFile", "List of runs not given");
780  return ok;
781  }
782  val = GetBatchInfoFile()->GetValue("FullRunList", "");
783  if (val != "") {
784  SetFullRunList(val);
785  }
786  ok = kTRUE;
787 
788  return ok;
789 }
790 
791 
792 
794 
796 {
798  KVDataSetAnalyser* t_a = dynamic_cast<KVDataSetAnalyser*>(the_analyser);
799  t_a->SetDataSet(fDataSet);
800  t_a->SetSystem(fSystem);
801  t_a->SetRuns(fRunList, kFALSE);
802 }
803 
804 
805 
811 
813 {
814  // Private method used by ExpandAutoBatchName to build name for current system
815  // to be used in batch job name
816  // Also used by KVDataAnalysisLauncher::SystemBatchName for batch job names
817  // and for writing resources in .KVDataAnalysisGUIrc file
818 
819  KVString tmp = "Unknown";
820  if (!fSystem) return tmp;
821  return fSystem->GetBatchName();
822 }
823 
824 
825 
830 
832 {
833  //Replace any 'special' symbols in "format" with their current values
834  //
835  // $System : name of system to be analysed
836 
838  tmp.ReplaceAll("$System", SystemBatchName());
839  return tmp;
840 }
841 
842 
843 
845 
847 {
849  tmp += ", $System";
850  return tmp;
851 }
852 
853 
854 
857 
859 {
860  // \return pointer to KV2Body object describing kinematics of analysed system if defined
861  if (fSystem) return fSystem->GetKinematics();
862  Error("GetKinematics", "No system defined for kinematic calculations");
863  return nullptr;
864 }
865 
866 
867 
870 
872 {
873  // Get the run number from the filename
874 
875  KVAvailableRunsFile* arf;
876  arf = GetDataSet()->GetAvailableRunsFile(GetDataType().Data());
877  return arf->IsRunFileName(fileName).value().first;
878 }
879 
880 
881 
888 
890 {
891  // Retrieve a KVNameValueList called "JobDescriptionList" from
892  // the TList created with KVDataAnalyser::AddJobDescriptionList(l).
893  // The parameters in the list describe the properties of the
894  // current job. The TList pointer could be, for example, the address of
895  // the TSelector::fInput list used by PROOF.
896 
898  KVNameValueList* jdl = (KVNameValueList*)l->FindObject("JobDescriptionList");
899 
900  jdl->SetValue("DataRepository", gDataRepository->GetName());
901  jdl->SetValue("DataSet", fDataSet->GetName());
902 }
903 
904 
905 
908 
910 {
911  // Returns path to data to be analysed
912  return gDataRepository->GetRootDirectory();
913 }
914 
915 
int Int_t
unsigned long ULong_t
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
kEnvUser
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 filename
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 Atom_t Atom_t Time_t format
char name[80]
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
Definition: KV2Body.h:166
Handles lists of available runs for different datasets and types of data.
std::optional< run_index_t > IsRunFileName(const Char_t *filename)
Description of an experimental run in database ,,.
Definition: KVDBRun.h:41
KVDBSystem * GetSystem() const
Definition: KVDBRun.cpp:239
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:52
Int_t GetNumberRuns()
Definition: KVDBSystem.h:143
Manager class which sets up and runs data analysis tasks.
virtual TString ExpandAutoBatchName(const Char_t *format) const
virtual void PostRunReset()
virtual void Reset()
virtual void AddJobDescriptionList(TList *)
virtual void WriteBatchEnvFile(const TString &, Bool_t sav=kTRUE)
virtual const Char_t * GetRecognisedAutoBatchNameKeywords() const
virtual void set_up_analyser_for_task(KVDataAnalyser *the_analyser)
virtual Bool_t ReadBatchEnvFile(const TString &)
KVDataRepository * GetRepository(const Char_t *name) const
virtual Bool_t IsRemote() const
Returns kTRUE for remote repositories, kFALSE for local repositories.
virtual Bool_t IsConnected()
Always returns kTRUE for local repositories.
virtual const Char_t * GetRootDirectory() const
returns root directory of data repository (fLocalrootdir)
Pilots user analysis of experimental data.
TString ExpandAutoBatchName(const Char_t *format) const override
void SetDataSet(KVDataSet *ds)
Bool_t PreSubmitCheck() override
virtual void ChooseAnalysisTask()
void ChooseRuns(KVDBSystem *system=nullptr, const Char_t *data_type="")
void SetRuns(const run_index_list &nl, Bool_t check=kTRUE)
KVString GetRootDirectoryOfDataToAnalyse() const override
Returns path to data to be analysed.
const KV2Body * GetKinematics() const override
void ChooseSystem(const Char_t *data_type="")
void ChooseWhatToDo() override
void ChooseWhatToAnalyse() override
virtual ~KVDataSetAnalyser()
Destructor.
void set_up_analyser_for_task(KVDataAnalyser *the_analyser) override
Int_t GetRunNumberFromFileName(const Char_t *)
Get the run number from the filename.
void SetSystem(KVDBSystem *syst)
Set the System used in the analysis.
void WriteBatchEnvFile(const TString &jobname, Bool_t save=kTRUE) override
virtual run_index_list PrintAvailableRuns(KVString &datatype)
virtual void set_dataset_name(const Char_t *name)
virtual void set_dataset_pointer(KVDataSet *ds)
Bool_t CheckWhatToAnalyseAndHow() override
void Reset() override
const Char_t * GetRecognisedAutoBatchNameKeywords() const override
Bool_t ReadBatchEnvFile(const TString &filename) override
void AddJobDescriptionList(TList *) override
void PostRunReset() override
Called at end of Run() after execution of analysis task.
TString SystemBatchName() const
virtual void Print(Option_t *opt="") const
virtual Int_t GetNavailable() const
KVDataSet * GetDataSet(Int_t) const
Return pointer to DataSet using index in list of all datasets, index>=0.
virtual KVDataSet * GetAvailableDataSet(Int_t) const
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:130
KVDataRepository * GetRepository() const
Get pointer to data repository in which dataset is stored.
Definition: KVDataSet.cpp:1310
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
Definition: KVDataSet.cpp:556
virtual Bool_t IsAvailable() const
Definition: KVDataSet.h:207
void cd() const
Definition: KVDataSet.cpp:692
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
const char * GetName() const override
virtual TObject * FindObject(const char *name) const
Ssiz_t Length() const
Int_t Atoi() const
const char * Data() const
Bool_t IsDigit() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
std::istream & ReadLine(std::istream &str, Bool_t skipWhite=kTRUE)
BinData::ErrorType GetDataType(const TGraph *gr, DataOptions &fitOpt)
void Error(const char *location, const char *fmt,...)
void Info(const char *location, const char *fmt,...)
void Warning(const char *location, const char *fmt,...)
RooCmdArg BatchMode(std::string const &batchMode)
TLine l
ClassImp(TPyArg)