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  run_index_list fRunList;
22  run_index_list fFullRunList;
23  KVDataSet* fDataSet;
24 
25  Bool_t fChoozDataSet;
26  Bool_t fChoozTask;
27  Bool_t fChoozSystem;
28  Bool_t fChoozRuns;
29 
30 protected:
31  void SetCurrentRun(KVDBRun* r)
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);
39  void _set_dataset_pointer(KVDataSet* ds)
40  {
41  fDataSet = ds;
42  }
43  void PostRunReset() override;
44 
45  Bool_t NeedToChooseWhatToDo() const override
46  {
47  return fChoozDataSet || IsChooseTask();
48  }
49  Bool_t NeedToChooseWhatToAnalyse() const override
50  {
51  return fChoozSystem || fChoozRuns;
52  }
53  void ChooseWhatToAnalyse() override;
54  void ChooseWhatToDo() override;
55  Bool_t CheckWhatToAnalyseAndHow() override;
56  void set_up_analyser_for_task(KVDataAnalyser* the_analyser) override;
57 
58 public:
59  TString SystemBatchName() const;
61  virtual ~KVDataSetAnalyser();
62 
63  void ChooseDataSet();
64  void ChooseDataType();
65  virtual void ChooseAnalysisTask();
66  void ChooseSystem(const Char_t* data_type = "");
67  void ChooseRuns(KVDBSystem* system = nullptr, const Char_t* data_type = "");
68  void Reset() override;
69 
70  const KVDBSystem* GetSystem() const
71  {
72  return fSystem;
73  }
74  const run_index_list& GetRunList() const
75  {
76  return fRunList;
77  }
79  {
80  return fRunList.GetNValues();
81  }
83  {
84  return fFullRunList;
85  }
86  const KVDataSet* GetDataSet() const
87  {
88  return fDataSet;
89  }
91  {
92  set_dataset_pointer(ds);
93  }
94  void SetDataSet(const Char_t* name)
95  {
96  set_dataset_name(name);
97  }
98  void SetSystem(KVDBSystem* syst);
99  void SetRuns(const run_index_list& nl, Bool_t check = kTRUE);
101  {
102  fFullRunList = nl;
103  }
104 
106  {
107  fRunList.Clear();
108  }
109  void SetChooseDataSet(Bool_t yes = kTRUE)
110  {
111  fChoozDataSet = yes;
112  }
114  {
115  return fChoozDataSet;
116  }
117  void SetChooseTask(Bool_t yes = kTRUE)
118  {
119  fChoozTask = yes;
120  }
122  {
123  return fChoozTask;
124  }
125  void SetChooseSystem(Bool_t yes = kTRUE)
126  {
127  fChoozSystem = yes;
128  }
130  {
131  return fChoozSystem;
132  }
133  void SetChooseRuns(Bool_t yes = kTRUE)
134  {
135  fChoozRuns = yes;
136  }
138  {
139  return fChoozRuns;
140  }
141  void WriteBatchEnvFile(const TString& jobname, Bool_t save = kTRUE) override;
142  Bool_t ReadBatchEnvFile(const TString& filename) override;
143  TString ExpandAutoBatchName(const Char_t* format) const override;
144  void AddJobDescriptionList(TList*) override;
145  KVString GetRootDirectoryOfDataToAnalyse() const override;
146  const Char_t* GetRecognisedAutoBatchNameKeywords() const override;
147 
148  const KV2Body* GetKinematics() const override;
149  KVDBSystem* GetAnalysedSystem() const override
150  {
151  return fSystem;
152  }
153  KVDBRun* GetAnalysedRun() const override
154  {
155  return fRun;
156  }
158  {
162  return "DataSetAnalyser";
163  }
164 
165  ClassDefOverride(KVDataSetAnalyser, 1) //Analysis of data in datasets
166 };
167 
168 #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
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
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