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  auto sys_list = fDataSet->GetListOfAvailableSystems(d_t);
364  if (sys_list.IsEmpty()) {
365  cout << "No systems found for dataset: " << fDataSet->
366  GetName() << ", datatype: " << d_t << endl;
367  //choose a different data type or analysis task
368  fChoozTask = kTRUE;
369  return;
370  }
371  TIter next_sys(&sys_list);
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.First();
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 
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
664  Info("SetRuns", "Checking runs %s for Data type %s",
665  nl.AsString().Data(), GetDataType().Data());
666  fRunList.Clear();
667  for (auto& run_no : nl) {
668 
669  if (!(fDataSet->CheckRunfileAvailable(GetDataType(), run_no))) {
670  Warning("SetRuns",
671  "The run %s is not present for the data type \"%s\" of data set \"%s\".",
672  run_no.as_string().Data(), GetDataType().Data(), fDataSet->GetName());
673  }
674  else {
675  fRunList.Add(run_no);
676  }
677  }
678  Info("SetRuns", "Accepted runs : %s", fRunList.AsString().Data());
679 }
680 
681 
682 
683 
689 
691 {
692  //Save (in the TEnv fBatchEnv) all necessary information on analysis task which can be used to execute it later
693  //(i.e. when batch processing system executes the job).
694  //If save=kTRUE (default), write the information in a file whose name is given by ".jobname"
695  //where 'jobname' is the name of the job as given to the batch system.
696 
698 
699  GetBatchInfoFile()->SetValue("DataRepository", gDataRepository->GetName());
700  GetBatchInfoFile()->SetValue("DataSet", fDataSet->GetName());
701  GetBatchInfoFile()->SetValue("Runs", fRunList.GetList());
702  GetBatchInfoFile()->SetValue("FullRunList", fFullRunList.GetList());
703  if (save) GetBatchInfoFile()->SaveLevel(kEnvUser);
704 }
705 
706 
707 
708 
713 
715 {
716  //Read the batch env file "filename" and initialise the analysis task using the
717  //informations in the file
718  //Returns kTRUE if all goes well
719 
720  Bool_t ok = kFALSE;
721 
722  OpenBatchInfoFile(filename);
723 
724  TString val = GetBatchInfoFile()->GetValue("DataRepository", "");
725  if (val != "") {
726  gDataRepositoryManager->GetRepository(val.Data())->cd();
727  }
728  else {
729  Error("ReadBatchEnvFile", "Name of data repository not given");
730  return ok;
731  }
732  val = GetBatchInfoFile()->GetValue("DataSet", "");
733  if (val != "") {
734  gDataSetManager->GetDataSet(val.Data())->cd();
735  SetDataSet(gDataSet);
736  }
737  else {
738  Error("ReadBatchEnvFile", "Name of dataset not given");
739  return ok;
740  }
741  val = GetBatchInfoFile()->GetValue("AnalysisTask", "");
742  SetAnalysisTask(nullptr);
743  if (val != "") {
744  SetAnalysisTask(gDataSet->GetAnalysisTask(val.Data()));
745  }
746  else {
747  Error("ReadBatchEnvFile", "Name of analysis task not given");
748  return ok;
749  }
750  if (!GetAnalysisTask()) {
751  Error("ReadBatchEnvFile", "Analysis task \"%s\"not found for dataset %s",
752  val.Data(), gDataSet->GetName());
753  return ok;
754  }
755 
756  // we call the parent class' method only once the analysis task has been retrieved
757  // and set - in case dataset modifies task's title
758  if (!(ok = KVDataAnalyser::ReadBatchEnvFile(filename))) return ok;
759 
760  val = GetBatchInfoFile()->GetValue("Runs", "");
761  if (val != "") {
762  SetRuns(val);
763  }
764  else {
765  Error("ReadBatchEnvFile", "List of runs not given");
766  return ok;
767  }
768  val = GetBatchInfoFile()->GetValue("FullRunList", "");
769  if (val != "") {
770  SetFullRunList(val);
771  }
772  ok = kTRUE;
773 
774  return ok;
775 }
776 
777 
778 
780 
782 {
784  KVDataSetAnalyser* t_a = dynamic_cast<KVDataSetAnalyser*>(the_analyser);
785  t_a->SetDataSet(fDataSet);
786  t_a->SetSystem(fSystem);
787  t_a->SetRuns(fRunList, kFALSE);
788 }
789 
790 
791 
797 
799 {
800  // Private method used by ExpandAutoBatchName to build name for current system
801  // to be used in batch job name
802  // Also used by KVDataAnalysisLauncher::SystemBatchName for batch job names
803  // and for writing resources in .KVDataAnalysisGUIrc file
804 
805  KVString tmp = "Unknown";
806  if (!fSystem) return tmp;
807  return fSystem->GetBatchName();
808 }
809 
810 
811 
816 
818 {
819  //Replace any 'special' symbols in "format" with their current values
820  //
821  // $System : name of system to be analysed
822 
824  tmp.ReplaceAll("$System", SystemBatchName());
825  return tmp;
826 }
827 
828 
829 
831 
833 {
835  tmp += ", $System";
836  return tmp;
837 }
838 
839 
840 
843 
845 {
846  // \return pointer to KV2Body object describing kinematics of analysed system if defined
847  if (fSystem) return fSystem->GetKinematics();
848  Error("GetKinematics", "No system defined for kinematic calculations");
849  return nullptr;
850 }
851 
852 
853 
860 
862 {
863  // Retrieve a KVNameValueList called "JobDescriptionList" from
864  // the TList created with KVDataAnalyser::AddJobDescriptionList(l).
865  // The parameters in the list describe the properties of the
866  // current job. The TList pointer could be, for example, the address of
867  // the TSelector::fInput list used by PROOF.
868 
870  KVNameValueList* jdl = (KVNameValueList*)l->FindObject("JobDescriptionList");
871 
872  jdl->SetValue("DataRepository", gDataRepository->GetName());
873  jdl->SetValue("DataSet", fDataSet->GetName());
874 }
875 
876 
877 
880 
882 {
883  // Returns path to data to be analysed
884  return gDataRepository->GetRootDirectory();
885 }
886 
887 
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
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:51
Int_t GetNumberRuns()
Definition: KVDBSystem.h:137
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
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:146
KVDataRepository * GetRepository() const
Get pointer to data repository in which dataset is stored.
Definition: KVDataSet.cpp:1462
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
Definition: KVDataSet.cpp:556
virtual Bool_t IsAvailable() const
Definition: KVDataSet.h:223
void cd() const
Definition: KVDataSet.cpp:733
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)
List of runfiles specified by run number and file index ,.
TString AsString(Int_t maxlen=0) const
const run_index_t & First() const
int run() const
Definition: run_index.h:50
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)