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  } else {
184  KVString tmp;
185  while (!IsQuit() && (n_dataset < 1 || n_dataset > n_avail)) {
186  cout << endl << "Your choice (1-" << gDataSetManager->
187  GetNavailable() << ")";
188  if (IsMenus()) cout << " [q - quit]";
189  cout << " : ";
190  tmp.ReadLine(cin);
191  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
192  SetQuit();
193  return;
194  } else if (tmp.IsDigit()) {
195  n_dataset = tmp.Atoi();
196  }
197  }
198  }
199  //we have chosen a dataset
200  _set_dataset_pointer(gDataSetManager->GetAvailableDataSet(n_dataset));
201  //in menu-driven mode, next step is choice of analysis task
202  SetChooseTask();
203 }
204 
205 
206 
211 
213 {
214  //Print list of available types of data for the chosen dataset
215  //and get user to choose one.
216 
217  //not possible in batch mode
218  if (BatchMode()) return;
219 
220  SetChooseTask(kFALSE);
221  SetQuit(kFALSE);
222  SetChooseSystem(kFALSE);
223  SetChooseDataSet(kFALSE);
224  SetAnalysisTask(nullptr);
225 
226  fDataSet->Print("data");
227  cout << endl << "Choose data type [d - change dataset | q - quit] : ";
228  TString tmp;
229  while (!IsQuit() && !IsChooseDataSet() && !IsChooseSystem()) {
230 
231  tmp.ReadLine(cin);
232  if (tmp == "raw" || tmp == "recon" || tmp == "ident" || tmp == "root") {
233  fChoozSystem = kTRUE;
234  SetDataType(tmp);
235  } else if (tmp.Contains("q") || tmp.Contains("Q")) {
236  SetQuit();
237  } else if (tmp.Contains("d") || tmp.Contains("D")) {
238  SetChooseDataSet();
239  }
240 
241  }
242 }
243 
244 
245 
246 
252 
254 {
255  //Print list of all possible data analysis tasks for the chosen data set and invite the user
256  //to choose one of them.
257  //If only one task available, it is automatically selected
258 
259  //not possible in batch mode
260  if (BatchMode()) return;
261 
262  SetChooseTask(kFALSE);
263  SetAnalysisTask(nullptr);
264  if (fSystem) {
265  fSystem = nullptr;
266  }
267 
268  cout << endl << "Available data analysis tasks :" << endl << endl;
269  fDataSet->Print("tasks");
270  Int_t n_tasks = fDataSet->GetNtasks();
271  if (n_tasks == 1) {
272  SetAnalysisTask(fDataSet->GetAnalysisTask(1));
273  fChoozSystem = kTRUE;
274  return;
275  }
276 
277  Int_t n_task = -1;
278  KVString tmp;
279 
280  while (!IsQuit() && (n_task < 1 || n_task > n_tasks)) {
281  cout << endl << "Your choice (1-" << n_tasks <<
282  ")";
283  if (IsMenus()) cout << " [d - change dataset | q - quit]";
284  cout << " : ";
285  tmp.ReadLine(cin);
286  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
287  SetQuit();
288  return;
289  } else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
290  fChoozDataSet = kTRUE;
291  return;
292  } else if (tmp.IsDigit()) {
293  n_task = tmp.Atoi();
294  }
295  }
296  SetAnalysisTask(fDataSet->GetAnalysisTask(n_task));
297  //in menu-driven mode, next step is choice of system
298  fChoozSystem = kTRUE;
299 }
300 
301 
302 
303 
313 
315 {
316  //Print out list of all available systems for the given data type of the chosen dataset
317  //and invite the user to choose one. Return pointer to chosen system.
318  //If 'data_type' is not given, we assume that ChooseAnalysisTask was previously
319  //called and we use the prerequisite data type for the chosen task (fTask->GetPrereq()).
320  //The available system list is deduced from the 'availableruns' file corresponding to the
321  //chosen dataset repository subdirectory and the
322  //chosen data type (="raw", "recon", "ident", "root").
323 
324  //not possible in batch mode
325  if (BatchMode()) return;
326 
327  fChoozSystem = kFALSE;
328  fSystem = 0;
329  ClearRunList();
330 
331  //if no systems are defined for the dataset, we just want to pick from the runlist
332  if (!fDataSet->GetDataBase()->GetSystems()->GetSize()) {
333  fChoozRuns = kTRUE;
334  return;
335  }
336 
337  TString d_t(data_type);
338  //If 'data_type' is not given, we assume that ChooseAnalysisTask or ChooseDataType
339  //was previously called and we use the value of fDataType
340  if (d_t == "")
341  d_t = GetDataType();
342 
343  unique_ptr<TList> sys_list(fDataSet->GetListOfAvailableSystems(d_t.Data()));
344  if (!sys_list.get() || sys_list->GetSize() < 1) {
345  cout << "No systems found for dataset: " << fDataSet->
346  GetName() << ", datatype: " << d_t.Data() << endl;
347  //choose a different data type or analysis task
348  fChoozTask = kTRUE;
349  return;
350  }
351  TIter next_sys(sys_list.get());
352  KVDBSystem* sys;
353  int nsys = 0;
354  cout << endl << "Available systems : " << endl << endl;
355  while ((sys = (KVDBSystem*) next_sys())) {
356  nsys++;
357  cout << " " << Form("%3d.", nsys);
358  cout << " " << Form("%-30s", sys->GetName());
359  cout << " (" << Form("%-3d",
360  sys->GetNumberRuns()) << " runs)" << endl;
361  }
362 
363  if (sys_list->GetSize() == 1) {
364  fChoozRuns = kTRUE;
365  fSystem = (KVDBSystem*) sys_list->At(0);
366  return;
367  }
368 
369  int nsys_pick = -1;
370  KVString tmp;
371 
372  SetQuit(kFALSE);
373  SetChooseTask(kFALSE);
374  fChoozRuns = kFALSE;
375 
376  while (!IsQuit() && !IsChooseTask() && !fChoozRuns && !fChoozDataSet) {
377  cout << endl << "Your choice (1-" << nsys << ")";
378  if (IsMenus()) {
379  cout << " [r - choose runs | "; //ignore systems list & choose from all runs
380  if (GetAnalysisTask())
381  cout << "t - change task";
382  else
383  cout << "t - change type";
384  cout << " | d - change dataset | q - quit]";
385  }
386  cout << " : ";
387  tmp.ReadLine(cin);
388  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
389  SetQuit();
390  } else if (IsMenus() && (tmp.Contains("t") || tmp.Contains("T"))) {
391  SetChooseTask();
392  } else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
393  fChoozDataSet = kTRUE;
394  } else if (IsMenus() && (tmp.Contains("r") || tmp.Contains("R"))) {
395  fChoozRuns = kTRUE;
396  return;
397  } else if (tmp.IsDigit()) {
398  nsys_pick = tmp.Atoi();
399  if (nsys_pick >= 1 && nsys_pick <= nsys)
400  fChoozRuns = kTRUE;
401  }
402  }
403  if (fChoozRuns)
404  fSystem = (KVDBSystem*) sys_list->At(nsys_pick - 1);
405 }
406 
407 
408 
409 
418 
420  const Char_t* data_type)
421 {
422  //Print out list of available runs for chosen dataset, task/data type and system
423  //and invite user to choose from among them
424  //If 'data_type' is not given, we assume that ChooseAnalysisTask was previously
425  //called and we use the prerequisite data type for the chosen task (fTask->GetPrereq()).
426  //If 'system' is not given, we assume ChooseSystem was previously called and use
427  //the internally-stored value of that choice (fSystem).
428 
429  //not possible in batch mode
430  if (BatchMode()) return;
431 
432  fChoozRuns = kFALSE;
433  //clear any previous list of runs
434  fRunList.Clear();
435 
436  if (system)
437  fSystem = system;
438 
439  KVString d_t(data_type);
440  //If 'data_type' is not given, we assume that ChooseAnalysisTask or ChooseDataType
441  //was previously called and we use the value of fDataType
442  if (d_t == "")
443  d_t = GetDataType();
444 
445  if (fSystem) {
446  cout << endl << " Chosen system : " << endl;
447  fSystem->Print();
448  }
449  cout << endl << endl << " Available runs: " << endl << endl;
450 
451  KVNumberList all_runs = PrintAvailableRuns(d_t);
452 
453  if (all_runs.IsEmpty()) {
454  //no runs - choose another system
455  fChoozSystem = kTRUE;
456  return;
457  }
458 
459  cout << endl << "Enter list of runs [a - all";
460  if (IsMenus()) {
461  cout << " | ";
462  if (fSystem) cout << "s - change system | ";
463  if (GetAnalysisTask())
464  cout << "t - change task";
465  else
466  cout << "t - change type";
467  cout << " | d - change dataset | q - quit";
468  }
469  cout << "] : ";
470  TString tmp;
471  tmp.ReadLine(cin);
472  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
473  SetQuit();
474  } else if (IsMenus() && (tmp.Contains("s") || tmp.Contains("S"))) {
475  fChoozSystem = kTRUE;
476  } else if (IsMenus() && (tmp.Contains("t") || tmp.Contains("T"))) {
477  SetChooseTask();
478  } else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
479  fChoozDataSet = kTRUE;
480  } else if (tmp.Contains("a") || tmp.Contains("A")) {
481  fRunList = all_runs;
482  SetSubmit();
483  } else {
484  //cout << "YOU TYPED : " << tmp.Data() << endl;
485  KVNumberList user_list(tmp.Data());
486  //cout << "YOUR LIST : " << user_list.GetList() << endl;
487  //cout << "CLEARED RUNLIST : " << endl; fRunList.PrintLimits();
488  //remove from list any runs which did not actually appear in list
489  user_list.Begin();
490  while (!user_list.End()) {
491  Int_t user_run = user_list.Next();
492  if (all_runs.Contains(user_run)) fRunList.Add(user_run);
493  }
494  //cout << "CHECKED RUNLIST : " << endl; fRunList.PrintLimits();
495  if (fRunList.IsEmpty()) {
496  Error("ChooseRuns",
497  "None of the runs you chose appear in the list");
498  //we force the user to choose again
499  fChoozRuns = kTRUE;
500  } else
501  SetSubmit();
502  }
503  if (IsSubmit())
504  cout << endl << "Chosen runs : " << fRunList.GetList() << endl;
505 }
506 
507 
508 
509 
517 
519 {
520  //Set dataset to be used for analysis.
521  //If the chosen dataset is not available, an error message is printed
522  //Only available datasets can be analysed
523  //Moreover, only datasets in the currently active data repository,
524  //gDataRepository, can be analysed. This is also checked.
525 
526  //allow user to reset dataset pointer to 0
527  fDataSet = ds;
528  if (!ds)
529  return;
530 
531  //check availablility
532  if (!ds->IsAvailable()) {
533  Error("SetDataSet",
534  "Dataset %s is not available for analysis", ds->GetName());
535  fDataSet = nullptr;
536  }
537  //check repository
538  if (ds->GetRepository() != gDataRepository) {
539  Error("SetDataSet",
540  "%ld is address of dataset in repository \"%s\", not of the dataset in the current repository, \"%s\"",
541  (ULong_t) ds, ds->GetRepository()->GetName(),
542  gDataRepository->GetName());
543  fDataSet = nullptr;
544  }
545 }
546 
547 
548 
549 
555 
557 {
558  //Set dataset to be analysed.
559  //If 'name' is not the name of a valid and available dataset
560  //in the currently active data repository, gDataRepository,
561  //an error message is printed.
562 
563  fDataSet = nullptr;
564  KVDataSet* ds = gDataSetManager->GetDataSet(name);
565  if (!ds) {
566  Error("SetDataSet", "Unknown dataset %s", name);
567  } else {
568  set_dataset_pointer(ds);
569  }
570 }
571 
572 
573 
577 
579 {
580  //Prints list of available runs for selected dataset, data type/analysis task, and system
581  //Returns list containing all run numbers
582 
583  KVNumberList all_runs =
584  fDataSet->GetRunList(datatype.Data(), fSystem);
585  KVDBRun* dbrun;
586  all_runs.Begin();
587  while (!all_runs.End()) {
588  dbrun = fDataSet->GetDataBase()->GetDBRun(all_runs.Next());
589  if (dbrun) {
590  cout << " " << Form("%4d", dbrun->GetNumber());
591  cout << Form("\t(%9llu events)", dbrun->GetEvents());
592  cout << "\t[File written: " << dbrun->GetDatime().AsString() << "]";
593  if (dbrun->GetComments())
594  cout << "\t" << dbrun->GetComments();
595  cout << endl;
596  }
597  }
598 
599  return all_runs;
600 }
601 
602 
603 
604 
607 
609 {
610  // Set the System used in the analysis
611 
612  fSystem = syst;
613 }
614 
615 
616 
617 
622 
624 {
625  // Sets the run list
626  //If check=kTRUE (default), we check that the runs are available, and if they belong to different
627  //systems we print a warning message
628  if (!fDataSet) {
629  Warning("SetRuns", "Data Set not defined... Nothing done");
630  return;
631  }
632  if (!check) {
633  fRunList = nl;
634  //set fSystem using first run
635  KVDBRun* run = fDataSet->GetDataBase()->GetDBRun(nl.First());
636  if (run) fSystem = run->GetSystem();
637  else fSystem = 0;
638  return;
639  }
640  // Check if all runs are available for this data set and if they all correspond to the same system
641  Int_t i = 0;
642  Info("SetRuns", "Checking runs %s for Data type %s",
643  nl.AsString(), GetDataType().Data());
644  nl.Begin();
645  fRunList.Clear();
646  while (!nl.End()) {
647  Int_t run_no = nl.Next();
648 
649  if (!(fDataSet->CheckRunfileAvailable(GetDataType(), run_no))) {
650  Warning("SetRuns",
651  "The run %d is not present for the data type \"%s\" of data set \"%s\".",
652  run_no, GetDataType().Data(), fDataSet->GetName());
653  } else {
654  fRunList.Add(run_no);
655  }
656  KVDBRun* run = fDataSet->GetDataBase()->GetDBRun(run_no);
657  if (!i) {
658  fSystem = run->GetSystem();
659  i = 1;
660  } else {
661  if (run->GetSystem() != fSystem) {
662  if (fSystem)
663  Warning("SetRuns",
664  "The system \"%s\" of run %d differs from the system \"%s\" of the previous runs.",
665  run->GetSystem()->GetName(), run_no, fSystem->GetName());
666  }
667  }
668  }
669  Info("SetRuns", "Accepted runs : %s", fRunList.AsString());
670 }
671 
672 
673 
674 
680 
682 {
683  //Save (in the TEnv fBatchEnv) all necessary information on analysis task which can be used to execute it later
684  //(i.e. when batch processing system executes the job).
685  //If save=kTRUE (default), write the information in a file whose name is given by ".jobname"
686  //where 'jobname' is the name of the job as given to the batch system.
687 
689 
690  GetBatchInfoFile()->SetValue("DataRepository", gDataRepository->GetName());
691  GetBatchInfoFile()->SetValue("DataSet", fDataSet->GetName());
692  GetBatchInfoFile()->SetValue("Runs", fRunList.GetList());
693  GetBatchInfoFile()->SetValue("FullRunList", fFullRunList.GetList());
694  if (save) GetBatchInfoFile()->SaveLevel(kEnvUser);
695 }
696 
697 
698 
699 
704 
706 {
707  //Read the batch env file "filename" and initialise the analysis task using the
708  //informations in the file
709  //Returns kTRUE if all goes well
710 
711  Bool_t ok = kFALSE;
712 
713  OpenBatchInfoFile(filename);
714 
715  TString val = GetBatchInfoFile()->GetValue("DataRepository", "");
716  if (val != "") {
717  gDataRepositoryManager->GetRepository(val.Data())->cd();
718  } else {
719  Error("ReadBatchEnvFile", "Name of data repository not given");
720  return ok;
721  }
722  val = GetBatchInfoFile()->GetValue("DataSet", "");
723  if (val != "") {
724  gDataSetManager->GetDataSet(val.Data())->cd();
725  SetDataSet(gDataSet);
726  } else {
727  Error("ReadBatchEnvFile", "Name of dataset not given");
728  return ok;
729  }
730  val = GetBatchInfoFile()->GetValue("AnalysisTask", "");
731  SetAnalysisTask(nullptr);
732  if (val != "") {
733  SetAnalysisTask(gDataSet->GetAnalysisTask(val.Data()));
734  } else {
735  Error("ReadBatchEnvFile", "Name of analysis task not given");
736  return ok;
737  }
738  if (!GetAnalysisTask()) {
739  Error("ReadBatchEnvFile", "Analysis task \"%s\"not found for dataset %s",
740  val.Data(), gDataSet->GetName());
741  return ok;
742  }
743 
744  // we call the parent class' method only once the analysis task has been retrieved
745  // and set - in case dataset modifies task's title
746  if (!(ok = KVDataAnalyser::ReadBatchEnvFile(filename))) return ok;
747 
748  val = GetBatchInfoFile()->GetValue("Runs", "");
749  if (val != "") {
750  SetRuns(val.Data());
751  } else {
752  Error("ReadBatchEnvFile", "List of runs not given");
753  return ok;
754  }
755  val = GetBatchInfoFile()->GetValue("FullRunList", "");
756  if (val != "") {
757  SetFullRunList(val.Data());
758  }
759  ok = kTRUE;
760 
761  return ok;
762 }
763 
764 
765 
767 
769 {
771  KVDataSetAnalyser* t_a = dynamic_cast<KVDataSetAnalyser*>(the_analyser);
772  t_a->SetDataSet(fDataSet);
773  t_a->SetSystem(fSystem);
774  t_a->SetRuns(fRunList, kFALSE);
775 }
776 
777 
778 
784 
786 {
787  // Private method used by ExpandAutoBatchName to build name for current system
788  // to be used in batch job name
789  // Also used by KVDataAnalysisLauncher::SystemBatchName for batch job names
790  // and for writing resources in .KVDataAnalysisGUIrc file
791 
792  KVString tmp = "Unknown";
793  if (!fSystem) return tmp;
794  return fSystem->GetBatchName();
795 }
796 
797 
798 
803 
805 {
806  //Replace any 'special' symbols in "format" with their current values
807  //
808  // $System : name of system to be analysed
809 
811  tmp.ReplaceAll("$System", SystemBatchName());
812  return tmp;
813 }
814 
815 
816 
818 
820 {
822  tmp += ", $System";
823  return tmp;
824 }
825 
826 
827 
830 
832 {
833  // \return pointer to KV2Body object describing kinematics of analysed system if defined
834  if (fSystem) return fSystem->GetKinematics();
835  Error("GetKinematics", "No system defined for kinematic calculations");
836  return nullptr;
837 }
838 
839 
840 
843 
845 {
846  // Get the run number from the filename
847 
848  KVAvailableRunsFile* arf;
849  arf = GetDataSet()->GetAvailableRunsFile(GetDataType().Data());
850  return arf->IsRunFileName(fileName);
851 }
852 
853 
854 
861 
863 {
864  // Retrieve a KVNameValueList called "JobDescriptionList" from
865  // the TList created with KVDataAnalyser::AddJobDescriptionList(l).
866  // The parameters in the list describe the properties of the
867  // current job. The TList pointer could be, for example, the address of
868  // the TSelector::fInput list used by PROOF.
869 
871  KVNameValueList* jdl = (KVNameValueList*)l->FindObject("JobDescriptionList");
872 
873  jdl->SetValue("DataRepository", gDataRepository->GetName());
874  jdl->SetValue("DataSet", fDataSet->GetName());
875 }
876 
877 
878 
881 
883 {
884  // Returns path to data to be analysed
885  return gDataRepository->GetRootDirectory();
886 }
887 
888 
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.
Int_t IsRunFileName(const Char_t *filename)
virtual Int_t GetNumber() const
Definition: KVDBRecord.h:73
Description of an experimental run in database ,,.
Definition: KVDBRun.h:36
ULong64_t GetEvents() const
Definition: KVDBRun.h:134
KVDBSystem * GetSystem() const
Definition: KVDBRun.cpp:242
const TDatime & GetDatime() const
Definition: KVDBRun.h:114
const Char_t * GetComments() const
Definition: KVDBRun.h:147
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:52
Int_t GetNumberRuns()
Definition: KVDBSystem.h:140
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.
virtual Bool_t PreSubmitCheck()
void SetDataSet(KVDataSet *ds)
virtual void ChooseAnalysisTask()
virtual KVNumberList PrintAvailableRuns(KVString &datatype)
virtual void set_up_analyser_for_task(KVDataAnalyser *the_analyser)
void ChooseRuns(KVDBSystem *system=nullptr, const Char_t *data_type="")
Bool_t ReadBatchEnvFile(const TString &filename)
void SetRuns(const KVNumberList &nl, Bool_t check=kTRUE)
void WriteBatchEnvFile(const TString &jobname, Bool_t save=kTRUE)
void ChooseSystem(const Char_t *data_type="")
KVString GetRootDirectoryOfDataToAnalyse() const
Returns path to data to be analysed.
virtual ~KVDataSetAnalyser()
Destructor.
const KV2Body * GetKinematics() const
Int_t GetRunNumberFromFileName(const Char_t *)
Get the run number from the filename.
void SetSystem(KVDBSystem *syst)
Set the System used in the analysis.
const Char_t * GetRecognisedAutoBatchNameKeywords() const
virtual void AddJobDescriptionList(TList *)
virtual void set_dataset_name(const Char_t *name)
virtual void set_dataset_pointer(KVDataSet *ds)
virtual void PostRunReset()
Called at end of Run() after execution of analysis task.
TString ExpandAutoBatchName(const Char_t *format) const
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:35
KVDataRepository * GetRepository() const
Get pointer to data repository in which dataset is stored.
Definition: KVDataSet.cpp:1408
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
Definition: KVDataSet.cpp:598
virtual Bool_t IsAvailable() const
Returns kTRUE if this dataset is available for analysis, i.e. if any associated data files are stored...
Definition: KVDataSet.h:116
void cd() const
Definition: KVDataSet.cpp:745
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Bool_t Contains(Int_t val) const
returns kTRUE if the value 'val' is contained in the ranges defined by the number list
Int_t First() const
Returns smallest number included in list.
const Char_t * AsString(Int_t maxchars=0) const
Bool_t End(void) const
Definition: KVNumberList.h:199
void Begin(void) const
Bool_t IsEmpty() const
Definition: KVNumberList.h:175
Int_t Next(void) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
const char * AsString() const
const char * GetName() const override
virtual TObject * FindObject(const char *name) const
Int_t Atoi() const
const char * Data() const
Bool_t IsDigit() 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)