10 #include "KVDataRepository.h"
11 #include "KVDataRepositoryManager.h"
12 #include "KVDataSetManager.h"
16 #include "KVDBSystem.h"
19 #include "KVAvailableRunsFile.h"
20 #include "KVNumberList.h"
23 #include "KVRunFile.h"
38 fRepository =
nullptr;
40 fAllTasks.SetOwner(
kTRUE);
55 if (!fRepository)
return nullptr;
59 avrf = fRepository->NewAvailableRunsFile(
type,
this);
60 fAvailableRuns.
Add(avrf);
78 if (fDBFileName !=
"")
79 return fDBFileName.Data();
95 return fDBName.Data();
110 fDBase.reset(
new TFile(full_path_to_dbfile,
"READ"));
112 if (fDBase->IsOpen()) {
113 fDataBase =
dynamic_cast<KVExpDB*
>(fDBase->Get(GetDBName()));
115 Error(
"OpenDBFile",
"%s not found in file %s", GetDBName(),
119 fDataBase->ReadObjects(fDBase.get());
135 TString dbfile = GetDBFileName();
136 static TString dbfile_fullpath;
142 TString dataset_alias = GetDataSetEnv(
"DataSet.Directory", GetName());
148 return dbfile_fullpath.
Data();
167 if (envar !=
"") t->
SetTitle(envar);
168 envar = GetDataSetEnv(
Form(
"%s.DataAnalysisTask.Analyser", t->
GetName()));
170 envar = GetDataSetEnv(
Form(
"%s.DataAnalysisTask.UserClass.Base", t->
GetName()));
172 envar = GetDataSetEnv(
Form(
"%s.DataAnalysisTask.Prereq", t->
GetName()));
174 envar = GetDataSetEnv(
Form(
"%s.DataAnalysisTask.UserClass.ExtraACliCIncludes", t->
GetName()));
176 Int_t nev = (
Int_t)GetDataSetEnv(
Form(
"%s.DataAnalysisTask.StatusUpdateInterval", t->
GetName()), 0.0);
206 TString dbfile_fullpath = GetFullPathToDB();
218 Error(
"SaveDataBase",
"Cannot create directory %s required to save database",
225 Error(
"SaveDataBase",
"Cannot create directory %s required to save database, even though %s exists: check disk space ?",
231 Error(
"SaveDataBase",
"Cannot create directory %s required to save database",
244 WriteDBFile(dbfile_fullpath.
Data());
263 Error(
"WriteDBFile",
"Database has not been built");
266 fDBase.reset(
new TFile(full_path_to_dbfile,
"recreate"));
268 fDataBase->Write(GetDBName());
269 fDataBase->WriteObjects(fDBase.get());
303 if (_opt ==
"UPDATE") {
304 OpenDataBase(_opt.
Data());
359 if ((!strcmp(opt,
"UPDATE")) || DataBaseNeedsUpdate()) {
362 Info(
"OpenDataBase",
"Updating database file");
363 fDataBaseUpdateInProgress =
true;
364 is_glob_db = (fDataBase == gExpDB);
374 Info(
"OpenDataBase",
"No database defined for dataset");
378 if (fDataBase && is_glob_db) fDataBase->cd();
379 fDataBaseUpdateInProgress =
false;
381 else if (!fDataBase) {
386 if (!LoadPlugin(
"KVExpDB", GetDBName())) {
387 Error(
"GetDataBase",
"Cannot load required plugin library");
391 TString dbfile_fullpath = GetFullPathToDB();
393 OpenDBFile(dbfile_fullpath.
Data());
406 cout <<
"Dataset name=" << GetName() <<
" (" << GetTitle() <<
")";
408 cout <<
" [ AVAILABLE: ";
409 cout << fDatatypes.Data();
413 cout <<
" [UNAVAILABLE]";
434 cout <<
" *** No available analysis tasks ***"
439 for (
int i = 1; i <= GetNtasks(); i++) {
441 cout <<
"\t" << i <<
". " << dat->
GetTitle() << endl;
447 cout <<
"Available data types: " << fDatatypes.Data() << endl;
498 SetAvailable(fRepository->CheckSubdirExists(GetDataPathSubdir()));
502 KVString data_types = GetDataSetEnv(
"KVDataSet.DataTypes",
"");
503 if (data_types ==
"") {
504 Warning(
"CheckAvailable",
"No datatypes defined for this dataset: %s\nCheck value of KVDataSet.DataTypes or %s.KVDataSet.DataTypes",
505 GetName(), GetName());
510 data_types.
Begin(
" ");
511 while (!data_types.
End()) {
514 (fRepository && fRepository->CheckSubdirExists(GetDataPathSubdir(), GetDataTypeSubdir(
type.Data())))
516 AddAvailableDataType(
type.Data());
520 SetAvailable(fDatatypes !=
"");
522 if (!CheckUserCanAccess()) {
534 if (fDatatypes !=
"") fDatatypes +=
" ";
560 TIter nxt(task_list);
567 SetDataSetSpecificTaskParameters(new_task);
568 fAllTasks.Add(new_task);
570 if (HasDataType(new_task->
GetPrereq())) {
571 fTasks.Add(new_task);
588 return fTasks.GetSize();
639 if (!GetAvailableRunsFile(datatype)) {
640 Error(
"GetListOfAvailableSystems(const Char_t*)",
641 "No available runs file for type %s", datatype);
644 return GetAvailableRunsFile(datatype)->GetListOfAvailableSystems(systol);
678 return GetListOfAvailableSystems(datan->
GetPrereq(), systol);
712 TString path = GetDataSetEnv(
"DataSet.Directory",
name);
717 fCalibDir = GetDATADIRFilePath(path);
733 return fCalibDir.Data();
754 if (fRepository) fRepository->
cd();
872 if (!strcmp(
type,
"raw") && !strcmp(GetDataSetEnv(
"MFM.WithEbyedat",
""),
"yes")) {
873 TString ebydir = GetDataSetDir();
874 ebydir +=
"/ebyedat";
875 gEnv->
SetValue(
"KVMFMDataFileReader.ActionsDirectory", ebydir);
876 if (strcmp(GetDataSetEnv(
"MFM.EbyedatActionsExpName",
""),
""))
877 gEnv->
SetValue(
"KVMFMDataFileReader.ActionsExpName", GetDataSetEnv(
"MFM.EbyedatActionsExpName",
""));
878 TObject*
f = GetRepository()->OpenDataSetRunFile(
this,
type, run, GetName());
880 gEnv->
SetValue(
"KVMFMDataFileReader.ActionsDirectory",
"");
881 gEnv->
SetValue(
"KVMFMDataFileReader.ActionsExpName",
"");
884 return GetRepository()->OpenDataSetRunFile(
this,
type, run, GetName());
907 if (fRepository)
file = GetRunfileName(
type, run);
910 return fRepository->GetFullPathToOpenFile(
this,
type,
file.Data());
931 if (!HasDataType(
type)) {
932 Error(
"GetRunfileName",
933 "No data of type \"%s\" available for dataset %s",
type,
938 return GetAvailableRunsFile(
type)->GetFileName(run);
960 date.
Set(1995, 1, 1, 0, 0, 0);
962 if (!HasDataType(
type)) {
963 Error(
"GetRunfileDate",
964 "No data of type \"%s\" available for dataset %s",
type,
970 if (!GetAvailableRunsFile(
type)->GetRunInfo(run, date,
filename)) {
971 Error(
"GetRunfileDate",
972 "Runfile not found for run %d (data type: %s)", run,
type);
991 if (!HasDataType(
type)) {
992 Error(
"CheckRunfileAvailable",
993 "No data of type \"%s\" available for dataset %s",
type,
997 return GetAvailableRunsFile(
type)->CheckAvailable(run);
1050 if (!HasDataType(
type)) {
1051 Error(
"UpdateAvailableRuns",
1052 "No data of type \"%s\" available for dataset %s",
type,
1056 a->Update(!
a->FileExists());
1073 if (!fRepository)
return nullptr;
1077 return fRepository->CreateNewFile(
this,
type, tmp.
Data());
1102 if (!fRepository)
return;
1107 Error(
"DeleteRunfile",
"Run %d of type %s does not exist.", run,
type);
1112 KVString doNotDelete = GetDataSetEnv(
"DataSet.RunFile.DoNotDelete",
"all");
1113 if (doNotDelete ==
"all" || doNotDelete.
Contains(
type)) {
1114 Error(
"DeleteRunFile",
"%s files cannot be deleted",
type);
1117 fRepository->DeleteFile(
this,
type,
filename.Data(), confirm);
1119 if (!fRepository->CheckFileStatus(
this,
type,
filename.Data()))
1120 GetAvailableRunsFile(
type)->Remove(run);
1151 DeleteRunfile(
type, nl.
Next(), confirm);
1173 if (!
min && !
max)
return 0;
1175 if (
min) printf(
"date minimum %s\n",
min->AsString());
1176 if (
max) printf(
"date maximum %s\n",
max->AsString());
1180 unique_ptr<TList> ll(GetListOfAvailableSystems(
type));
1183 unique_ptr<TList> lrun;
1184 for (
Int_t nl = 0; nl < ll->GetEntries(); nl += 1) {
1186 lrun.reset(GetListOfAvailableSystems(
type, sys));
1188 for (
Int_t nr = 0; nr < lrun->GetEntries(); nr += 1) {
1197 if (*min < run->GetRun()->GetDatime()) {
1231 TList* ll = GetListOfAvailableSystems(ref_type);
1234 Info(
"GetRunList_StageSelection",
"No data available of type \"%s\"", ref_type);
1239 Info(
"GetRunList_StageSelection",
"No data available of type \"%s\" for system %s", ref_type, system->
GetName());
1244 Info(
"GetRunList_StageSelection",
"Liste des runs presents dans \"%s\" mais absent dans \"%s\"", ref_type,
type);
1253 if (system && sys != system)
continue;
1255 nsys = GetRunList(
type, sys);
1256 nsys_ref = GetRunList(ref_type, sys);
1261 Info(
"GetRunList_StageSelection",
"\nKVDBSystem : %s --> %d runs manquants sur %d : %s",
1267 manquant.
Add(nsys_ref);
1287 unique_ptr<TList> lrun(GetListOfAvailableSystems(
type, sys));
1288 TIter next(lrun.get());
1295 unique_ptr<TList> ll(GetListOfAvailableSystems(
type));
1296 if (!ll.get() || !ll->GetEntries()) {
1298 Info(
"GetRunList_VersionSelection",
"No data available of type \"%s\"",
type);
1302 for (
Int_t nl = 0; nl < nsys; nl += 1) {
1304 unique_ptr<TList> lrun(GetListOfAvailableSystems(
type, sys));
1305 TIter next(lrun.get());
1327 if (!fRepository)
return;
1332 fRepository->CommitFile(
file,
type,
this);
1341 TString oldfile = GetAvailableRunsFile(
type)->GetFileName(run);
1342 if (oldfile !=
"" && oldfile != newfile) {
1344 fRepository->DeleteFile(
this,
type, oldfile.
Data(),
1347 if (!fRepository->CheckFileStatus(
this,
type, oldfile.
Data()))
1348 GetAvailableRunsFile(
type)->Remove(run);
1350 if (oldfile != newfile) {
1352 GetAvailableRunsFile(
type)->Add(run, newfile.
Data());
1372 if (fUserGroups ==
"")
1376 unique_ptr<TObjArray> toks(fUserGroups.Tokenize(
' '));
1378 TIter next_name(toks.get());
1379 while ((group_name = (
TObjString*) next_name())) {
1381 if (!fRepository || (fRepository && fRepository->GetDataSetManager()->
1429 GetAvailableRunsFile(data_type)->CheckMultiRunfiles();
1431 cout <<
"OK. No runs appear more than once." << endl;
1434 cout <<
"Runs which appear more than once: " << doubles.
1435 AsString() << endl << endl;
1440 while (!doubles.
End()) {
1445 GetAvailableRunsFile(data_type)->GetRunInfos(rr, &dates, &filenames);
1447 cout <<
"Run " << rr <<
" : " << dates.
1448 GetEntries() <<
" files >>>>>>" << endl;
1449 for (
int i = 0; i < dates.
GetEntries(); i++) {
1482 if (!fRepository)
return;
1487 cout <<
"OK. No runs appear more than once." << endl;
1490 cout <<
"Runs which appear more than once: " << doubles.
1491 AsString() << endl << endl;
1496 while (!doubles.
End()) {
1503 TDatime most_recent(
"1998-12-25 00:00:00");
1504 Int_t i_most_recent = 0;
1505 cout <<
"Run " << rr <<
" : " << dates.
1506 GetEntries() <<
" files >>>>>>" << endl;
1507 for (
int i = 0; i < dates.
GetEntries(); i++) {
1511 if (rundate > most_recent) {
1513 most_recent = rundate;
1520 for (
int i = 0; i < dates.
GetEntries(); i++) {
1522 if (i == i_most_recent) {
1526 cout <<
"DELETE : ";
1531 if (i != i_most_recent) {
1533 fRepository->DeleteFile(
this, data_type,
1535 String().Data(), confirm);
1568 Error(
"CheckRunfileUpToDate",
1569 "Dataset \"%s\" not found in repository \"%s\"", GetName(),
1574 if (GetRunfileDate(data_type, run) < ds->
GetRunfileDate(data_type, run))
1590 const Char_t* other_repos)
1601 return CheckRunfileUpToDate(data_type, run, _or);
1602 Error(
"CheckRunfileUpToDate",
1603 "No data repository known with this name : %s", other_repos);
1615 const Char_t* other_repos)
1620 if (!fRepository)
return;
1625 Error(
"CheckUpToDate",
1626 "No data repository known with this name : %s", other_repos);
1629 KVNumberList runlist = GetAvailableRunsFile(data_type)->GetRunList();
1631 Int_t need_update = 0;
1632 while (!runlist.
End()) {
1635 if (!CheckRunfileUpToDate(data_type, rr, _or)) {
1636 cout <<
" *** run " << rr <<
" needs update ***" <<
1638 cout <<
"\t\tREPOSITORY: " << fRepository->
1639 GetName() <<
"\tDATE: " << GetRunfileDate(data_type,
1642 cout <<
"\t\tREPOSITORY: " << other_repos <<
"\tDATE: " << _or->
1643 GetDataSetManager()->GetDataSet(GetName())->
1644 GetRunfileDate(data_type,
1645 rr).AsString() << endl;
1650 cout <<
" *** All runfiles are up to date for data type " <<
1663 const Char_t* other_repos)
1669 if (!fRepository)
return updates;
1674 Error(
"CheckUpToDate",
1675 "No data repository known with this name : %s", other_repos);
1678 KVNumberList runlist = GetAvailableRunsFile(data_type)->GetRunList();
1680 while (!runlist.
End()) {
1683 if (!CheckRunfileUpToDate(data_type, rr, _or)) {
1706 if (!fRepository || !HasDataType(data_type)) {
1708 "No data of type %s available. Runlist will be empty.",
1712 list = GetAvailableRunsFile(data_type)->GetRunList(system);
1817 if (!_task.
Contains(
"nalysis")) _task +=
" analysis";
1820 auto dat = GetAnalysisTaskAny(_task.
Data());
1822 Error(
"MakeAnalysisClass",
1823 "called for unknown or unavailable analysis task : %s", _task.
Data());
1826 if (!dat->WithUserClass()) {
1827 Error(
"MakeAnalysisClass",
1828 "no user analysis class for analysis task : %s", dat->GetTitle());
1837 if (dat->CheckUserBaseClassIsLoaded()) cl =
TClass::GetClass(dat->GetUserBaseClass());
1842 unique_ptr<TMethodCall> methcall(
new TMethodCall(cl,
"Make",
Form(
"\"%s\"", classname)));
1844 if (!methcall->IsValid()) {
1845 Error(
"MakeAnalysisClass",
"static Make(const Char_t*) method for class %s is not valid",
1851 methcall->Execute();
1866 return OpenDataSetFile(GetName(), filename,
file);
1885 abspath.
Form(
"%s/%s", datasetdir.
Data(), filename);
1886 return SearchAndOpenKVFile(abspath,
file);
1889 return SearchAndOpenKVFile(filename,
file, datasetdir);
1903 return GetFullPathToDataSetFile(GetName(),
filename);
1919 if (!SearchKVFile(
filename, fullpath, datasetdir)) {
1920 ::Warning(
"KVDataSet::GetFullPathToDataSetFile",
"File %s not found in dataset subdirectory %s",
filename, datasetdir.
Data());
1939 return SearchKVFile(
filename, fullpath, datasetdir);
1953 return FindDataSetFile(GetName(),
filename);
1980 Error(
"GetAnalysisTaskAny",
"No task found with the following keywords in its title : %s", keywords);
2004 if (!SearchKVFile(GetDataSetDir(), path)) {
2006 Info(
"DataBaseNeedsUpdate",
"%s: Creating new dataset directory %s",
2007 GetName(), GetDataSetDir());
2010 Error(
"DataBaseNeedsUpdate",
2011 "%s: Dataset directory %s does not exist and cannot be created ?",
2012 GetName(), GetDataSetDir());
2016 SearchKVFile(GetDataSetDir(), path);
2020 of1 <<
"$(KV_WORK_DIR)/db/" << GetName() <<
"/DataBase.root : Runlist.csv Systems.dat" << endl;
2021 of1 <<
"\t@echo Database needs update" << endl;
2025 of2 <<
"# Automatically generated dummy Runlist.csv file" << endl;
2029 of3 <<
"# Automatically generated dummy Systems.dat file" << endl;
2076 if (
gEnv->
Defined(
Form(
"%s.DataRepository.DefaultOutputRepository", GetRepository()->GetName())))
2077 return TString(
gEnv->
GetValue(
Form(
"%s.DataRepository.DefaultOutputRepository", GetRepository()->GetName()),
""));
2078 TString orep = GetDataSetEnv(
Form(
"%s.DataAnalysisTask.OutputRepository", taskname), GetRepository()->GetName());
2096 while (!runs.
End()) {
2097 int run = runs.
Next();
2123 Error(
"CopyRunfilesToRepository",
"Unknown destination repository : %s", destrepo);
2124 gDataRepositoryManager->
Print();
2131 while (!runs.
End()) {
2132 int run = runs.
Next();
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 type
char * Form(const char *fmt,...)
void AssignAndDelete(TString &target, char *tobedeleted)
R__EXTERN TSystem * gSystem
Handles lists of available runs for different datasets and types of data.
virtual void Add(Int_t run, const Char_t *filename)
KVNumberList CheckMultiRunfiles()
Returns a list with all runs which occur more than once in the available runs file.
virtual void Remove(Int_t run, const Char_t *filename="")
virtual void GetRunInfos(Int_t run, KVList *dates, KVList *names)
static const Char_t * GetDataSetEnv(const Char_t *dataset, const Char_t *type, const Char_t *defval)
const TDatime & GetDatime() const
Database class used to store information on different colliding systems studied during an experiment....
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Define and manage data analysis tasks.
virtual void SetDataAnalyser(const Char_t *d)
virtual void SetPrereq(const Char_t *p)
virtual void SetStatusUpdateInterval(Long64_t n)
void SetExtraAClicIncludes(const KVString &list)
virtual const Char_t * GetPrereq() const
virtual void SetUserBaseClass(const Char_t *d)
KVDataRepository * GetRepository(const Char_t *name) const
void Print(Option_t *opt="") const
Base class for managing repositories of experimental data.
virtual KVDataSetManager * GetDataSetManager() const
Return pointer to data set manager for this repository.
virtual void CopyFileFromRepository(const KVDataSet *dataset, const Char_t *datatype, const Char_t *filename, const Char_t *destination)
void CreateAllNeededSubdirectories(const KVDataSet *DataSet, const Char_t *DataType)
virtual const Char_t * GetFullPathToTransferFile(const KVDataSet *dataset, const Char_t *datatype, const Char_t *runfile)
KVDataSet * GetDataSet(Int_t) const
Return pointer to DataSet using index in list of all datasets, index>=0.
Manage an experimental dataset corresponding to a given experiment or campaign.
TString GetOutputRepository(const Char_t *taskname) const
virtual void OpenDBFile(const Char_t *full_path_to_dbfile) const
Open the database from a file on disk.
KVNumberList GetRunList_VersionSelection(const Char_t *type, const Char_t *version, KVDBSystem *sys=0)
void CheckMultiRunfiles(const Char_t *data_type)
KVNumberList GetRunList_StageSelection(const Char_t *other_type, const Char_t *base_type, KVDBSystem *sys=0, Bool_t OnlyCol=kFALSE)
void CheckUpToDate(const Char_t *data_type, const Char_t *other_repos)
const Char_t * GetDBName() const
KVDataRepository * GetRepository() const
Get pointer to data repository in which dataset is stored.
void CopyRunfilesToRepository(const Char_t *type, KVNumberList runs, const Char_t *destrepo)
const Char_t * GetDBFileName() const
const Char_t * GetDataSetDir() const
void DeleteRunfiles(const Char_t *type, KVNumberList lrun="", Bool_t confirm=kTRUE)
KVNumberList GetUpdatableRuns(const Char_t *data_type, const Char_t *other_repos)
virtual void ls(Option_t *opt="") const
Print dataset information.
void DeleteRunfile(const Char_t *type, Int_t run, Bool_t confirm=kTRUE)
KVAvailableRunsFile * GetAvailableRunsFile(const Char_t *type) const
virtual void AddAvailableDataType(const Char_t *)
virtual TList * GetListOfAvailableSystems(const Char_t *datatype, KVDBSystem *systol=0)
Bool_t CheckRunfileUpToDate(const Char_t *data_type, Int_t run, KVDataRepository *other_repos)
void SetName(const char *name)
KVDataAnalysisTask * GetAnalysisTask(Int_t) const
virtual const Char_t * GetBaseFileName(const Char_t *type, Int_t run) const
virtual void SaveDataBase() const
virtual KVDataAnalysisTask * GetAnalysisTaskAny(const Char_t *keywords) const
virtual void SetAnalysisTasks(const KVSeqCollection *)
KVNumberList GetRunList_DateSelection(const Char_t *type, TDatime *min=0, TDatime *max=0)
virtual void CheckAvailable()
const Char_t * GetRunfileName(const Char_t *type, Int_t run) const
TDatime GetRunfileDate(const Char_t *type, Int_t run)
const Char_t * GetDataSetEnv(const Char_t *type, const Char_t *defval="") const
virtual Int_t GetNtasks() const
KVNumberList GetRunList(const Char_t *data_type, const KVDBSystem *sys=0) const
TString GetFullPathToDataSetFile(const Char_t *filename)
TString GetFullPathToRunfile(const Char_t *type, Int_t run) const
void CopyRunfilesFromRepository(const Char_t *type, KVNumberList runs, const Char_t *destdir)
void UpdateAvailableRuns(const Char_t *type)
virtual void MakeAnalysisClass(const Char_t *task, const Char_t *classname)
TObject * open_runfile(const Char_t *type, Int_t run)
void CommitRunfile(const Char_t *type, Int_t run, TFile *file)
KVExpDB * GetDataBase(Option_t *opt="") const
virtual Bool_t DataBaseNeedsUpdate() const
Bool_t OpenDataSetFile(const Char_t *filename, std::ifstream &file)
void SetDataSetSpecificTaskParameters(KVDataAnalysisTask *) const
virtual void WriteDBFile(const Char_t *full_path_to_dbfile) const
const Char_t * GetFullPathToDB() const
Returns full path to file where database is written on disk.
TFile * NewRunfile(const Char_t *type, Int_t run)
virtual Bool_t CheckUserCanAccess()
void SetRepository(KVDataRepository *)
Set pointer to data repository in which dataset is stored.
KVDataSet()
Default constructor.
void CleanMultiRunfiles(const Char_t *data_type, Bool_t confirm=kTRUE)
virtual void OpenDataBase(Option_t *opt="") const
virtual void Print(Option_t *opt="") const
static Bool_t FindDataSetFile(const TString &dataset, const Char_t *filename)
Bool_t CheckRunfileAvailable(const Char_t *type, Int_t run)
Extension of TDatime to handle various useful date formats.
Base class to describe database of an experiment ,,.
static KVExpDB * MakeDataBase(const Char_t *name, const Char_t *datasetdir)
Extended TList class which owns its objects by default.
Strings used to represent a set of ranges of values.
const Char_t * AsString(Int_t maxchars=0) const
void Remove(Int_t)
Remove value 'n' from the list.
void Add(Int_t)
Add value 'n' to the list.
Description of an individual run file in an experimental dataset.
Int_t GetRunNumber() const
const Char_t * GetVersion() const
const KVDBRun * GetRun() const
KaliVeda extensions to ROOT collection classes.
virtual TObject * At(Int_t idx) const
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
static TClass * GetClass(Bool_t load=kTRUE, Bool_t silent=kFALSE)
virtual Int_t GetEntries() const
const char * AsSQLString() 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)
Bool_t Defined(const char *name) const
TObject * FindObject(const char *name) const override
TObject * At(Int_t idx) const override
virtual void SetTitle(const char *title="")
const char * GetName() const override
const char * GetTitle() const override
virtual void SetName(const char *name)
const char * Data() const
void Form(const char *fmt,...)
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const char *s1, const char *s2)
Bool_t cd(const char *path)
virtual int Chmod(const char *file, UInt_t mode)
virtual const char * DirName(const char *pathname)
virtual char * ConcatFileName(const char *dir, const char *name)
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
virtual Int_t Exec(const char *shellcmd)
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
virtual const char * BaseName(const char *pathname)
virtual Bool_t IsAbsoluteFileName(const char *dir)
double min(double x, double y)
double max(double x, double y)