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 "KVClassFactory.h"
5 #include "KVNameValueList.h"
6 #include "Riostream.h"
7 #include <KVEnv.h>
8 #include <TROOT.h>
9 
11 
12 using namespace std;
13 
14 //______________________________________________
15 
17 
19  : KVNameValueList("")
20 {
21 }
22 
23 
24 
34 
35 KVNameValueList::KVNameValueList(std::initializer_list<KVNamedParameter> l)
36  : KVNameValueList("")
37 {
38  // Constructor using an initializer list for a given set of KVNamedParameter objects,
39  // i.e. this contructor makes it possible to do:
40  //
41  //~~~~{.cpp}
42  //KVNameValueList list{{"A",1.234},{"B",false},{"C","hello"}};
43  //
44  //KVNameValueList list2 = {{"A",1.234},{"B",false},{"C","hello"}};
45  //~~~~
46 
47  for (auto& p : l) SetValue(p);
48 }
49 
50 
51 
57 
59  : TNamed(name, title)
60 {
61  // Ctor with name & title
62  //
63  // if name contains a comma-separated list of parameter/value pairs,
64  // it will be used to initialise the list (no name set)
66  if(fName.Contains("=") && Set(name)) SetName("");
67 }
68 
69 
70 
73 
75  : TNamed()
76 {
77  // Copy constructor
78  *this = NVL;
79 }
80 
81 
82 
84 
86 {
87  if (&o != this) o.Copy(*this);
88  return (*this);
89 }
90 
91 
92 
116 
118 {
119  // If list contains a comma-separated list of parameter/value pairs
120  //
121  //~~~~~~~~~~~~~~~~~~~
122  //list = "param1=val1,param2=val2,..."
123  //~~~~~~~~~~~~~~~~~~~
124  //
125  // then use it to initialise the parameters of the list, and return true (any existing parameters will be removed).
126  //
127  // If list does not contain at least one '=' character, do nothing and return false.
128  //
129  // ### Note on deduction of parameter types
130  //
131  // The type of each parameter is deduced from the given values, using the following methods
132  // in the following order:
133  //
134  // + string in single quotes => string parameter (e.g. val="'7 9'")
135  // + KVString::IsDigit(val) => integer parameter if true (e.g. val="3" _or_ val="7 9")
136  // + KVString::IsFloat(val) => double parameter if true (e.g. val="3.14e+03")
137  // + all other cases => string parameter
138  //
139  // Note that in the case of the quoted string, the parameter is stored without the
140  // enclosing quotes (i.e. for val="'7 9'" the stored string is "7 9")
141 
142  if (!list.Contains("=")) return false;
143 
144  Clear();
145  list.Begin(",");
146  while (!list.End()) {
147  KVString pair = list.Next(kTRUE);
148  pair.Begin("=");
149  KVString parname = pair.Next(kTRUE);
150  KVString parval = pair.Next(kTRUE);
151  if (parval.BeginsWith("'") && parval.EndsWith("'")) {
152  // quoted string
153  parval.Remove(parval.Length() - 1);
154  parval.Remove(0, 1);
155  SetValue(parname, parval);
156  }
157  else if (parval.IsDigit()) {
158  // integer number
159  SetValue(parname, parval.Atoi());
160  }
161  else if (parval.IsFloat()) {
162  // real number
163  SetValue(parname, parval.Atof());
164  }
165  else {
166  // string
167  SetValue(parname, parval);
168  }
169  }
170  return true;
171 }
172 
173 
174 
183 
185 {
186  // Fill and return a string containing a comma-separated list of the parameter/value pairs
187  //
188  //~~~~~~~~~~~~~~~~~~~
189  //"param1=val1,param2=val2,..."
190  //~~~~~~~~~~~~~~~~~~~
191  //
192  // Such a string can be used with method Set() in order to initialize a copy of this list.
193 
194  KVString list;
195  for (auto& par : *this) {
196  if (list.Length()) list += ",";
197  list += Form("%s=", par.GetName());
198  if (par.IsString())
199  list += par.GetString();
200  else if (par.IsDouble())
201  list += Form("%g", par.GetDouble());
202  else if (par.IsInt())
203  list += Form("%d", par.GetInt());
204  }
205  return list;
206 }
207 
208 
209 
213 
215 {
216  //\return the address of the KVHashList where
217  //parameters are stored with their values
218  return (KVHashList*)&fList;
219 }
220 
221 
222 
227 
229 {
230  // Copy this to the nvl object.
231  //
232  // Any existing parameters will be destroyed
233 
234  TNamed::Copy(nvl);
235  KVNameValueList& _obj = (KVNameValueList&)nvl;
236  fList.Copy(_obj.fList);
237  _obj.fIgnoreBool = fIgnoreBool;
238 }
239 
240 
241 
246 
248 {
249  //Clear all the stored parameters
250  //
251  //Deletes the parameter objects if owner & opt!="nodelete"
252  fList.Clear(opt);
253 }
254 
255 
256 
263 
265 {
266  // Remove from list all parameters whose name matches the regular expression
267  //
268  // Examples:
269  // + remove all parameters starting with "toto": TRegexp sel("^toto")
270  // + remove all parameters with "toto" in name: TRegexp sel("toto")
271 
272  TList toBeRemoved;
273  Int_t np1 = GetNpar();
274  for (Int_t ii = 0; ii < np1; ii += 1) {
275  TString name = GetParameter(ii)->GetName();
276  if (name.Contains(sel)) toBeRemoved.Add(new TNamed(name.Data(), ""));
277  }
278  if (toBeRemoved.GetEntries()) {
279  TIter next(&toBeRemoved);
280  TNamed* tbr;
281  while ((tbr = (TNamed*)next())) RemoveParameter(tbr->GetName());
282  toBeRemoved.Delete();
283  }
284 }
285 
286 
287 
293 
295 {
296  // Print stored parameters (name, and value)
297  //
298  // \param[in] opt can be used to select type of parameters to print: `int`, `double`, `string`, `64bit`.
299  // If you want to exclude 1 or more parameters, add `|name1,name2,...` after the type
300 
301  if (!GetNpar()) return;
302 
304  if (TString(GetName()) != "" || TString(GetTitle()) != "")
305  cout << "KVNameValueList::" << GetName() << " : " << GetTitle() << " (" << this << ")" << endl;
306  KVString _options(opt);
307  _options.Begin("|");
308  auto option = _options.Next();
309  KVString exclude;
310  if (!_options.End()) exclude = _options.Next();
311  if (option == "64bit") {
313  for (Int_t ii = 0; ii < GetNpar(); ++ii) {
314  TString n(GetNameAt(ii));
315  if (n.EndsWith("_lo") || n.EndsWith("_hi")) {
316  n.Remove(n.Length() - 3, 3);
317  if (!exclude.Contains(n)) {
319  std::cout << n << "=" << GetValue64bit(n) << std::endl;
320  }
321  ++ii;
322  }
323  }
325  return;
326  }
328  for (Int_t ii = 0; ii < GetNpar(); ii += 1) {
329  GetParameter(ii)->ls(option);
330  }
332 }
333 
334 
335 
337 
339 {
340  if (TString(GetName()) != "") cout << GetName();
341  else cout << "KVNameValueList";
342  cout << " : ";
343  for (int i = 0; i < GetNpar(); ++i) {
344  cout << GetParameter(i)->GetName() << "=";
345  switch (GetParameter(i)->GetType()) {
347  cout << GetParameter(i)->GetDouble();
348  break;
350  cout << GetParameter(i)->GetInt();
351  break;
353  cout << GetParameter(i)->GetString();
354  break;
356  cout << boolalpha << GetParameter(i)->GetBool();
357  break;
358  }
359  if (i < GetNpar() - 1) cout << ",";
360  }
361  cout << endl;
362 }
363 
364 
365 
369 
371 {
372  // Compare the contents of two KVNameValueList
373  // Returns the number of same parameters (name and value)
374 
375  KVNameValueList* nvl = (KVNameValueList*)obj;
376  Int_t neq = 0;
377  Int_t np1 = GetNpar();
378  Int_t np2 = nvl->GetNpar();
379  for (Int_t ii = 0; ii < np1; ii += 1) {
380  for (Int_t jj = 0; jj < np2; jj += 1) {
381 
382  if (*(GetParameter(ii)) == *(GetParameter(jj))) neq += 1;
383  }
384  }
385  return neq;
386 
387 }
388 
389 
390 
393 
395 {
396  // add (or replace) a parameter with the same name, type & value as 'p'
397 
399  par ? par->Set(p.GetName(), p) : fList.Add(new KVNamedParameter(p));
400 
401 }
402 
403 
404 
408 
410 {
411  // Store a 64-bit integer in the list as two 32-bit parameters with
412  // names 'name_up' and 'name_lo'
413 
414  TString parname = name;
415  parname += "_hi";
416  SetValue(parname, (Int_t)(x >> 32));
417  parname = name;
418  parname += "_lo";
419  SetValue(parname, (Int_t)((x << 32) >> 32));
420 }
421 
422 
423 
427 
429 {
430  // Return a 64-bit integer stored as two 32-bit parameters with
431  // names 'name_up' and 'name_lo'
432 
433  ULong64_t lo, hi;
434  TString parname = name;
435  parname += "_lo";
436  lo = (UInt_t)GetIntValue(parname);
437  parname = name;
438  parname += "_hi";
439  hi = (UInt_t)GetIntValue(parname);
440  ULong64_t x = (ULong64_t)((hi << 32) + lo);
441  return x;
442 }
443 
444 
445 
449 
451 {
452  // Returns kTRUE if 'name' is stored as a 64-bit value i.e. if
453  // integer parameters 'name_lo' and 'name_hi' are defined
454 
455  TString parname_hi = name;
456  parname_hi += "_hi";
457  TString parname_lo = name;
458  parname_lo += "_lo";
459  return (HasIntParameter(parname_hi) && HasIntParameter(parname_lo));
460 }
461 
462 
463 
469 
471 {
472  // if a parameter with the same name & type as 'p' exists,
473  // add numerical value of p to value of parameter in list,
474  // or for strings we add to a comma-separated list of strings.
475  // otherwise, add a copy of p to list
477  par ? par->Add(p) : fList.Add(new KVNamedParameter(p));
478 }
479 
480 
481 
484 
486 {
487  //return the parameter object with the asking name
489 }
490 
491 
492 
495 
497 {
498  //return the parameter object with index idx
499  return (KVNamedParameter*)fList.At(idx);
500 }
501 
502 
503 
507 
509 {
510  //remove parameter from the list,
511  //Warning the TNamed object associated is deleted
512 
514  if (par) {
515  fList.Remove(par);
516  delete par;
517  }
518 }
519 
520 
521 
527 
529 {
530  //Check if there is a parameter with the asked name
531  //in the list
532  //kTRUE, parameter already present
533  //kFALSE, if not
534  return (FindParameter(name) != nullptr);
535 }
536 
537 
538 
543 
545 {
546  //return the position in the list of a given parameter
547  //using its name
548  //return -1 if no parameter with such name are present
549 
550  TObject* par = 0;
551  Int_t idx = 0;
552  TIter next(&fList);
553  while ((par = next())) {
554  if (!strcmp(par->GetName(), name)) return idx;
555  idx++;
556  }
557  Error("GetNameIndex", "Parameter \"%s\" not found, -1 returned", name);
558  return -1;
559 }
560 
561 
562 
568 
570 {
571  //return the name of the parameter store at the idx position
572  //in the list
573  //if the idx is greater than the number of stored parameters
574  //return empty string
575 
576  if (idx >= GetNpar()) {
577  Error("GetNameAt", "index has to be less than %d, empty string is returned", GetNpar());
578  return "";
579  }
580  return fList.At(idx)->GetName();
581 }
582 
583 
584 
589 
591 {
592  //return the value in TString format
593  //for a parameter using its name
594  //return string "-1" if no parameter with such name are present
595 
597  if (!par) {
598  Error("GetStringValue(const Char_t*)", "\"%s\" does not correspond to an existing parameter, default value \"-1\" is returned", name);
599  return "-1";
600  }
601  return par->GetTString();
602 }
603 
604 
605 
608 
610 {
611  //return the number of stored parameters
612  return fList.GetEntries();
613 }
614 
615 
616 
621 
623 {
624  //return the value in string format
625  //for a parameter using its position
626  //return -1 idx is greater than the number of stored parameters
627  static TString tmp("-1");
628  if (idx >= GetNpar()) {
629  Error("GetStringValue(Int_t)", "index has to be less than %d, \"-1\" is returned\n", GetNpar());
630  return tmp;
631  }
632  return GetParameter(idx)->GetTString();
633 }
634 
635 
636 
653 
655 {
656  // Read all name-value pairs in the TEnv format file and store in list.
657  // Clears any previously stored values.
658  //
659  // values are read as strings from the TEnv and we use
660  // TString::IsDigit, TString::IsFloat to decide whether to store
661  // them as integers, floats, or strings.
662  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
663  // (to disable this feature and read such values as strings, call
664  // SetIgnoreBool(kTRUE))
665  //
666  // Special case:
667  // if the parameter name contains the string NumberList
668  // then we store the value string as is, as in this case
669  // it is assumed to be the string representation of a
670  // KVNumberList (easily confused with floating point numbers)
671 
672  Clear();
673  KVEnv env_file;
674  Int_t status = env_file.ReadFile(filename, kEnvAll);
675  if (status == -1) {
676  Error("ReadEnvFile", "The file %s does not exist", filename);
677  return;
678  }
679  ReadEnv(env_file);
680 }
681 
682 
683 
700 
701 void KVNameValueList::ReadEnv(const TEnv& env_file)
702 {
703  // Read all name-value pairs in the TEnv format file and store in list.
704  // Clears any previously stored values.
705  //
706  // Values are read as strings from the TEnv and we use
707  // TString::IsDigit(), TString::IsFloat() to decide whether to store
708  // them as integers, floats, or strings.
709  //
710  // Booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
711  // (to disable this feature and read such values as strings, call
712  // SetIgnoreBool(kTRUE))
713  //
714  // \note if the parameter name contains the string NumberList
715  // then we store the value string as is, as in this case
716  // it is assumed to be the string representation of a
717  // KVNumberList (easily confused with floating point numbers)
718 
719  Clear();
720  THashList* name_value_list = env_file.GetTable();
721  TIter next_nv(name_value_list);
722  TEnvRec* nv_pair;
723  while ((nv_pair = (TEnvRec*)next_nv())) {
724  TString parname(nv_pair->GetName());
725  if (parname == "KVNameValueList.Name") SetName(nv_pair->GetValue());
726  else if (parname == "KVNameValueList.Title") SetTitle(nv_pair->GetValue());
727  else if (parname.Contains("NumberList")) SetValue(parname, nv_pair->GetValue());
728  else {
729  TString parval(nv_pair->GetValue());
730  if (parval.IsDigit()) SetValue(parname, parval.Atoi());
731  else if (parval.IsFloat()) SetValue(parname, parval.Atof());
732  else {
733  TString PARVAL(parval);
734  PARVAL.ToUpper();
735  if (!fIgnoreBool && (PARVAL == "TRUE" || PARVAL == "FALSE" || PARVAL == "ON" || PARVAL == "OFF"
736  || PARVAL == "YES" || PARVAL == "NO" || PARVAL == "OK" || PARVAL == "NOT"))
737  SetValue(parname, (Bool_t)env_file.GetValue(parname, 0));
738  else SetValue(parname, parval);
739  }
740  }
741  }
742 }
743 
744 
745 
748 
749 std::unique_ptr<KVEnv> KVNameValueList::ProduceEnvFile()
750 {
751  // Put all name-value pairs in this list as a TEnv format.
752 
753  auto envfile = std::make_unique<KVEnv>();
754  envfile->SetValue("KVNameValueList.Name", GetName());
755  envfile->SetValue("KVNameValueList.Title", GetTitle());
756  WriteToEnv(envfile.get());
757  return envfile;
758 }
759 
760 
761 
764 
766 {
767  // Write all name-value pairs in this list as a TEnv format file.
768  auto envfile = ProduceEnvFile();
769  envfile->SetRcName(filename);
770  envfile->Save();
771 }
772 
773 
774 
775 
780 
782 {
783  // Concatenate this list with nvl.
784  //
785  // \note Any parameters with the same name in nvl will **replace** the corresponding parameters in this one
786 
787  TIter it(nvl.GetList());
788  KVNamedParameter* par = 0;
789  while ((par = (KVNamedParameter*)it())) SetValue(*par);
790 }
791 
792 
793 
799 
800 void KVNameValueList::WriteClass(const Char_t* classname, const Char_t* classdesc, const Char_t* base_class)
801 {
802  // Generate a class with member variables and `Get`/`Set` methods corresponding
803  // to the names and types of the parameters in the list.
804  //
805  // For booleans we implement methods Isxxxx()/SetIsxxx()
806 
807  KVClassFactory cf(classname, classdesc, base_class);
808  cf.AddGetSetMethods(*this);
809  cf.GenerateCode();
810 }
811 
812 
813 
820 
821 void KVNameValueList::SetFromEnv(TEnv* tenv, const TString& prefix)
822 {
823  // Update the values of any parameters in the KVNameValueList which are found
824  // in the TEnv, optionally using the given prefix.
825  //
826  // Example: if KVNameValueList contains a parameter `Legs` and if `prefix="Large"`,
827  // then if the TEnv contains a value `Large.Legs`, it will be used to update `Legs`
828 
829  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->Set(tenv, prefix);
830 }
831 
832 
833 
834 
838 
839 void KVNameValueList::WriteToEnv(TEnv* tenv, const TString& prefix)
840 {
841  // Write the values of all parameters in the KVNameValueList in the TEnv,
842  // optionally using the given prefix.
843 
844  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->WriteToEnv(tenv, prefix);
845 }
846 
847 
848 
855 
857 {
858  // Merge other list into this one.
859  //
860  // Any parameters in 'other' which do not exist in this one are added to this list.
861  //
862  // Any parameters which exist in both have their values summed (see KVNamedParameter::Add()).
863 
864  for (int i = 0; i < other.GetNpar(); ++i) {
865  KVNamedParameter* np_other = other.GetParameter(i);
866  AddValue(*np_other);
867  }
868 }
869 
870 
881 {
882  if (!GetNpar()) return "{}";
883 
884  TString output = "{";
885  KVString _options(opt);
886  _options.Begin("|");
887  auto option = _options.Next();
888  KVString exclude;
889  if (!_options.End()) exclude = _options.Next();
890  if (option == "64bit") {
891  for (Int_t ii = 0; ii < GetNpar(); ++ii) {
892  TString n(GetNameAt(ii));
893  if (n.EndsWith("_lo") || n.EndsWith("_hi")) {
894  n.Remove(n.Length() - 3, 3);
895  if (!exclude.Contains(n)) {
896  if (output != "{") output += ", ";
897  output += n + "=" + std::to_string(GetValue64bit(n));
898  }
899  ++ii;
900  }
901  }
902  output += "}";
903  return output;
904  }
905  for (Int_t ii = 0; ii < GetNpar(); ii += 1) {
906  if (output != "{") output += ", ";
907  output += GetParameter(ii)->List(option);
908  }
909  output += "}";
910  return output;
911 }
912 
913 
914 
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
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)