KaliVeda
Toolkit for HIC analysis
KVDataSetAnalyser.h
1 
4 #ifndef __KVDATASETANALYSER_H
5 #define __KVDATASETANALYSER_H
6 
7 #include "KVDataAnalyser.h"
8 #include "KVDataSet.h"
9 
18 private:
21  run_index_list fRunList;
22  run_index_list fFullRunList;
24 
29 
30 protected:
32  {
33  fRun = r;
34  fSystem = r->GetSystem();
35  }
36  virtual run_index_list PrintAvailableRuns(KVString& datatype);
37  virtual void set_dataset_pointer(KVDataSet* ds);
38  virtual void set_dataset_name(const Char_t* name);
40  {
41  fDataSet = ds;
42  }
43  Bool_t PreSubmitCheck() override;
44  void PostRunReset() override;
45 
46  Bool_t NeedToChooseWhatToDo() const override
47  {
48  return fChoozDataSet || IsChooseTask();
49  }
51  {
52  return fChoozSystem || fChoozRuns;
53  }
54  void ChooseWhatToAnalyse() override;
55  void ChooseWhatToDo() override;
57  void set_up_analyser_for_task(KVDataAnalyser* the_analyser) override;
58 
59 public:
60  TString SystemBatchName() const;
62  virtual ~KVDataSetAnalyser();
63 
64  void ChooseDataSet();
65  void ChooseDataType();
66  virtual void ChooseAnalysisTask();
67  void ChooseSystem(const Char_t* data_type = "");
68  void ChooseRuns(KVDBSystem* system = nullptr, const Char_t* data_type = "");
69  void Reset() override;
70 
71  const KVDBSystem* GetSystem() const
72  {
73  return fSystem;
74  }
75  const run_index_list& GetRunList() const
76  {
77  return fRunList;
78  }
80  {
81  return fRunList.GetNValues();
82  }
83  const run_index_list& GetFullRunList() const
84  {
85  return fFullRunList;
86  }
87  const KVDataSet* GetDataSet() const
88  {
89  return fDataSet;
90  }
92  {
94  }
95  void SetDataSet(const Char_t* name)
96  {
98  }
99  void SetSystem(KVDBSystem* syst);
100  void SetRuns(const run_index_list& nl, Bool_t check = kTRUE);
101  void SetFullRunList(const run_index_list& nl)
102  {
103  fFullRunList = nl;
104  }
105 
107  {
108  fRunList.Clear();
109  }
111  void SetChooseDataSet(Bool_t yes = kTRUE)
112  {
113  fChoozDataSet = yes;
114  }
116  {
117  return fChoozDataSet;
118  }
119  void SetChooseTask(Bool_t yes = kTRUE)
120  {
121  fChoozTask = yes;
122  }
124  {
125  return fChoozTask;
126  }
127  void SetChooseSystem(Bool_t yes = kTRUE)
128  {
129  fChoozSystem = yes;
130  }
132  {
133  return fChoozSystem;
134  }
135  void SetChooseRuns(Bool_t yes = kTRUE)
136  {
137  fChoozRuns = yes;
138  }
140  {
141  return fChoozRuns;
142  }
143  void WriteBatchEnvFile(const TString& jobname, Bool_t save = kTRUE) override;
144  Bool_t ReadBatchEnvFile(const TString& filename) override;
145  TString ExpandAutoBatchName(const Char_t* format) const override;
146  void AddJobDescriptionList(TList*) override;
147  KVString GetRootDirectoryOfDataToAnalyse() const override;
148  const Char_t* GetRecognisedAutoBatchNameKeywords() const override;
149 
150  const KV2Body* GetKinematics() const override;
151  KVDBSystem* GetAnalysedSystem() const override
152  {
153  return fSystem;
154  }
155  KVDBRun* GetAnalysedRun() const override
156  {
157  return fRun;
158  }
159 
160  ClassDefOverride(KVDataSetAnalyser, 1) //Analysis of data in datasets
161 };
162 
163 #endif
int Int_t
ROOT::R::TRInterface & r
bool Bool_t
char Char_t
#define ClassDefOverride(name, id)
char name[80]
Relativistic binary kinematics calculator.
Definition: KV2Body.h:166
Description of an experimental run in database ,,.
Definition: KVDBRun.h:40
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:52
Manager class which sets up and runs data analysis tasks.
Pilots user analysis of experimental data.
void SetCurrentRun(KVDBRun *r)
Bool_t fChoozDataSet
set to kTRUE when user wants to choose a dataset
Bool_t IsChooseTask() const
Bool_t fChoozRuns
set to kTRUE when user wants to choose runs
Bool_t IsChooseRuns() const
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)
Bool_t fChoozTask
set to kTRUE when user wants to choose analysis task
KVString GetRootDirectoryOfDataToAnalyse() const override
Returns path to data to be analysed.
const KV2Body * GetKinematics() const override
void SetDataSet(const Char_t *name)
KVDBRun * GetAnalysedRun() const override
void ChooseSystem(const Char_t *data_type="")
void ChooseWhatToDo() override
const run_index_list & GetRunList() const
void ChooseWhatToAnalyse() override
void SetChooseSystem(Bool_t yes=kTRUE)
const KVDataSet * GetDataSet() const
virtual ~KVDataSetAnalyser()
Destructor.
void set_up_analyser_for_task(KVDataAnalyser *the_analyser) override
void SetChooseRuns(Bool_t yes=kTRUE)
const run_index_list & GetFullRunList() const
KVDBRun * fRun
currently analysed run
Int_t GetRunNumberFromFileName(const Char_t *)
Get the run number from the filename.
void SetSystem(KVDBSystem *syst)
Set the System used in the analysis.
run_index_list fRunList
list of runs to analyse
KVDataSetAnalyser()
Default constructor.
void WriteBatchEnvFile(const TString &jobname, Bool_t save=kTRUE) override
virtual run_index_list PrintAvailableRuns(KVString &datatype)
KVDBSystem * GetAnalysedSystem() const override
virtual void set_dataset_name(const Char_t *name)
Bool_t IsChooseDataSet() const
virtual void set_dataset_pointer(KVDataSet *ds)
Bool_t NeedToChooseWhatToDo() const override
KVDataSet * fDataSet
dataset chosen by user
Bool_t CheckWhatToAnalyseAndHow() override
run_index_list fFullRunList
list of all runs for the analysis task
void Reset() override
KVDBSystem * fSystem
system chosen by user
const Char_t * GetRecognisedAutoBatchNameKeywords() const override
Bool_t NeedToChooseWhatToAnalyse() const override
Bool_t IsChooseSystem() const
void SetChooseDataSet(Bool_t yes=kTRUE)
void SetChooseTask(Bool_t yes=kTRUE)
const KVDBSystem * GetSystem() const
Bool_t ReadBatchEnvFile(const TString &filename) override
void AddJobDescriptionList(TList *) override
Int_t GetNumberOfFilesToAnalyse() const override
void PostRunReset() override
Called at end of Run() after execution of analysis task.
void _set_dataset_pointer(KVDataSet *ds)
Bool_t fChoozSystem
set to kTRUE when user wants to choose a system
TString SystemBatchName() const
void SetFullRunList(const run_index_list &nl)
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:36
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73