KaliVeda
Toolkit for HIC analysis
KVExpDB.cpp
1 //Created by KVClassFactory on Tue Jul 12 11:43:52 2016
2 //Author: bonnet,,,
3 
4 #include "KVExpDB.h"
5 #include "KVDBSystem.h"
6 #include "KVNumberList.h"
7 #include "TSystem.h"
8 #include <KVFileReader.h>
9 #include <iostream>
10 #include "KVUnownedList.h"
11 using namespace std;
12 
13 KVExpDB* gExpDB = nullptr;
14 
16 
17 
18 
21 void KVExpDB::init()
22 {
23  //default initialisations
24 
25  fRuns = AddTable("Runs", "List of available runs");
26  fRuns->SetDefaultFormat("Run %d"); // default format for run names
27  fSystems = AddTable("Systems", "List of available systems");
28  index_multiplier = KVBase::GetDataSetEnv(fDataSet, "DataSet.RunFileIndexMultiplier.raw", 1);
29  with_index_multiplier = index_multiplier != 1;
30  raw_files_have_index = KVBase::GetDataSetEnv(fDataSet, "DataSet.RunFileName.raw", "").Contains("%I");
31 }
32 
33 
34 
37 
39  : KVDataBase()
40 {
41  // Default constructor
42 }
43 
44 
45 
46 
49 
51  : KVDataBase(name), fDataSet(name)
52 {
53  // Constructor inherited from KVDataBase
54  init();
55 }
56 
57 
58 
59 
62 
63 KVExpDB::KVExpDB(const Char_t* name, const Char_t* title)
64  : KVDataBase(name, title), fDataSet(name)
65 {
66  // Constructor inherited from KVDataBase
67  init();
68 }
69 
70 
71 
72 
75 
77 {
78  // Destructor
79  if (gExpDB == this) gExpDB = nullptr;
80 }
81 
82 
83 
89 
91  UInt_t last_run)
92 {
93  //If the KVDBRecord 'rec' (i.e. set of calibration parameters, reaction system, etc.) is
94  //associated to, or valid for, a range of runs, we use this method in order to link the record
95  //and the runs. The list of associated runs will be kept with the record, and each of the runs
96  //will have a link to the record.
97 
98  std::map<int,int> one_shot;//make sure each run is only linked once
99  for (UInt_t ii = first_run; ii <= last_run; ii++) {
100  Int_t rr = ii;
102  if(!one_shot[rr]) LinkRecordToRun(rec, ii);
103  ++one_shot[rr];
104  }
105 }
106 
107 
113 
115 {
116  //If the KVDBRecord 'rec' (i.e. set of calibration parameters, reaction system, etc.) is
117  //associated to, or valid for, a range of runs, we use this method in order to link the record
118  //and the runs. The list of associated runs will be kept with the record, and each of the runs
119  //will have a link to the record.
120  nl.Begin();
121  std::map<int,int> one_shot;//make sure each run is only linked once
122  while (!nl.End()) {
123  Int_t rr = nl.Next();
125  if(!one_shot[rr]) LinkRecordToRun(rec, rr);
126  ++one_shot[rr];
127  }
128 }
129 
130 
131 
133 
135 {
136 
137  KVDBRecord* run = 0;
138  if ((run = fRuns->GetRecord(rnumber)))
139  rec->AddLink("Runs", run);
140 
141 }
142 
143 
144 
152 
154  UInt_t run_ranges[][2])
155 {
156  //Call LinkRecordToRunRange for a set of run ranges stored in the two-dimensional array
157  //in the following way:
158  // run_ranges[0][0] = first run of first run range
159  // run_ranges[0][1] = last run of first run range
160  // run_ranges[1][0] = first run of second run range etc. etc.
161  //rr_number is the number of run ranges in the array
162 
163  for (UInt_t i = 0; i < rr_number; i++) {
164  LinkRecordToRunRange(rec, run_ranges[i][0], run_ranges[i][1]);
165  }
166 }
167 
168 
169 
172 
174  UInt_t run_ranges[][2])
175 {
176  //Link the records contained in the list to the set of runs (see LinkRecordToRunRanges).
177 
178  if (!list) {
179  Error("LinkListToRunRanges",
180  "NULL pointer passed for parameter TList");
181  return;
182  }
183  if (list->GetSize() == 0) {
184  Error("LinkListToRunRanges(TList*,UInt_t,UInt_t*)",
185  "The list is empty");
186  return;
187  }
188  TIter next(list);
189  KVDBRecord* rec;
190  while ((rec = (KVDBRecord*) next())) {
191  LinkRecordToRunRanges(rec,rr_number,run_ranges);
192  }
193 }
194 
195 
198 
200 {
201  //Link the records contained in the list to the set of runs (see LinkRecordToRunRanges).
202 
203  if (!list) {
204  Error("LinkListToRunRange",
205  "NULL pointer passed for parameter TList");
206  return;
207  }
208  if (list->GetSize() == 0) {
209  Error("LinkListToRunRange(TList*,KVNumberList)",
210  "The list is empty");
211  return;
212  }
213  TIter next(list);
214  KVDBRecord* rec;
215  while ((rec = (KVDBRecord*) next())) {
217  }
218 }
219 
220 
221 
247 
249 {
250  //Reads list of systems with associated run ranges, creates KVDBSystem
251  //records for these systems, and links them to the appropriate KVDBRun
252  //records using LinkListToRunRanges.
253  //
254  //There are 2 formats for the description of systems:
255  //
256  //+129Xe + natSn 25 MeV/A '+' indicates beginning of system description
257  //129 54 119 50 0.1 25.0 A,Z of projectile and target, target thickness (mg/cm2), beam energy (MeV/A)
258  //Run Range : 614 636 runs associated with system
259  //Run Range : 638 647 runs associated with system
260  //
261  //This is sufficient in the simple case where the experiment has a single
262  //layer target oriented perpendicular to the beam. However, for more
263  //complicated targets we can specify as follows :
264  //
265  //+155Gd + 238U 36 MeV/A
266  //155 64 238 92 0.1 36.0
267  //Target : 3 0.0 target with 3 layers, angle 0 degrees
268  //C 0.02 1st layer : carbon, 20 g/cm2
269  //238U 0.1 2nd layer : uranium-238, 100 g/cm2
270  //C 0.023 3rd layer : carbon, 23 g/cm2
271  //Run Range : 770 804
272  //
273  //Lines beginning '#' are comments.
274 
275 
276  std::ifstream fin;
277  if (OpenCalibFile("Systems", fin)) {
278  Info("ReadSystemList()", "Reading Systems parameters ...");
279 
280  TString line;
281 
282  char next_char = fin.peek();
283  while (next_char != '+' && fin.good()) {
284  line.ReadLine(fin, kFALSE);
285  next_char = fin.peek();
286  }
287 
288  while (fin.good() && !fin.eof() && next_char == '+') {
289  KVDBSystem* sys = new KVDBSystem("NEW SYSTEM");
290  AddSystem(sys);
291  sys->Load(fin,index_multiplier);
292  next_char = fin.peek();
293  }
294  fin.close();
295  }
296  else {
297  Error("ReadSystemList()", "Could not open file %s",
298  GetCalibFileName("Systems").Data());
299  }
300  // if any runs are not associated with any system
301  // we create an 'unknown' system and associate it to all runs
302  KVDBSystem* sys = 0;
303  TIter nextRun(GetRuns());
304  KVDBRun* run;
305  while ((run = (KVDBRun*)nextRun())) {
306  if (!run->GetSystem()) {
307  if (!sys) {
308  sys = new KVDBSystem("[unknown]");
309  AddSystem(sys);
310  }
311  sys->AddRun(run);
312  }
313  }
314 
315  // rehash the record table now that all names are set
316  fSystems->Rehash();
317 }
318 
319 
320 
327 
329 {
330  //Write the 'Systems.dat' file for this database.
331  //The actual name of the file is given by the value of the environment variable
332  //[dataset_name].INDRADB.Systems (if it exists), otherwise the value of
333  //INDRADB.Systems is used. The file is written in the
334  //$KVROOT/[dataset_directory] directory.
335 
336  ofstream sysfile;
337  KVBase::SearchAndOpenKVFile(GetDBEnv("Systems"), sysfile, fDataSet.Data());
338  TIter next(GetSystems());
339  KVDBSystem* sys;
340  TDatime now;
341  sysfile << "# " << GetDBEnv("Systems") << " file written by "
342  << ClassName() << "::WriteSystemsFile on " << now.AsString() << endl;
343  cout << GetDBEnv("Systems") << " file written by "
344  << ClassName() << "::WriteSystemsFile on " << now.AsString() << endl;
345  while ((sys = (KVDBSystem*)next())) {
346  if (strcmp(sys->GetName(), "[unknown]")) { //do not write dummy 'unknown' system
347  sys->Save(sysfile);
348  sysfile << endl;
349  }
350  }
351  sysfile.close();
352 }
353 
354 
355 
360 
361 void KVExpDB::Save(const Char_t* what)
362 {
363  //Save (in the appropriate text file) the informations on:
364  // what = "Systems" : write Systems.dat file
365  // what = "Runlist" : write Runlist.csv
366  if (!strcmp(what, "Systems")) WriteSystemsFile();
367  else if (!strcmp(what, "Runlist")) WriteRunListFile();
368 }
369 
370 
371 
372 
380 
382 {
383  //Write a file containing a line describing each run in the database.
384  //The delimiter symbol used in each line is '|' by default.
385  //The first line of the file will be a header description, given by calling
386  //KVDBRun::WriteRunListHeader() for the first run in the database.
387  //Then we call KVDBRun::WriteRunListLine() for each run.
388  //These are virtual methods redefined by child classes of KVDBRun.
389 
390  ofstream rlistf;
391  KVBase::SearchAndOpenKVFile(GetDBEnv("Runlist"), rlistf, fDataSet.Data());
392  TDatime now;
393  rlistf << "# " << GetDBEnv("Runlist") << " file written by "
394  << ClassName() << "::WriteRunListFile on " << now.AsString() << endl;
395  cout << GetDBEnv("Runlist") << " file written by "
396  << ClassName() << "::WriteRunListFile on " << now.AsString() << endl;
397  if (GetRuns() && GetRuns()->GetEntries() > 0) {
398  TIter next_run(GetRuns());
399  //write header in file
400  ((KVDBRun*) GetRuns()->At(0))->WriteRunListHeader(rlistf, GetDBEnv("Runlist.Separator")[0]);
401  KVDBRun* run;
402  while ((run = (KVDBRun*) next_run())) {
403 
404  run->WriteRunListLine(rlistf, GetDBEnv("Runlist.Separator")[0]);
405 
406  }
407  }
408  else {
409  Warning("WriteRunListFile()", "run list is empty !!!");
410  }
411  rlistf.close();
412 }
413 
414 
415 
431 
432 Bool_t KVExpDB::OpenCalibFile(const Char_t* type, ifstream& fs) const
433 {
434  //Find and open calibration parameter file of given type. Return kTRUE if all OK.
435  //types are defined in $KVROOT/KVFiles/.kvrootrc by lines such as (use INDRA as example)
436  //
437  //# Default name for file describing systems for each dataset.
438  //INDRADB.Systems: Systems.dat
439  //
440  //A file with the given name will be looked for in the dataset calibration file
441  //directory given by GetDataSetDir()
442  //
443  //Filenames specific to a given dataset may also be defined:
444  //
445  //INDRA_camp5.INDRADB.Pedestals: Pedestals5.dat
446  //
447  //where 'INDRA_camp5' is the name of the dataset in question.
448 
450 }
451 
452 
453 
485 
486 Bool_t KVExpDB::FindCalibFile(const Char_t* type, TString& fullpath, const TString& array_name) const
487 {
488  //Find calibration parameter file of given type. Return kTRUE if all OK.
489  //In this case fullpath contains the full path to the file.
490  //
491  //Types are defined in $KVROOT/KVFiles/.kvrootrc by lines such as (use INDRA as example)
492  //
493  //~~~~
494  //# Default name for file describing systems for each dataset.
495  //INDRADB.Systems: Systems.dat
496  //~~~~
497  //
498  //A file with the given name will be looked for in the dataset calibration file
499  //directory given by GetDataSetDir()
500  //
501  //Filenames specific to a given dataset may also be defined:
502  //
503  //~~~~
504  //INDRA_camp5.INDRADB.Pedestals: Pedestals5.dat
505  //~~~~
506  //
507  //where 'INDRA_camp5' is the name of the dataset in question.
508  //
509  //If 'array_name' is given and no file is found with this filename,
510  //we try looking for a file called 'array_name.filename', i.e. if a filename
511  //
512  //~~~~
513  //INDRADB.Pressures: ChIoPressures.dat
514  //~~~~
515  //
516  //is defined, but no ChIoPressures.dat file exists for the dataset, if array_name="INDRA"
517  //then we look for a file called INDRA.ChIoPressures.dat
518 
519  auto cal_file_name = GetCalibFileName(type);
520  if (cal_file_name.IsNull()) return kFALSE;
521  if (KVBase::SearchKVFile(cal_file_name, fullpath, GetDataSetDir()))
522  return kTRUE;
523  if (!array_name.IsNull()) {
524  cal_file_name.Prepend(Form("%s.", array_name.Data()));
525  return KVBase::SearchKVFile(cal_file_name, fullpath, GetDataSetDir());
526  }
527  return kFALSE;
528 }
529 
530 
531 
532 
545 
547 {
548  // Print compact listing of runs in the number list like this:
549  //
550  // root [9] gIndraDB->PrintRuns("8100-8120")
551  // RUN SYSTEM TRIGGER EVENTS COMMENTS
552  // ------------------------------------------------------------------------------------------------------------------
553  // 8100 129Xe + 58Ni 8 MeV/A M>=2 968673
554  // 8101 129Xe + 58Ni 8 MeV/A M>=2 969166
555  // 8102 129Xe + 58Ni 8 MeV/A M>=2 960772
556  // 8103 129Xe + 58Ni 8 MeV/A M>=2 970029
557  // 8104 129Xe + 58Ni 8 MeV/A M>=2 502992 disjonction ht chassis 1
558  // 8105 129Xe + 58Ni 8 MeV/A M>=2 957015 intensite augmentee a 200 pA
559 
560  printf("RUN\tSYSTEM\t\t\t\tTRIGGER\t\tEVENTS\t\tCOMMENTS\n");
561  printf("------------------------------------------------------------------------------------------------------------------\n");
562  nl.Begin();
563  while (!nl.End()) {
564  KVDBRun* run = GetDBRun(nl.Next());
565  if (!run) continue;
566  printf("%4d\t%-30s\t%s\t\t%llu\t\t%s\n",
567  run->GetNumber(), (run->GetSystem() ? run->GetSystem()->GetName() : " "), run->GetTriggerString(),
568  run->GetEvents(), run->GetComments());
569  }
570 }
571 
572 
573 
575 
577 {
578  gExpDB = this;
579 }
580 
581 
582 
583 
597 
598 KVExpDB* KVExpDB::MakeDataBase(const Char_t* name, const Char_t* datasetdir)
599 {
600  //Static function which will create and 'Build' the database object corresponding to 'name'
601  //These are defined as 'Plugin' objects in the file $KVROOT/KVFiles/.kvrootrc :
602  //
603  // Plugin.KVExpDB: INDRA_camp1 KVDataBase1 KVIndra "KVDataBase1()"
604  // +Plugin.KVExpDB: INDRA_camp2 KVDataBase2 KVIndra "KVDataBase2()"
605  // +Plugin.KVExpDB: INDRA_camp4 KVDataBase4 KVIndra "KVDataBase4()"
606  // +Plugin.KVExpDB: INDRA_camp5 KVDataBase5 KVIndra5 "KVDataBase5()"
607  //
608  //The 'name' ("INDRA_camp1" etc.) corresponds to the name of a dataset in $KVROOT/KVFiles/manip.list
609  //This name is stored in member variable fDataSet.
610  //The constructors/macros used have arguments (const Char_t* name)
611 
612  //does plugin exist for given name ?
613  TPluginHandler* ph;
614  if (!(ph = KVBase::LoadPlugin("KVExpDB", name))) {
615  return 0;
616  }
617  //execute constructor/macro for database
618  KVExpDB* mda = (KVExpDB*) ph->ExecPlugin(1, name);
619  mda->SetDataSetDir(datasetdir);
620 
621  mda->Build();
622 
623  return mda;
624 }
625 
626 
627 
631 
632 ULong64_t KVExpDB::GetTotalEvents(int first_run, int last_run) const
633 {
634  // Return total number of events in range [first_run,last_run]
635  // (if last_run=-1, go to last known run)
636 
637  ULong64_t total = 0;
638  TIter next(GetRuns());
639  KVDBRun* dbr;
640  while ((dbr = (KVDBRun*)next())) {
641  if (dbr->GetNumber() >= first_run) {
642  if ((last_run > 0 && dbr->GetNumber() <= last_run)
643  || last_run == -1) total += dbr->GetEvents();
644  }
645  }
646  return total;
647 }
648 
649 
650 
653 
655 {
656  // Return total number of events for given system
657 
658  if (!GetSystem(system)) {
659  Error("GetTotalEvents", "No system with name : %s", system.Data());
660  return 0;
661  }
662  TIter it(GetSystem(system)->GetRuns());
663  ULong64_t total = 0;
664  KVDBRun* dbr;
665  while ((dbr = (KVDBRun*)it())) {
666  total += dbr->GetEvents();
667  }
668  return total;
669 }
670 
671 
672 
673 
678 
679 TString KVExpDB::GetDBEnv(const Char_t* type) const
680 {
681  //Will look for gEnv->GetValue name "name_of_dataset.fDBType.type",
682  //then "fDBType.type" if no dataset-specific value is found,
683  //then "EXPDB.type" if no database-specific value is found
684 
685  if (fDataSet == "") return "";
686  auto p = KVBase::GetDataSetEnv(fDataSet, Form("%s.%s", fDBType.Data(), type), "");
687  if (!p.Length()) return KVBase::GetDataSetEnv(fDataSet, Form("EXPDB.%s", type), "");
688  return p;
689 }
690 
691 
692 
704 
706 {
707  // Looks for file with name given by one of the following variables:
708  //
709  // [DBtype].Comments
710  // [dataset].[DBtype].Comments
711  //
712  // and opens it to read and add comments on runs.
713  // Format of file is:
714  //
715  // run=3830-3836 | really amazing data in these runs
716  //
717 
718  TString comments_file = GetCalibFileName("Comments");
719  if (comments_file == "") return;
720  TString fullpath;
721  if (!FindCalibFile("Comments", fullpath)) return;
722  Info("ReadComments", "Reading run comments in file %s...", fullpath.Data());
723 
724  KVFileReader fr;
725  if (!fr.OpenFileToRead(fullpath)) {
726  Error("ReadComments", "Problem opening file %s", fullpath.Data());
727  return;
728  }
729 
730  while (fr.IsOK()) {
731  fr.ReadLine("|");
732  if (fr.GetCurrentLine().BeginsWith("#")) {
733 
734  }
735  else if (fr.GetCurrentLine() == "") {
736 
737  }
738  else {
739  if (fr.GetNparRead() == 2) {
740  KVString srun(fr.GetReadPar(0));
741  srun.Begin("=");
742  srun.Next();
743  KVNumberList lruns(srun.Next());
744  KVString comments(fr.GetReadPar(1));
745  lruns.Begin();
746  while (!lruns.End()) {
747  Int_t run = lruns.Next()/index_multiplier;
748  KVDBRun* dbrun = GetDBRun(run);
749  if (dbrun)
750  dbrun->SetComments(comments.Data());
751  }
752  }
753  }
754  }
755 }
756 
757 
758 
int Int_t
unsigned int UInt_t
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
constexpr Bool_t kTRUE
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize fs
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 name[80]
char * Form(const char *fmt,...)
static ValType GetDataSetEnv(const KVString &dataset, const KVString &type, const ValType &defval)
Definition: KVBase.h:304
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
Definition: KVBase.cpp:517
static Bool_t SearchAndOpenKVFile(const Char_t *name, KVSQLite::database &dbfile, const Char_t *kvsubdir="")
Definition: KVBase.cpp:628
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
Definition: KVBase.cpp:772
Record folder for the database.
Definition: KVDBRecord.h:43
virtual Int_t GetNumber() const
Definition: KVDBRecord.h:73
Description of an experimental run in database ,,.
Definition: KVDBRun.h:40
ULong64_t GetEvents() const
Definition: KVDBRun.h:155
void SetComments(const KVString &comments)
Definition: KVDBRun.h:230
KVDBSystem * GetSystem() const
Definition: KVDBRun.cpp:237
virtual void WriteRunListLine(std::ostream &, Char_t delim='|') const
Definition: KVDBRun.cpp:91
const Char_t * GetTriggerString() const
Definition: KVDBRun.h:211
const Char_t * GetComments() const
Definition: KVDBRun.h:221
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:52
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:276
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:469
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:324
void Rehash(void)
Definition: KVDBTable.cpp:172
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Definition: KVDBTable.h:58
Simple cross-referenced database structure.
Definition: KVDataBase.h:137
Base class to describe database of an experiment ,,.
Definition: KVExpDB.h:20
void AddSystem(KVDBSystem *r)
Definition: KVExpDB.h:118
virtual void Build()
Definition: KVExpDB.h:168
virtual ~KVExpDB()
Destructor.
Definition: KVExpDB.cpp:76
virtual KVDBSystem * GetSystem(const Char_t *system) const
Definition: KVExpDB.h:109
virtual void ReadComments()
Definition: KVExpDB.cpp:705
virtual void ReadSystemList()
Definition: KVExpDB.cpp:248
virtual void cd()
Definition: KVExpDB.cpp:576
KVDBTable * fRuns
table of runs
Definition: KVExpDB.h:28
virtual void LinkRecordToRun(KVDBRecord *rec, Int_t run)
Definition: KVExpDB.cpp:134
KVDBRun * GetDBRun(Int_t number) const
Definition: KVExpDB.h:89
virtual KVSeqCollection * GetRuns() const
Definition: KVExpDB.h:85
TString GetCalibFileName(const Char_t *type) const
Definition: KVExpDB.h:133
virtual void LinkListToRunRanges(TList *list, UInt_t rr_number, UInt_t run_ranges[][2])
Link the records contained in the list to the set of runs (see LinkRecordToRunRanges).
Definition: KVExpDB.cpp:173
KVDBTable * fSystems
table of systems
Definition: KVExpDB.h:29
virtual void PrintRuns(KVNumberList &) const
Definition: KVExpDB.cpp:546
ULong64_t GetTotalEvents(int first_run, int last_run=-1) const
Definition: KVExpDB.cpp:632
virtual KVSeqCollection * GetSystems() const
Definition: KVExpDB.h:113
virtual void Save(const Char_t *)
Definition: KVExpDB.cpp:361
TString fDBType
used by GetDBEnv
Definition: KVExpDB.h:25
virtual void LinkRecordToRunRanges(KVDBRecord *rec, UInt_t rr_number, UInt_t run_ranges[][2])
Definition: KVExpDB.cpp:153
virtual void LinkListToRunRange(TList *list, const KVNumberList &nl)
Link the records contained in the list to the set of runs (see LinkRecordToRunRanges).
Definition: KVExpDB.cpp:199
void WriteSystemsFile() const
Definition: KVExpDB.cpp:328
KVExpDB()
Default constructor.
Definition: KVExpDB.cpp:38
const Char_t * GetDataSetDir() const
Definition: KVExpDB.h:160
void init()
default initialisations
Definition: KVExpDB.cpp:21
virtual void LinkRecordToRunRange(KVDBRecord *rec, UInt_t first_run, UInt_t last_run)
Definition: KVExpDB.cpp:90
int index_multiplier
Definition: KVExpDB.h:30
void SetDataSetDir(const Char_t *d)
Definition: KVExpDB.h:164
static KVExpDB * MakeDataBase(const Char_t *name, const Char_t *datasetdir)
Definition: KVExpDB.cpp:598
void WriteRunListFile() const
Definition: KVExpDB.cpp:381
virtual TString GetDBEnv(const Char_t *) const
Definition: KVExpDB.cpp:679
Bool_t OpenCalibFile(const Char_t *type, std::ifstream &fs) const
Definition: KVExpDB.cpp:432
TString fDataSet
the name of the dataset to which this database is associated
Definition: KVExpDB.h:23
Bool_t FindCalibFile(const Char_t *type, TString &fullpath, const TString &array_name="") const
Definition: KVExpDB.cpp:486
Handle reading columns of numeric data in text files.
Definition: KVFileReader.h:121
KVString GetCurrentLine()
Definition: KVFileReader.h:320
ReadStatus ReadLine(const KVString &pattern="")
Definition: KVFileReader.h:243
Int_t GetNparRead() const
Definition: KVFileReader.h:325
Bool_t IsOK()
Definition: KVFileReader.h:231
KVString GetReadPar(Int_t pos) const
Definition: KVFileReader.h:342
Bool_t OpenFileToRead(const KVString &filename)
Definition: KVFileReader.h:210
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Bool_t End(void) const
Definition: KVNumberList.h:199
void Begin(void) const
Int_t Next(void) const
TObject * At(Int_t idx) const override
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
void Begin(TString delim) const
Definition: KVString.cpp:565
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
virtual Int_t GetSize() const
const char * AsString() const
const char * GetName() const override
virtual const char * ClassName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
Longptr_t ExecPlugin(int nargs)
const char * Data() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t IsNull() const
unsigned long long ULong64_t
TLine * line
rec
ClassImp(TPyArg)