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:
19  KVDBSystem* fSystem;
20  KVDBRun* fRun;
21  KVDBRunFile* fRunFile; //currently analysed runfile
22  run_index_list fRunList;
23  run_index_list fFullRunList;
24  KVDataSet* fDataSet;
25 
26  Bool_t fChoozDataSet;
27  Bool_t fChoozTask;
28  Bool_t fChoozSystem;
29  Bool_t fChoozRuns;
30 
31 protected:
32  void SetCurrentRun(KVDBRun* r)
33  {
34  fRun = r;
35  fSystem = r->GetSystem();
36  }
37  void SetCurrentRunFile(KVDBRunFile* rf)
38  {
39  fRunFile = rf;
40  }
41  virtual run_index_list PrintAvailableRuns(KVString& datatype);
42  virtual void set_dataset_pointer(KVDataSet* ds);
43  virtual void set_dataset_name(const Char_t* name);
44  void _set_dataset_pointer(KVDataSet* ds)
45  {
46  fDataSet = ds;
47  }
48  void PostRunReset() override;
49 
50  Bool_t NeedToChooseWhatToDo() const override
51  {
52  return fChoozDataSet || IsChooseTask();
53  }
54  Bool_t NeedToChooseWhatToAnalyse() const override
55  {
56  return fChoozSystem || fChoozRuns;
57  }
58  void ChooseWhatToAnalyse() override;
59  void ChooseWhatToDo() override;
60  Bool_t CheckWhatToAnalyseAndHow() override;
61  void set_up_analyser_for_task(KVDataAnalyser* the_analyser) override;
62 
63 public:
64  TString SystemBatchName() const;
66  virtual ~KVDataSetAnalyser();
67 
68  void ChooseDataSet();
69  void ChooseDataType();
70  virtual void ChooseAnalysisTask();
71  void ChooseSystem(const Char_t* data_type = "");
72  void ChooseRuns(KVDBSystem* system = nullptr, const Char_t* data_type = "");
73  void Reset() override;
74 
75  const KVDBSystem* GetSystem() const
76  {
77  return fSystem;
78  }
79  const run_index_list& GetRunList() const
80  {
81  return fRunList;
82  }
84  {
85  return fRunList.GetNValues();
86  }
88  {
89  return fFullRunList;
90  }
91  const KVDataSet* GetDataSet() const
92  {
93  return fDataSet;
94  }
96  {
97  set_dataset_pointer(ds);
98  }
99  void SetDataSet(const Char_t* name)
100  {
101  set_dataset_name(name);
102  }
103  void SetSystem(KVDBSystem* syst);
104  void SetRuns(const run_index_list& nl, Bool_t check = kTRUE);
106  {
107  fFullRunList = nl;
108  }
109 
111  {
112  fRunList.Clear();
113  }
114  void SetChooseDataSet(Bool_t yes = kTRUE)
115  {
116  fChoozDataSet = yes;
117  }
119  {
120  return fChoozDataSet;
121  }
122  void SetChooseTask(Bool_t yes = kTRUE)
123  {
124  fChoozTask = yes;
125  }
127  {
128  return fChoozTask;
129  }
130  void SetChooseSystem(Bool_t yes = kTRUE)
131  {
132  fChoozSystem = yes;
133  }
135  {
136  return fChoozSystem;
137  }
138  void SetChooseRuns(Bool_t yes = kTRUE)
139  {
140  fChoozRuns = yes;
141  }
143  {
144  return fChoozRuns;
145  }
146  void WriteBatchEnvFile(const TString& jobname, Bool_t save = kTRUE) override;
147  Bool_t ReadBatchEnvFile(const TString& filename) override;
148  TString ExpandAutoBatchName(const Char_t* format) const override;
149  void AddJobDescriptionList(TList*) override;
150  KVString GetRootDirectoryOfDataToAnalyse() const override;
151  const Char_t* GetRecognisedAutoBatchNameKeywords() const override;
152 
153  const KV2Body* GetKinematics() const override;
154  KVDBSystem* GetAnalysedSystem() const override
155  {
156  return fSystem;
157  }
158  KVDBRun* GetAnalysedRun() const override
159  {
160  return fRun;
161  }
162  KVDBRunFile* GetAnalysedRunFile() const override
163  {
164  return fRunFile;
165  }
167  {
171  return "DataSetAnalyser";
172  }
173 
174  ClassDefOverride(KVDataSetAnalyser, 1) //Analysis of data in datasets
175 };
176 
177 #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:178
A single raw data file associated with an experimental run ,,.
Definition: KVDBRunFile.h:39
Description of an experimental run in database ,,.
Definition: KVDBRun.h:41
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:51
Manager class which sets up and runs data analysis tasks.
Pilots user analysis of experimental data.
Bool_t IsChooseTask() const
Bool_t IsChooseRuns() const
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 SetDataSet(const Char_t *name)
KVDBRun * GetAnalysedRun() const override
void ChooseSystem(const Char_t *data_type="")
const run_index_list & GetRunList() const
void SetChooseSystem(Bool_t yes=kTRUE)
const KVDataSet * GetDataSet() const
virtual ~KVDataSetAnalyser()
Destructor.
void SetChooseRuns(Bool_t yes=kTRUE)
const run_index_list & GetFullRunList() const
void SetSystem(KVDBSystem *syst)
Set the System used in the analysis.
KVDataSetAnalyser()
Default constructor.
void WriteBatchEnvFile(const TString &jobname, Bool_t save=kTRUE) override
KVDBSystem * GetAnalysedSystem() const override
Bool_t IsChooseDataSet() const
TString GetAnalyserClassNameForBatchJob() override
void Reset() override
const Char_t * GetRecognisedAutoBatchNameKeywords() 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
TString SystemBatchName() const
KVDBRunFile * GetAnalysedRunFile() const override
void SetFullRunList(const run_index_list &nl)
Manage an experimental dataset corresponding to a given experiment or campaign.
Definition: KVDataSet.h:146
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
List of runfiles specified by run number and file index ,.
Int_t GetNValues() const