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 "KVDataSetRepository.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 
66 
68 {
69  // Called at end of Run() after execution of analysis task
71  fChoozDataSet = kTRUE;
72 }
73 
74 
75 
77 
79 {
80  while (!IsQuit()) {
81  if (fChoozSystem)
82  ChooseSystem();
83  else if (fChoozRuns)
84  ChooseRuns();
85  else
86  break;
87  }
88 }
89 
90 
91 
93 
95 {
96  while (!IsQuit()) {
97  if (fChoozDataSet)
98  ChooseDataSet();
99  else if (IsChooseTask())
100  ChooseAnalysisTask();
101  else
102  break;
103  }
104 }
105 
106 
107 
109 
111 {
112  if (!fDataSet) {
113  ChooseDataSet();
114  if (!fDataSet) {
115  //if after calling ChooseDataSet we STILL don't have a dataset,
116  //there is something seriously wrong...
117  Error("CheckTaskVariables", "By the pricking of my thumb, something wicked this way comes...");
118  Error("CheckTaskVariables", " *** ABORTING THE ANALYSIS ***");
119  return kFALSE;
120  }
121  }
122 
123  if (!GetAnalysisTask()) {
124  ChooseAnalysisTask();
125  }
126 
127  if (fRunList.IsEmpty()) {
128  ChooseSystem();
129  ChooseRuns();
130  }
131  return kTRUE;
132 }
133 
134 
135 
136 
141 
143 {
144  //Print list of available datasets and get user to choose one
145  //A pointer to the chosen dataset can be retrieved with GetDataSet()
146 
147  //not possible in batch mode
148  if (BatchMode()) return;
149 
150  fChoozDataSet = kFALSE;
151  SetQuit(kFALSE);
152  _set_dataset_pointer(nullptr);
153  if (GetAnalysisTask()) SetAnalysisTask(nullptr);
154 
155  cout << "Available datasets :" << endl << endl;
156  gDataSetManager->Print("available");
157  Int_t n_dataset = -1;
158  Int_t n_avail = gDataSetManager->GetNavailable();
159 
160  if (n_avail < 1) {
161  //no datasets available - force termination
162  SetQuit();
163  return;
164  }
165 
166  if (n_avail == 1) {
167  //1 dataset available - automatic choice
168  n_dataset = 1;
169  }
170  else {
171  KVString tmp;
172  while (!IsQuit() && (n_dataset < 1 || n_dataset > n_avail)) {
173  cout << endl << "Your choice (1-" << gDataSetManager->
174  GetNavailable() << ")";
175  if (IsMenus()) cout << " [q - quit]";
176  cout << " : ";
177  tmp.ReadLine(cin);
178  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
179  SetQuit();
180  return;
181  }
182  else if (tmp.IsDigit()) {
183  n_dataset = tmp.Atoi();
184  }
185  }
186  }
187  //we have chosen a dataset
188  _set_dataset_pointer(gDataSetManager->GetAvailableDataSet(n_dataset));
189  //in menu-driven mode, next step is choice of analysis task
190  SetChooseTask();
191 }
192 
193 
194 
199 
201 {
202  //Print list of available types of data for the chosen dataset
203  //and get user to choose one.
204 
205  //not possible in batch mode
206  if (BatchMode()) return;
207 
208  SetChooseTask(kFALSE);
209  SetQuit(kFALSE);
210  SetChooseSystem(kFALSE);
211  SetChooseDataSet(kFALSE);
212  SetAnalysisTask(nullptr);
213 
214  fDataSet->Print("data");
215  cout << endl << "Choose data type [d - change dataset | q - quit] : ";
216  TString tmp;
217  while (!IsQuit() && !IsChooseDataSet() && !IsChooseSystem()) {
218 
219  tmp.ReadLine(cin);
220  if (tmp == "raw" || tmp == "recon" || tmp == "ident" || tmp == "root") {
221  fChoozSystem = kTRUE;
222  SetDataType(tmp);
223  }
224  else if (tmp.Contains("q") || tmp.Contains("Q")) {
225  SetQuit();
226  }
227  else if (tmp.Contains("d") || tmp.Contains("D")) {
228  SetChooseDataSet();
229  }
230 
231  }
232 }
233 
234 
235 
236 
245 
247 {
248  //Print list of all possible data analysis tasks for the chosen data set and invite the user
249  //to choose one of them.
250  //
251  //If only one task available, it is automatically selected
252  //
253  //Enter 'c1', 'c2', etc. to generate a new user analysis class for task '1', '2', etc.
254 
255  //not possible in batch mode
256  if (BatchMode()) return;
257 
258  SetChooseTask(kFALSE);
259  SetAnalysisTask(nullptr);
260  if (fSystem) {
261  fSystem = nullptr;
262  }
263 
264  cout << endl << "Available data analysis tasks :" << endl << endl;
265  fDataSet->Print("tasks");
266  Int_t n_tasks = fDataSet->GetNtasks();
267  if (n_tasks == 1) {
268  SetAnalysisTask(fDataSet->GetAnalysisTask(1));
269  fChoozSystem = kTRUE;
270  return;
271  }
272 
273  Int_t n_task = -1;
274  KVString tmp;
275 
276  while (!IsQuit() && (n_task < 1 || n_task > n_tasks)) {
277  cout << endl << "Your choice (1-" << n_tasks <<
278  ")";
279  if (IsMenus()) {
280  cout << " [d - change dataset | cn - generate new analysis class | q - quit] : \n";
281  cout << "\t - to generate analysis class for task '1', enter 'c1'; for task '2', enter 'c2', etc.\n";
282  }
283  tmp.ReadLine(cin);
284  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
285  SetQuit();
286  return;
287  }
288  else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
289  fChoozDataSet = kTRUE;
290  return;
291  }
292  else if (IsMenus() && tmp.BeginsWith("c")) {
293  auto nt = TString(tmp(1, tmp.Length() - 1)).Atoi();
294  std::cout << "Enter name for new analysis class : ";
295  tmp.ReadLine(cin);
296  fDataSet->MakeAnalysisClass(nt, tmp);
297  }
298  else if (tmp.IsDigit()) {
299  n_task = tmp.Atoi();
300  }
301  }
302  SetAnalysisTask(fDataSet->GetAnalysisTask(n_task));
303  //in menu-driven mode, next step is choice of system
304  fChoozSystem = kTRUE;
305 }
306 
307 
308 
309 
319 
321 {
322  //Print out list of all available systems for the given data type of the chosen dataset
323  //and invite the user to choose one. Return pointer to chosen system.
324  //If 'data_type' is not given, we assume that ChooseAnalysisTask was previously
325  //called and we use the prerequisite data type for the chosen task (fTask->GetPrereq()).
326  //The available system list is deduced from the 'availableruns' file corresponding to the
327  //chosen dataset repository subdirectory and the
328  //chosen data type (="raw", "recon", "ident", "root").
329 
330  //not possible in batch mode
331  if (BatchMode()) return;
332 
333  fChoozSystem = kFALSE;
334  fSystem = 0;
335  ClearRunList();
336 
337  //if no systems are defined for the dataset, we just want to pick from the runlist
338  if (!fDataSet->GetDataBase("minimal")->GetSystems()->GetSize()) {
339  fChoozRuns = kTRUE;
340  return;
341  }
342 
343  TString d_t(data_type);
344  //If 'data_type' is not given, we assume that ChooseAnalysisTask or ChooseDataType
345  //was previously called and we use the value of fDataType
346  if (d_t == "")
347  d_t = GetDataType();
348 
349  auto sys_list = fDataSet->GetListOfAvailableSystems(d_t);
350  if (sys_list.IsEmpty()) {
351  cout << "No systems found for dataset: " << fDataSet->
352  GetName() << ", datatype: " << d_t << endl;
353  //choose a different data type or analysis task
354  fChoozTask = kTRUE;
355  return;
356  }
357  TIter next_sys(&sys_list);
358  KVDBSystem* sys;
359  int nsys = 0;
360  cout << endl << "Available systems : " << endl << endl;
361  while ((sys = (KVDBSystem*) next_sys())) {
362  nsys++;
363  cout << " " << Form("%3d.", nsys);
364  cout << " " << Form("%-30s", sys->GetName());
365  cout << " (" << Form("%-3d",
366  sys->GetNumberRuns()) << " runs)" << endl;
367  }
368 
369  if (sys_list.GetSize() == 1) {
370  fChoozRuns = kTRUE;
371  fSystem = (KVDBSystem*) sys_list.First();
372  return;
373  }
374 
375  int nsys_pick = -1;
376  KVString tmp;
377 
378  SetQuit(kFALSE);
379  SetChooseTask(kFALSE);
380  fChoozRuns = kFALSE;
381 
382  while (!IsQuit() && !IsChooseTask() && !fChoozRuns && !fChoozDataSet) {
383  cout << endl << "Your choice (1-" << nsys << ")";
384  if (IsMenus()) {
385  cout << " [r - choose runs | "; //ignore systems list & choose from all runs
386  if (GetAnalysisTask())
387  cout << "t - change task";
388  else
389  cout << "t - change type";
390  cout << " | d - change dataset | q - quit]";
391  }
392  cout << " : ";
393  tmp.ReadLine(cin);
394  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
395  SetQuit();
396  }
397  else if (IsMenus() && (tmp.Contains("t") || tmp.Contains("T"))) {
398  SetChooseTask();
399  }
400  else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
401  fChoozDataSet = kTRUE;
402  }
403  else if (IsMenus() && (tmp.Contains("r") || tmp.Contains("R"))) {
404  fChoozRuns = kTRUE;
405  return;
406  }
407  else if (tmp.IsDigit()) {
408  nsys_pick = tmp.Atoi();
409  if (nsys_pick >= 1 && nsys_pick <= nsys)
410  fChoozRuns = kTRUE;
411  }
412  }
413  if (fChoozRuns)
414  fSystem = (KVDBSystem*) sys_list.At(nsys_pick - 1);
415 }
416 
417 
418 
419 
430 
432  const Char_t* data_type)
433 {
434  //Print out list of available runs for chosen dataset, task/data type and system
435  //and invite user to choose from among them
436  //
437  //If 'data_type' is not given, we assume that ChooseAnalysisTask was previously
438  //called and we use the prerequisite data type for the chosen task (fTask->GetPrereq()).
439  //
440  //If 'system' is not given, we assume ChooseSystem was previously called and use
441  //the internally-stored value of that choice (fSystem).
442 
443  //not possible in batch mode
444  if (BatchMode()) return;
445 
446  fChoozRuns = kFALSE;
447  //clear any previous list of runs
448  fRunList.Clear();
449 
450  if (system)
451  fSystem = system;
452 
453  KVString d_t(data_type);
454  //If 'data_type' is not given, we assume that ChooseAnalysisTask or ChooseDataType
455  //was previously called and we use the value of fDataType
456  if (d_t == "")
457  d_t = GetDataType();
458 
459  if (fSystem) {
460  cout << endl << " Chosen system : " << endl;
461  fSystem->Print();
462  }
463  cout << endl << endl << " Available runfiles: " << endl << endl;
464 
465  auto all_runs = PrintAvailableRuns(d_t);
466 
467  if (all_runs.IsEmpty()) {
468  //no runs - choose another system
469  fChoozSystem = kTRUE;
470  return;
471  }
472 
473  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\")";
474  cout << endl << "[a - all";
475  if (IsMenus()) {
476  cout << " | ";
477  if (fSystem) cout << "s - change system | ";
478  if (GetAnalysisTask())
479  cout << "t - change task";
480  else
481  cout << "t - change type";
482  cout << " | d - change dataset | q - quit";
483  }
484  cout << "] : ";
485  TString tmp;
486  tmp.ReadLine(cin);
487  if (IsMenus() && (tmp.Contains("q") || tmp.Contains("Q"))) {
488  SetQuit();
489  }
490  else if (IsMenus() && (tmp.Contains("s") || tmp.Contains("S"))) {
491  fChoozSystem = kTRUE;
492  }
493  else if (IsMenus() && (tmp.Contains("t") || tmp.Contains("T"))) {
494  SetChooseTask();
495  }
496  else if (IsMenus() && (tmp.Contains("d") || tmp.Contains("D"))) {
497  fChoozDataSet = kTRUE;
498  }
499  else if (tmp.Contains("a") || tmp.Contains("A")) {
500  fRunList = all_runs;
501  SetSubmit();
502  }
503  else {
504  fRunList.SetListSelection(tmp, all_runs);
505  if (fRunList.IsEmpty()) {
506  Error("ChooseRuns",
507  "None of the files you chose appear in the list");
508  //we force the user to choose again
509  fChoozRuns = kTRUE;
510  }
511  else
512  SetSubmit();
513  }
514  if (IsSubmit())
515  cout << endl << "Chosen runfiles : " << fRunList.GetList() << endl;
516 }
517 
518 
519 
520 
528 
530 {
531  //Set dataset to be used for analysis.
532  //If the chosen dataset is not available, an error message is printed
533  //Only available datasets can be analysed
534  //Moreover, only datasets in the currently active data repository,
535  //gDataRepository, can be analysed. This is also checked.
536 
537  //allow user to reset dataset pointer to 0
538  fDataSet = ds;
539  if (!ds)
540  return;
541 
542  //check availablility
543  if (!ds->IsAvailable()) {
544  Error("SetDataSet",
545  "Dataset %s is not available for analysis", ds->GetName());
546  fDataSet = nullptr;
547  }
548  //check repository
549  if (ds->GetRepository() != dynamic_cast<KVDataSetRepository*>(gDataRepository)) {
550  Error("SetDataSet",
551  "%ld is address of dataset in repository \"%s\", not of the dataset in the current repository, \"%s\"",
552  (ULong_t) ds, ds->GetRepository()->GetName(),
553  gDataRepository->GetName());
554  fDataSet = nullptr;
555  }
556 }
557 
558 
559 
560 
566 
568 {
569  //Set dataset to be analysed.
570  //If 'name' is not the name of a valid and available dataset
571  //in the currently active data repository, gDataRepository,
572  //an error message is printed.
573 
574  fDataSet = nullptr;
575  KVDataSet* ds = gDataSetManager->GetDataSet(name);
576  if (!ds) {
577  Error("SetDataSet", "Unknown dataset %s", name);
578  }
579  else {
580  set_dataset_pointer(ds);
581  }
582 }
583 
584 
585 
589 
591 {
592  //Prints list of available runs for selected dataset, data type/analysis task, and system
593  //Returns list containing all run numbers
594 
595  auto all_runs = fDataSet->GetRunList(datatype.Data(), fSystem);
596  auto db = fDataSet->GetDataBase("minimal");
597  for (auto& next_file : all_runs) {
598  auto dbrun = db->GetDBRun(next_file.run());
599  if (dbrun) {
600  auto& runfile = db->GetDBRunFile(next_file);
601  cout << " " << next_file << " " << runfile.GetFileName();
602  cout << Form("\t(%9llu events)", runfile.GetEvents());
603  if (dbrun->GetComments())
604  cout << "\t" << dbrun->GetComments();
605  cout << endl;
606  }
607  }
608 
609  return all_runs;
610 }
611 
612 
613 
614 
617 
619 {
620  // Set the System used in the analysis
621 
622  fSystem = syst;
623 }
624 
625 
626 
627 
632 
634 {
635  // Sets the run list
636  //If check=kTRUE (default), we check that the runs are available, and if they belong to different
637  //systems we print a warning message
638  if (!fDataSet) {
639  Warning("SetRuns", "Data Set not defined... Nothing done");
640  return;
641  }
642  if (!check) {
643  fRunList = nl;
644  //set fSystem using first run
645  KVDBRun* run = fDataSet->GetDataBase("minimal")->GetDBRun(nl.First().run());
646  if (run) fSystem = run->GetSystem();
647  else fSystem = 0;
648  return;
649  }
650  // Check if all runs are available for this data set
651  Info("SetRuns", "Checking runs %s for Data type %s",
652  nl.AsString().Data(), GetDataType().Data());
653  fRunList.Clear();
654  for (auto& run_no : nl) {
655 
656  if (!(fDataSet->CheckRunfileAvailable(GetDataType(), run_no))) {
657  Warning("SetRuns",
658  "The run %s is not present for the data type \"%s\" of data set \"%s\".",
659  run_no.as_string().Data(), GetDataType().Data(), fDataSet->GetName());
660  }
661  else {
662  fRunList.Add(run_no);
663  }
664  }
665  Info("SetRuns", "Accepted runs : %s", fRunList.AsString().Data());
666 }
667 
668 
669 
670 
676 
678 {
679  //Save (in the TEnv fBatchEnv) all necessary information on analysis task which can be used to execute it later
680  //(i.e. when batch processing system executes the job).
681  //If save=kTRUE (default), write the information in a file whose name is given by ".jobname"
682  //where 'jobname' is the name of the job as given to the batch system.
683 
685 
686  GetBatchInfoFile()->SetValue("DataRepository", gDataRepository->GetName());
687  GetBatchInfoFile()->SetValue("DataSet", fDataSet->GetName());
688  GetBatchInfoFile()->SetValue("Runs", fRunList.GetList());
689  GetBatchInfoFile()->SetValue("FullRunList", fFullRunList.GetList());
690  if (save) GetBatchInfoFile()->SaveLevel(kEnvUser);
691 }
692 
693 
694 
695 
700 
702 {
703  //Read the batch env file "filename" and initialise the analysis task using the
704  //informations in the file
705  //Returns kTRUE if all goes well
706 
707  Bool_t ok = kFALSE;
708 
709  OpenBatchInfoFile(filename);
710 
711  TString val = GetBatchInfoFile()->GetValue("DataRepository", "");
712  if (val != "") {
713  gDataRepositoryManager->GetRepository(val.Data())->cd();
714  }
715  else {
716  Error("ReadBatchEnvFile", "Name of data repository not given");
717  return ok;
718  }
719  val = GetBatchInfoFile()->GetValue("DataSet", "");
720  if (val != "") {
721  gDataSetManager->GetDataSet(val.Data())->cd();
722  SetDataSet(gDataSet);
723  }
724  else {
725  Error("ReadBatchEnvFile", "Name of dataset not given");
726  return ok;
727  }
728  val = GetBatchInfoFile()->GetValue("AnalysisTask", "");
729  SetAnalysisTask(nullptr);
730  if (val != "") {
731  SetAnalysisTask(gDataSet->GetAnalysisTask(val.Data()));
732  }
733  else {
734  Error("ReadBatchEnvFile", "Name of analysis task not given");
735  return ok;
736  }
737  if (!GetAnalysisTask()) {
738  Error("ReadBatchEnvFile", "Analysis task \"%s\"not found for dataset %s",
739  val.Data(), gDataSet->GetName());
740  return ok;
741  }
742 
743  // we call the parent class' method only once the analysis task has been retrieved
744  // and set - in case dataset modifies task's title
745  if (!(ok = KVDataAnalyser::ReadBatchEnvFile(filename))) return ok;
746 
747  val = GetBatchInfoFile()->GetValue("Runs", "");
748  if (val != "") {
749  SetRuns(val);
750  }
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);
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 
847 
849 {
850  // Retrieve a KVNameValueList called "JobDescriptionList" from
851  // the TList created with KVDataAnalyser::AddJobDescriptionList(l).
852  // The parameters in the list describe the properties of the
853  // current job. The TList pointer could be, for example, the address of
854  // the TSelector::fInput list used by PROOF.
855 
857  KVNameValueList* jdl = (KVNameValueList*)l->FindObject("JobDescriptionList");
858 
859  jdl->SetValue("DataRepository", gDataRepository->GetName());
860  jdl->SetValue("DataSet", fDataSet->GetName());
861 }
862 
863 
864 
867 
869 {
870  // Returns path to data to be analysed
871  return gDataRepository->GetRootDirectory();
872 }
873 
874 
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:168
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:139
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 &)
KVDataSetRepository * GetRepository(const TString &name) const
TString 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)
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
void Print(Option_t *opt="") const
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
A repository for experimental datasets.
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:146
Bool_t IsAvailable() const
Definition: KVDataSet.h:224
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
Definition: KVDataSet.cpp:581
KVDataSetRepository * GetRepository() const
Get pointer to data repository in which dataset is stored.
Definition: KVDataSet.cpp:1483
void cd() const
Definition: KVDataSet.cpp:775
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)