KaliVeda
Toolkit for HIC analysis
KVNameValueList.cpp
1 //Created by KVClassFactory on Tue Jun 29 14:44:22 2010
2 //Author: bonnet
3 
4 #include <utility>
5 #include "KVClassFactory.h"
6 #include "KVNameValueList.h"
7 #include "Riostream.h"
8 #include <KVEnv.h>
9 #include <TROOT.h>
10 
12 
13 using namespace std;
14 
15 //______________________________________________
16 
18 
20  : KVNameValueList("")
21 {
22 }
23 
24 
25 
35 
36 KVNameValueList::KVNameValueList(std::initializer_list<KVNamedParameter> l)
37  : KVNameValueList("")
38 {
39  // Constructor using an initializer list for a given set of KVNamedParameter objects,
40  // i.e. this contructor makes it possible to do:
41  //
42  //~~~~{.cpp}
43  //KVNameValueList list{{"A",1.234},{"B",false},{"C","hello"}};
44  //
45  //KVNameValueList list2 = {{"A",1.234},{"B",false},{"C","hello"}};
46  //~~~~
47 
48  for (auto& p : l) SetValue(p);
49 }
50 
51 
52 
58 
60  : TNamed(name, title)
61 {
62  // Ctor with name & title
63  //
64  // if name contains a comma-separated list of parameter/value pairs,
65  // it will be used to initialise the list (no name set)
67  if (fName.Contains("=") && Set(name)) SetName("");
68 }
69 
70 
71 
74 
76  : TNamed()
77 {
78  // Copy constructor
79  *this = NVL;
80 }
81 
82 
83 
85 
87 {
88  if (&o != this) o.Copy(*this);
89  return (*this);
90 }
91 
92 
93 
117 
119 {
120  // If list contains a comma-separated list of parameter/value pairs
121  //
122  //~~~~~~~~~~~~~~~~~~~
123  //list = "param1=val1,param2=val2,..."
124  //~~~~~~~~~~~~~~~~~~~
125  //
126  // then use it to initialise the parameters of the list, and return true (any existing parameters will be removed).
127  //
128  // If list does not contain at least one '=' character, do nothing and return false.
129  //
130  // ### Note on deduction of parameter types
131  //
132  // The type of each parameter is deduced from the given values, using the following methods
133  // in the following order:
134  //
135  // + string in single quotes => string parameter (e.g. val="'7 9'")
136  // + KVString::IsDigit(val) => integer parameter if true (e.g. val="3" _or_ val="7 9")
137  // + KVString::IsFloat(val) => double parameter if true (e.g. val="3.14e+03")
138  // + all other cases => string parameter
139  //
140  // Note that in the case of the quoted string, the parameter is stored without the
141  // enclosing quotes (i.e. for val="'7 9'" the stored string is "7 9")
142 
143  if (!list.Contains("=")) return false;
144 
145  Clear();
146  list.Begin(",");
147  while (!list.End()) {
148  KVString pair = list.Next(kTRUE);
149  pair.Begin("=");
150  KVString parname = pair.Next(kTRUE);
151  KVString parval = pair.Next(kTRUE);
152  if (parval.BeginsWith("'") && parval.EndsWith("'")) {
153  // quoted string
154  parval.Remove(parval.Length() - 1);
155  parval.Remove(0, 1);
156  SetValue(parname, parval);
157  }
158  else if (parval.IsDigit()) {
159  // integer number
160  SetValue(parname, parval.Atoi());
161  }
162  else if (parval.IsFloat()) {
163  // real number
164  SetValue(parname, parval.Atof());
165  }
166  else {
167  // string
168  SetValue(parname, parval);
169  }
170  }
171  return true;
172 }
173 
174 
175 
184 
186 {
187  // Fill and return a string containing a comma-separated list of the parameter/value pairs
188  //
189  //~~~~~~~~~~~~~~~~~~~
190  //"param1=val1,param2=val2,..."
191  //~~~~~~~~~~~~~~~~~~~
192  //
193  // Such a string can be used with method Set() in order to initialize a copy of this list.
194 
195  KVString list;
196  for (auto& par : *this) {
197  if (list.Length()) list += ",";
198  list += Form("%s=", par.GetName());
199  if (par.IsString())
200  list += par.GetString();
201  else if (par.IsDouble())
202  list += Form("%g", par.GetDouble());
203  else if (par.IsInt())
204  list += Form("%d", par.GetInt());
205  }
206  return list;
207 }
208 
209 
210 
214 
216 {
217  //\return the address of the KVHashList where
218  //parameters are stored with their values
219  return (KVHashList*)&fList;
220 }
221 
222 
223 
228 
230 {
231  // Copy this to the nvl object.
232  //
233  // Any existing parameters will be destroyed
234 
235  TNamed::Copy(nvl);
236  KVNameValueList& _obj = (KVNameValueList&)nvl;
237  fList.Copy(_obj.fList);
238  _obj.fIgnoreBool = fIgnoreBool;
239 }
240 
241 
242 
247 
249 {
250  //Clear all the stored parameters
251  //
252  //Deletes the parameter objects if owner & opt!="nodelete"
253  fList.Clear(opt);
254 }
255 
256 
257 
264 
266 {
267  // Remove from list all parameters whose name matches the regular expression
268  //
269  // Examples:
270  // + remove all parameters starting with "toto": TRegexp sel("^toto")
271  // + remove all parameters with "toto" in name: TRegexp sel("toto")
272 
273  TList toBeRemoved;
274  Int_t np1 = GetNpar();
275  for (Int_t ii = 0; ii < np1; ii += 1) {
276  TString name = GetParameter(ii)->GetName();
277  if (name.Contains(sel)) toBeRemoved.Add(new TNamed(name.Data(), ""));
278  }
279  if (toBeRemoved.GetEntries()) {
280  TIter next(&toBeRemoved);
281  TNamed* tbr;
282  while ((tbr = (TNamed*)next())) RemoveParameter(tbr->GetName());
283  toBeRemoved.Delete();
284  }
285 }
286 
287 
288 
294 
296 {
297  // Print stored parameters (name, and value)
298  //
299  // \param[in] opt can be used to select type of parameters to print: `int`, `double`, `string`, `64bit`.
300  // If you want to exclude 1 or more parameters, add `|name1,name2,...` after the type
301 
302  if (!GetNpar()) return;
303 
305  if (TString(GetName()) != "" || TString(GetTitle()) != "")
306  cout << "KVNameValueList::" << GetName() << " : " << GetTitle() << " (" << this << ")" << endl;
307  KVString _options(opt);
308  _options.Begin("|");
309  auto option = _options.Next();
310  KVString exclude;
311  if (!_options.End()) exclude = _options.Next();
312  if (option == "64bit") {
314  for (Int_t ii = 0; ii < GetNpar(); ++ii) {
315  TString n(GetNameAt(ii));
316  if (n.EndsWith("_lo") || n.EndsWith("_hi")) {
317  n.Remove(n.Length() - 3, 3);
318  if (!exclude.Contains(n)) {
320  std::cout << n << "=" << GetValue64bit(n) << std::endl;
321  }
322  ++ii;
323  }
324  }
326  return;
327  }
329  for (Int_t ii = 0; ii < GetNpar(); ii += 1) {
330  GetParameter(ii)->ls(option);
331  }
333 }
334 
335 
336 
338 
340 {
341  if (TString(GetName()) != "") cout << GetName();
342  else cout << "KVNameValueList";
343  cout << " : ";
344  for (int i = 0; i < GetNpar(); ++i) {
345  cout << GetParameter(i)->GetName() << "=";
346  switch (GetParameter(i)->GetType()) {
348  cout << GetParameter(i)->GetDouble();
349  break;
351  cout << GetParameter(i)->GetInt();
352  break;
354  cout << GetParameter(i)->GetString();
355  break;
357  cout << boolalpha << GetParameter(i)->GetBool();
358  break;
359  }
360  if (i < GetNpar() - 1) cout << ",";
361  }
362  cout << endl;
363 }
364 
365 
366 
370 
372 {
373  // Compare the contents of two KVNameValueList
374  // Returns the number of same parameters (name and value)
375 
376  KVNameValueList* nvl = (KVNameValueList*)obj;
377  Int_t neq = 0;
378  Int_t np1 = GetNpar();
379  Int_t np2 = nvl->GetNpar();
380  for (Int_t ii = 0; ii < np1; ii += 1) {
381  for (Int_t jj = 0; jj < np2; jj += 1) {
382 
383  if (*(GetParameter(ii)) == *(GetParameter(jj))) neq += 1;
384  }
385  }
386  return neq;
387 
388 }
389 
390 
391 
394 
396 {
397  // add (or replace) a parameter with the same name, type & value as 'p'
398 
400  par ? par->Set(p.GetName(), p) : fList.Add(new KVNamedParameter(p));
401 
402 }
403 
404 
405 
409 
411 {
412  // Store a 64-bit integer in the list as two 32-bit parameters with
413  // names 'name_up' and 'name_lo'
414 
415  TString parname = name;
416  parname += "_hi";
417  SetValue(parname, (Int_t)(x >> 32));
418  parname = name;
419  parname += "_lo";
420  SetValue(parname, (Int_t)((x << 32) >> 32));
421 }
422 
423 
424 
428 
430 {
431  // Return a 64-bit integer stored as two 32-bit parameters with
432  // names 'name_up' and 'name_lo'
433 
434  ULong64_t lo, hi;
435  TString parname = name;
436  parname += "_lo";
437  lo = (UInt_t)GetIntValue(parname);
438  parname = name;
439  parname += "_hi";
440  hi = (UInt_t)GetIntValue(parname);
441  ULong64_t x = (ULong64_t)((hi << 32) + lo);
442  return x;
443 }
444 
445 
446 
450 
452 {
453  // Returns kTRUE if 'name' is stored as a 64-bit value i.e. if
454  // integer parameters 'name_lo' and 'name_hi' are defined
455 
456  TString parname_hi = name;
457  parname_hi += "_hi";
458  TString parname_lo = name;
459  parname_lo += "_lo";
460  return (HasIntParameter(parname_hi) && HasIntParameter(parname_lo));
461 }
462 
463 
464 
470 
472 {
473  // if a parameter with the same name & type as 'p' exists,
474  // add numerical value of p to value of parameter in list,
475  // or for strings we add to a comma-separated list of strings.
476  // otherwise, add a copy of p to list
478  par ? par->Add(p) : fList.Add(new KVNamedParameter(p));
479 }
480 
481 
482 
488 
490 {
491  // Format all values in list as an SQL selection string:
492  //~~~
493  // name1 = val1 AND name2 = val2 AND ...
494  //~~~
495 
496  TString select;
497  for (auto& p : *this) {
498  if (select.Length())
499  select += " AND ";
500  select += p.AsSQLSelection();
501  }
502  return select;
503 }
504 
505 
506 
509 
511 {
512  //return the parameter object with the asking name
514 }
515 
516 
517 
520 
522 {
523  //return the parameter object with index idx
524  return (KVNamedParameter*)fList.At(idx);
525 }
526 
527 
528 
532 
534 {
535  //remove parameter from the list,
536  //Warning the TNamed object associated is deleted
537 
539  if (par) {
540  fList.Remove(par);
541  delete par;
542  }
543 }
544 
545 
546 
552 
554 {
555  //Check if there is a parameter with the asked name
556  //in the list
557  //kTRUE, parameter already present
558  //kFALSE, if not
559  return (FindParameter(name) != nullptr);
560 }
561 
562 
563 
568 
570 {
571  //return the position in the list of a given parameter
572  //using its name
573  //return -1 if no parameter with such name are present
574 
575  TObject* par = 0;
576  Int_t idx = 0;
577  TIter next(&fList);
578  while ((par = next())) {
579  if (!strcmp(par->GetName(), name)) return idx;
580  idx++;
581  }
582  Error("GetNameIndex", "Parameter \"%s\" not found, -1 returned", name);
583  return -1;
584 }
585 
586 
587 
593 
595 {
596  //return the name of the parameter store at the idx position
597  //in the list
598  //if the idx is greater than the number of stored parameters
599  //return empty string
600 
601  if (idx >= GetNpar()) {
602  Error("GetNameAt", "index has to be less than %d, empty string is returned", GetNpar());
603  return "";
604  }
605  return fList.At(idx)->GetName();
606 }
607 
608 
609 
614 
616 {
617  //return the value in TString format
618  //for a parameter using its name
619  //return string "-1" if no parameter with such name are present
620 
622  if (!par) {
623  Error("GetStringValue(const Char_t*)", "\"%s\" does not correspond to an existing parameter, default value \"-1\" is returned", name);
624  return "-1";
625  }
626  return par->GetTString();
627 }
628 
629 
630 
633 
635 {
636  //return the number of stored parameters
637  return fList.GetEntries();
638 }
639 
640 
641 
646 
648 {
649  //return the value in string format
650  //for a parameter using its position
651  //return -1 idx is greater than the number of stored parameters
652  static TString tmp("-1");
653  if (idx >= GetNpar()) {
654  Error("GetStringValue(Int_t)", "index has to be less than %d, \"-1\" is returned\n", GetNpar());
655  return tmp;
656  }
657  return GetParameter(idx)->GetTString();
658 }
659 
660 
661 
678 
680 {
681  // Read all name-value pairs in the TEnv format file and store in list.
682  // Clears any previously stored values.
683  //
684  // values are read as strings from the TEnv and we use
685  // TString::IsDigit, TString::IsFloat to decide whether to store
686  // them as integers, floats, or strings.
687  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
688  // (to disable this feature and read such values as strings, call
689  // SetIgnoreBool(kTRUE))
690  //
691  // Special case:
692  // if the parameter name contains the string NumberList
693  // then we store the value string as is, as in this case
694  // it is assumed to be the string representation of a
695  // KVNumberList (easily confused with floating point numbers)
696 
697  Clear();
698  KVEnv env_file;
699  Int_t status = env_file.ReadFile(filename, kEnvAll);
700  if (status == -1) {
701  Error("ReadEnvFile", "The file %s does not exist", filename);
702  return;
703  }
704  ReadEnv(env_file);
705 }
706 
707 
708 
725 
726 void KVNameValueList::ReadEnv(const TEnv& env_file)
727 {
728  // Read all name-value pairs in the TEnv format file and store in list.
729  // Clears any previously stored values.
730  //
731  // Values are read as strings from the TEnv and we use
732  // TString::IsDigit(), TString::IsFloat() to decide whether to store
733  // them as integers, floats, or strings.
734  //
735  // Booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
736  // (to disable this feature and read such values as strings, call
737  // SetIgnoreBool(kTRUE))
738  //
739  // \note if the parameter name contains the string NumberList
740  // then we store the value string as is, as in this case
741  // it is assumed to be the string representation of a
742  // KVNumberList (easily confused with floating point numbers)
743 
744  Clear();
745  THashList* name_value_list = env_file.GetTable();
746  TIter next_nv(name_value_list);
747  TEnvRec* nv_pair;
748  while ((nv_pair = (TEnvRec*)next_nv())) {
749  TString parname(nv_pair->GetName());
750  if (parname == "KVNameValueList.Name") SetName(nv_pair->GetValue());
751  else if (parname == "KVNameValueList.Title") SetTitle(nv_pair->GetValue());
752  else if (parname.Contains("NumberList")) SetValue(parname, nv_pair->GetValue());
753  else {
754  TString parval(nv_pair->GetValue());
755  if (parval.IsDigit()) SetValue(parname, parval.Atoi());
756  else if (parval.IsFloat()) SetValue(parname, parval.Atof());
757  else {
758  TString PARVAL(parval);
759  PARVAL.ToUpper();
760  if (!fIgnoreBool && (PARVAL == "TRUE" || PARVAL == "FALSE" || PARVAL == "ON" || PARVAL == "OFF"
761  || PARVAL == "YES" || PARVAL == "NO" || PARVAL == "OK" || PARVAL == "NOT"))
762  SetValue(parname, (Bool_t)env_file.GetValue(parname, 0));
763  else SetValue(parname, parval);
764  }
765  }
766  }
767 }
768 
769 
770 
773 
774 std::unique_ptr<KVEnv> KVNameValueList::ProduceEnvFile()
775 {
776  // Put all name-value pairs in this list as a TEnv format.
777 
778  auto envfile = std::make_unique<KVEnv>();
779  envfile->SetValue("KVNameValueList.Name", GetName());
780  envfile->SetValue("KVNameValueList.Title", GetTitle());
781  WriteToEnv(envfile.get());
782  return envfile;
783 }
784 
785 
786 
789 
791 {
792  // Write all name-value pairs in this list as a TEnv format file.
793  auto envfile = ProduceEnvFile();
794  envfile->SetRcName(filename);
795  envfile->Save();
796 }
797 
798 
799 
800 
805 
807 {
808  // Concatenate this list with nvl.
809  //
810  // \note Any parameters with the same name in nvl will **replace** the corresponding parameters in this one
811 
812  TIter it(nvl.GetList());
813  KVNamedParameter* par = 0;
814  while ((par = (KVNamedParameter*)it())) SetValue(*par);
815 }
816 
817 
818 
824 
825 void KVNameValueList::WriteClass(const Char_t* classname, const Char_t* classdesc, const Char_t* base_class)
826 {
827  // Generate a class with member variables and `Get`/`Set` methods corresponding
828  // to the names and types of the parameters in the list.
829  //
830  // For booleans we implement methods Isxxxx()/SetIsxxx()
831 
832  KVClassFactory cf(classname, classdesc, base_class);
833  cf.AddGetSetMethods(*this);
834  cf.GenerateCode();
835 }
836 
837 
838 
845 
846 void KVNameValueList::SetFromEnv(TEnv* tenv, const TString& prefix)
847 {
848  // Update the values of any parameters in the KVNameValueList which are found
849  // in the TEnv, optionally using the given prefix.
850  //
851  // Example: if KVNameValueList contains a parameter `Legs` and if `prefix="Large"`,
852  // then if the TEnv contains a value `Large.Legs`, it will be used to update `Legs`
853 
854  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->Set(tenv, prefix);
855 }
856 
857 
858 
859 
863 
864 void KVNameValueList::WriteToEnv(TEnv* tenv, const TString& prefix)
865 {
866  // Write the values of all parameters in the KVNameValueList in the TEnv,
867  // optionally using the given prefix.
868 
869  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->WriteToEnv(tenv, prefix);
870 }
871 
872 
873 
880 
882 {
883  // Merge other list into this one.
884  //
885  // Any parameters in 'other' which do not exist in this one are added to this list.
886  //
887  // Any parameters which exist in both have their values summed (see KVNamedParameter::Add()).
888 
889  for (int i = 0; i < other.GetNpar(); ++i) {
890  KVNamedParameter* np_other = other.GetParameter(i);
891  AddValue(*np_other);
892  }
893 }
894 
895 
906 {
907  if (!GetNpar()) return "{}";
908 
909  TString output = "{";
910  KVString _options(opt);
911  _options.Begin("|");
912  auto option = _options.Next();
913  KVString exclude;
914  if (!_options.End()) exclude = _options.Next();
915  if (option == "64bit") {
916  for (Int_t ii = 0; ii < GetNpar(); ++ii) {
917  TString n(GetNameAt(ii));
918  if (n.EndsWith("_lo") || n.EndsWith("_hi")) {
919  n.Remove(n.Length() - 3, 3);
920  if (!exclude.Contains(n)) {
921  if (output != "{") output += ", ";
922  output += n + "=" + std::to_string(GetValue64bit(n));
923  }
924  ++ii;
925  }
926  }
927  output += "}";
928  return output;
929  }
930  for (Int_t ii = 0; ii < GetNpar(); ii += 1) {
931  if (output != "{") output += ", ";
932  output += GetParameter(ii)->List(option);
933  }
934  output += "}";
935  return output;
936 }
937 
938 
939 
int Int_t
unsigned int UInt_t
bool Bool_t
char Char_t
constexpr Bool_t kTRUE
const char Option_t
kEnvAll
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t option
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 sel
char name[80]
#define hi
char * Form(const char *fmt,...)
Factory class for generating skeleton files for new classes.
void GenerateCode()
Generate header and implementation file for currently-defined class.
void AddGetSetMethods(const KVNameValueList &)
For each named parameter in the list, we add protected member variables with the name and type of the...
Extension of TEnv to allow the writing of comments in the file.
Definition: KVEnv.h:18
Extended version of ROOT THashList.
Definition: KVHashList.h:29
Handles lists of named parameters with different types, a list of KVNamedParameter objects.
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
void Copy(TObject &nvl) const override
Int_t GetIntValue(const Char_t *name) const
Bool_t HasValue64bit(const Char_t *name) const
void SetValue(const Char_t *name, value_type value)
std::unique_ptr< KVEnv > ProduceEnvFile()
Put all name-value pairs in this list as a TEnv format.
void RemoveParameter(const Char_t *name)
void SetValue64bit(const Char_t *name, ULong64_t)
void SetFromEnv(TEnv *tenv, const TString &prefix="")
const Char_t * GetNameAt(Int_t idx) const
void ls(Option_t *opt="") const override
Int_t GetNpar() const
return the number of stored parameters
void ReadEnv(const TEnv &)
virtual void ClearSelection(const TRegexp &)
virtual void ReadEnvFile(const Char_t *filename)
TString List(Option_t *opt="") const
void Concatenate(const KVNameValueList &nvl)
virtual void WriteEnvFile(const Char_t *filename)
Write all name-value pairs in this list as a TEnv format file.
Int_t GetNameIndex(const Char_t *name) const
void Merge(const KVNameValueList &)
KVNamedParameter * FindParameter(const Char_t *name) const
return the parameter object with the asking name
Int_t Compare(const TObject *nvl) const override
KVNameValueList & operator=(const KVNameValueList &)
KVHashList fList
list of KVNamedParameter objects
Bool_t HasIntParameter(const Char_t *name) const
void Clear(Option_t *opt="") override
void WriteClass(const Char_t *classname, const Char_t *classdesc, const Char_t *base_class="")
ULong64_t GetValue64bit(const Char_t *name) const
KVString Get() const
TString AsSQLSelection() const
bool Set(const KVString &)
Bool_t HasParameter(const Char_t *name) const
void Print(Option_t *opt="") const override
void AddValue(const KVNamedParameter &p)
KVHashList * GetList() const
TString GetTStringValue(const Char_t *name) const
void WriteToEnv(TEnv *tenv, const TString &prefix="")
A generic named parameter storing values of different types.
const Char_t * GetString() const
void Set(const char *, const char *)
Int_t GetInt() const
void Add(const KVNamedParameter &p)
Double_t GetDouble() const
void WriteToEnv(TEnv *, const TString &p="")
Write parameter in TEnv, using optional prefix p as "p.[name]".
TString GetTString() const
TString List(Option_t *opt="") const
Bool_t GetBool() const
void ls(Option_t *opt="") const override
void Copy(TObject &obj) const override
TObject * Remove(TObject *obj) override
Remove object from list.
void Add(TObject *obj) override
TObject * FindObject(const char *name) const override
void Clear(Option_t *option="") override
void SetOwner(Bool_t enable=kTRUE) override
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
Bool_t End() const
Definition: KVString.cpp:634
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
virtual Int_t GetEntries() const
const char * GetValue() const
const char * GetName() const override
THashList * GetTable() const
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
void Add(TObject *obj) override
void Delete(Option_t *option="") override
void Copy(TObject &named) const override
virtual void SetTitle(const char *title="")
const char * GetName() const override
const char * GetTitle() const override
TString fName
virtual void SetName(const char *name)
virtual const char * GetName() const
virtual void Error(const char *method, const char *msgfmt,...) const
static Int_t IncreaseDirLevel()
static void IndentLevel()
static Int_t DecreaseDirLevel()
Ssiz_t Length() const
Int_t Atoi() const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Double_t Atof() const
Bool_t IsFloat() const
Bool_t IsDigit() const
void ToUpper()
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
unsigned long long ULong64_t
Double_t x[n]
const Int_t n
Type GetType(const std::string &Name)
TLine l
ClassImp(TPyArg)