4#include "KVDataSetAnalyser.h"
5#include "KVDataRepositoryManager.h"
6#include "KVDataRepository.h"
7#include "KVDataSetManager.h"
28 fChoozDataSet =
kTRUE;
131 Error(
"CheckTaskVariables",
"By the pricking of my thumb, something wicked this way comes...");
132 Error(
"CheckTaskVariables",
" *** ABORTING THE ANALYSIS ***");
169 cout <<
"Available datasets :" << endl << endl;
170 gDataSetManager->
Print(
"available");
171 Int_t n_dataset = -1;
185 while (!
IsQuit() && (n_dataset < 1 || n_dataset > n_avail)) {
186 cout << endl <<
"Your choice (1-" << gDataSetManager->
187 GetNavailable() <<
")";
188 if (
IsMenus()) cout <<
" [q - quit]";
195 n_dataset = tmp.
Atoi();
227 cout << endl <<
"Choose data type [d - change dataset | q - quit] : ";
232 if (tmp ==
"raw" || tmp ==
"recon" || tmp ==
"ident" || tmp ==
"root") {
268 cout << endl <<
"Available data analysis tasks :" << endl << endl;
280 while (!
IsQuit() && (n_task < 1 || n_task > n_tasks)) {
281 cout << endl <<
"Your choice (1-" << n_tasks <<
283 if (
IsMenus()) cout <<
" [d - change dataset | q - quit]";
344 if (!sys_list.get() || sys_list->GetSize() < 1) {
345 cout <<
"No systems found for dataset: " <<
fDataSet->
351 TIter next_sys(sys_list.get());
354 cout << endl <<
"Available systems : " << endl << endl;
357 cout <<
" " <<
Form(
"%3d.", nsys);
359 cout <<
" (" <<
Form(
"%-3d",
363 if (sys_list->GetSize() == 1) {
377 cout << endl <<
"Your choice (1-" << nsys <<
")";
379 cout <<
" [r - choose runs | ";
381 cout <<
"t - change task";
383 cout <<
"t - change type";
384 cout <<
" | d - change dataset | q - quit]";
398 nsys_pick = tmp.
Atoi();
399 if (nsys_pick >= 1 && nsys_pick <= nsys)
446 cout << endl <<
" Chosen system : " << endl;
449 cout << endl << endl <<
" Available runs: " << endl << endl;
459 cout << endl <<
"Enter list of runs [a - all";
462 if (
fSystem) cout <<
"s - change system | ";
464 cout <<
"t - change task";
466 cout <<
"t - change type";
467 cout <<
" | d - change dataset | q - quit";
490 while (!user_list.
End()) {
497 "None of the runs you chose appear in the list");
534 "Dataset %s is not available for analysis", ds->
GetName());
540 "%ld is address of dataset in repository \"%s\", not of the dataset in the current repository, \"%s\"",
566 Error(
"SetDataSet",
"Unknown dataset %s",
name);
587 while (!all_runs.
End()) {
629 Warning(
"SetRuns",
"Data Set not defined... Nothing done");
642 Info(
"SetRuns",
"Checking runs %s for Data type %s",
651 "The run %d is not present for the data type \"%s\" of data set \"%s\".",
664 "The system \"%s\" of run %d differs from the system \"%s\" of the previous runs.",
719 Error(
"ReadBatchEnvFile",
"Name of data repository not given");
727 Error(
"ReadBatchEnvFile",
"Name of dataset not given");
735 Error(
"ReadBatchEnvFile",
"Name of analysis task not given");
739 Error(
"ReadBatchEnvFile",
"Analysis task \"%s\"not found for dataset %s",
752 Error(
"ReadBatchEnvFile",
"List of runs not given");
835 Error(
"GetKinematics",
"No system defined for kinematic calculations");
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 * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
Handles lists of available runs for different datasets and types of data.
Int_t IsRunFileName(const Char_t *filename)
virtual Int_t GetNumber() const
Description of an experimental run in database ,,.
const Char_t * GetComments() const
ULong64_t GetEvents() const
KVDBSystem * GetSystem() const
const TDatime & GetDatime() const
Database class used to store information on different colliding systems studied during an experiment....
virtual void Print(Option_t *option="") const
KV2Body * GetKinematics()
Manager class which sets up and runs data analysis tasks.
virtual TString ExpandAutoBatchName(const Char_t *format) const
virtual void PostRunReset()
virtual void AddJobDescriptionList(TList *)
virtual void WriteBatchEnvFile(const TString &, Bool_t sav=kTRUE)
KVDataAnalysisTask * GetAnalysisTask() const
void SetSubmit(Bool_t yes=kTRUE)
KVDataAnalyser * GetParent() const
void SetAnalysisTask(KVDataAnalysisTask *at)
virtual const Char_t * GetRecognisedAutoBatchNameKeywords() const
virtual void set_up_analyser_for_task(KVDataAnalyser *the_analyser)
void SetQuit(Bool_t yes=kTRUE)
const KVString & GetDataType() const
void SetDataType(const Char_t *name)
virtual Bool_t ReadBatchEnvFile(const TString &)
void OpenBatchInfoFile(const TString &filename)
TEnv * GetBatchInfoFile() const
KVDataRepository * GetRepository(const Char_t *name) const
virtual Bool_t IsRemote() const
Returns kTRUE for remote repositories, kFALSE for local repositories.
virtual const Char_t * GetRootDirectory() const
returns root directory of data repository (fLocalrootdir)
virtual Bool_t IsConnected()
Always returns kTRUE for local repositories.
Pilots user analysis of experimental data.
void SetFullRunList(const KVNumberList &nl)
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
virtual Bool_t PreSubmitCheck()
void SetDataSet(KVDataSet *ds)
virtual void ChooseAnalysisTask()
virtual KVNumberList PrintAvailableRuns(KVString &datatype)
virtual void set_up_analyser_for_task(KVDataAnalyser *the_analyser)
void ChooseRuns(KVDBSystem *system=nullptr, const Char_t *data_type="")
Bool_t ReadBatchEnvFile(const TString &filename)
Bool_t fChoozTask
set to kTRUE when user wants to choose analysis task
void SetRuns(const KVNumberList &nl, Bool_t check=kTRUE)
void WriteBatchEnvFile(const TString &jobname, Bool_t save=kTRUE)
void ChooseSystem(const Char_t *data_type="")
KVString GetRootDirectoryOfDataToAnalyse() const
Returns path to data to be analysed.
void SetChooseSystem(Bool_t yes=kTRUE)
virtual ~KVDataSetAnalyser()
Destructor.
const KVDataSet * GetDataSet() const
const KV2Body * GetKinematics() const
Int_t GetRunNumberFromFileName(const Char_t *)
Get the run number from the filename.
void SetSystem(KVDBSystem *syst)
Set the System used in the analysis.
KVNumberList fRunList
list of runs to analyse
const Char_t * GetRecognisedAutoBatchNameKeywords() const
virtual void AddJobDescriptionList(TList *)
virtual void set_dataset_name(const Char_t *name)
Bool_t IsChooseDataSet() const
virtual void set_dataset_pointer(KVDataSet *ds)
KVDataSet * fDataSet
dataset chosen by user
KVNumberList fFullRunList
list of all runs for the analysis task
virtual void PostRunReset()
Called at end of Run() after execution of analysis task.
void ChooseWhatToAnalyse()
Bool_t CheckWhatToAnalyseAndHow()
KVDBSystem * fSystem
system chosen by user
Bool_t IsChooseSystem() const
void SetChooseDataSet(Bool_t yes=kTRUE)
void SetChooseTask(Bool_t yes=kTRUE)
TString ExpandAutoBatchName(const Char_t *format) const
void _set_dataset_pointer(KVDataSet *ds)
Bool_t fChoozSystem
set to kTRUE when user wants to choose a system
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.
KVDataRepository * GetRepository() const
Get pointer to data repository in which dataset is stored.
KVAvailableRunsFile * GetAvailableRunsFile(const Char_t *type) const
virtual TList * GetListOfAvailableSystems(const Char_t *datatype, KVDBSystem *systol=0)
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
virtual Int_t GetNtasks() const
KVNumberList GetRunList(const Char_t *data_type, const KVDBSystem *sys=0) const
virtual Bool_t IsAvailable() const
Returns kTRUE if this dataset is available for analysis, i.e. if any associated data files are stored...
KVExpDB * GetDataBase(Option_t *opt="") const
virtual void Print(Option_t *opt="") const
Bool_t CheckRunfileAvailable(const Char_t *type, Int_t run)
virtual KVSeqCollection * GetSystems() const
KVDBRun * GetDBRun(Int_t number) const
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
void SetValue(const Char_t *name, value_type value)
Strings used to represent a set of ranges of values.
const Char_t * GetList() const
Bool_t Contains(Int_t val) const
returns kTRUE if the value 'val' is contained in the ranges defined by the number list
Int_t First() const
Returns smallest number included in list.
const Char_t * AsString(Int_t maxchars=0) const
void Add(Int_t)
Add value 'n' to the list.
void Clear(Option_t *="")
Empty number list, reset it to initial state.
virtual Int_t GetSize() const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
const char * AsString() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
virtual void SaveLevel(EEnvLevel level)
const char * GetName() const override
virtual const char * GetName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual TObject * FindObject(const char *name) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() 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)