Loading [MathJax]/extensions/tex2jax.js
KaliVeda
Toolkit for HIC analysis
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Modules Pages
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 
10 using namespace std;
11 
13 
14 //______________________________________________
15 
16 
20  : fList(), fIgnoreBool(kFALSE)
21 {
22  // Default constructor
23  fList.SetOwner(kTRUE);
24 }
25 
26 
27 
37 
38 KVNameValueList::KVNameValueList(std::initializer_list<KVNamedParameter> l)
39 {
40  // Constructor using an initializer list for a given set of KVNamedParameter objects,
41  // i.e. this contructor makes it possible to do:
42  //
43  //~~~~{.cpp}
44  //KVNameValueList list{{"A",1.234},{"B",false},{"C","hello"}};
45  //
46  //KVNameValueList list2 = {{"A",1.234},{"B",false},{"C","hello"}};
47  //~~~~
48 
49  for (auto& p : l) SetValue(p);
50 }
51 
52 
53 
59 
61  : TNamed(name, title), fList(), fIgnoreBool(kFALSE)
62 {
63  // Ctor with name & title
64  //
65  // if name contains a comma-separated list of parameter/value pairs,
66  // it will be used to initialise the list (no name set)
68 
69  if (Set(name)) SetName("");
70 }
71 
72 
73 
76 
78 {
79  // Copy constructor
80  NVL.Copy(*this);
82 }
83 
84 
85 
88 
90 {
91  // Destructor
92  fList.Clear();// will delete objects in list if owner
93 }
94 
95 
96 
98 
100 {
101  if (&o != this) o.Copy(*this);
102  return (*this);
103 }
104 
105 
106 
130 
132 {
133  // If list contains a comma-separated list of parameter/value pairs
134  //
135  //~~~~~~~~~~~~~~~~~~~
136  //list = "param1=val1,param2=val2,..."
137  //~~~~~~~~~~~~~~~~~~~
138  //
139  // then use it to initialise the parameters of the list, and return true (any existing parameters will be removed).
140  //
141  // If list does not contain at least one '=' character, do nothing and return false.
142  //
143  // ### Note on deduction of parameter types
144  //
145  // The type of each parameter is deduced from the given values, using the following methods
146  // in the following order:
147  //
148  // + string in single quotes => string parameter (e.g. val="'7 9'")
149  // + KVString::IsDigit(val) => integer parameter if true (e.g. val="3" _or_ val="7 9")
150  // + KVString::IsFloat(val) => double parameter if true (e.g. val="3.14e+03")
151  // + all other cases => string parameter
152  //
153  // Note that in the case of the quoted string, the parameter is stored without the
154  // enclosing quotes (i.e. for val="'7 9'" the stored string is "7 9")
155 
156  if (!list.Contains("=")) return false;
157 
158  Clear();
159  list.Begin(",");
160  while (!list.End()) {
161  KVString pair = list.Next(kTRUE);
162  pair.Begin("=");
163  KVString parname = pair.Next(kTRUE);
164  KVString parval = pair.Next(kTRUE);
165  if (parval.BeginsWith("'") && parval.EndsWith("'")) {
166  // quoted string
167  parval.Remove(parval.Length() - 1);
168  parval.Remove(0, 1);
169  SetValue(parname, parval);
170  }
171  else if (parval.IsDigit()) {
172  // integer number
173  SetValue(parname, parval.Atoi());
174  }
175  else if (parval.IsFloat()) {
176  // real number
177  SetValue(parname, parval.Atof());
178  }
179  else {
180  // string
181  SetValue(parname, parval);
182  }
183  }
184  return true;
185 }
186 
187 
188 
197 
199 {
200  // Fill and return a string containing a comma-separated list of the parameter/value pairs
201  //
202  //~~~~~~~~~~~~~~~~~~~
203  //"param1=val1,param2=val2,..."
204  //~~~~~~~~~~~~~~~~~~~
205  //
206  // Such a string can be used with method Set() in order to initialize a copy of this list.
207 
208  KVString list;
209  for (auto& par : *this) {
210  if (list.Length()) list += ",";
211  list += Form("%s=", par.GetName());
212  if (par.IsString())
213  list += par.GetString();
214  else if (par.IsDouble())
215  list += Form("%g", par.GetDouble());
216  else if (par.IsInt())
217  list += Form("%d", par.GetInt());
218  }
219  return list;
220 }
221 
222 
223 
227 
229 {
230  //return the pointeur of the KVHashList where
231  //parameters are stored with their values
232  return (KVHashList*)&fList;
233 }
234 
235 
236 
240 
242 {
243  // Copy this to the nvl object.
244  // Any existing parameters will be destroyed
245 
246  TNamed::Copy(nvl);
247  KVNameValueList& _obj = (KVNameValueList&)nvl;
248  fList.Copy(_obj.fList);
249  _obj.fIgnoreBool = fIgnoreBool;
250 }
251 
252 
253 
257 
259 {
260  //Clear all the stored parameters
261  //Deletes the parameter objects if owner & opt!="nodelete"
262  fList.Clear(opt);
263 }
264 
265 
266 
272 
274 {
275  // Remove from list all parameters whose name matches the regular expression
276  // Examples:
277  // remove all parameters starting with "toto": TRegexp sel("^toto")
278  // remove all parameters with "toto" in name: TRegexp sel("toto")
279 
280  TList toBeRemoved;
281  Int_t np1 = GetNpar();
282  for (Int_t ii = 0; ii < np1; ii += 1) {
283  TString name = GetParameter(ii)->GetName();
284  if (name.Contains(sel)) toBeRemoved.Add(new TNamed(name.Data(), ""));
285  }
286  if (toBeRemoved.GetEntries()) {
287  TIter next(&toBeRemoved);
288  TNamed* tbr;
289  while ((tbr = (TNamed*)next())) RemoveParameter(tbr->GetName());
290  toBeRemoved.Delete();
291  }
292 }
293 
294 
295 
304 
306 {
307  // Print stored parameters (name, and value)
308  //
309  // Option can be used to select type of parameters to print:
310  // + option = "int", "double", "string", or "64bit"
311  //
312  // If you want to exclude 1 or more parameters, add "|name1,name2,..."
313  // after the option
314 
315  if (!GetNpar()) return;
316 
318  if(TString(GetName())!="" || TString(GetTitle())!="")
319  cout << "KVNameValueList::" << GetName() << " : " << GetTitle() << " (" << this << ")" << endl;
320  KVString _options(opt);
321  _options.Begin("|");
322  auto option = _options.Next();
323  KVString exclude;
324  if(!_options.End()) exclude=_options.Next();
325  if(option=="64bit")
326  {
328  for (Int_t ii = 0; ii < GetNpar(); ++ii)
329  {
330  TString n(GetNameAt(ii));
331  if(n.EndsWith("_lo") || n.EndsWith("_hi"))
332  {
333  n.Remove(n.Length()-3,3);
334  if(!exclude.Contains(n)){
336  std::cout << n << "=" << GetValue64bit(n) << std::endl;
337  }
338  ++ii;
339  }
340  }
342  return;
343  }
345  for (Int_t ii = 0; ii < GetNpar(); ii += 1)
346  {
347  GetParameter(ii)->ls(option);
348  }
350 }
351 
352 
353 
355 
357 {
358  if (TString(GetName()) != "") cout << GetName();
359  else cout << "KVNameValueList";
360  cout << " : ";
361  for (int i = 0; i < GetNpar(); ++i) {
362  cout << GetParameter(i)->GetName() << "=";
363  switch (GetParameter(i)->GetType()) {
365  cout << GetParameter(i)->GetDouble();
366  break;
368  cout << GetParameter(i)->GetInt();
369  break;
371  cout << GetParameter(i)->GetString();
372  break;
374  cout << boolalpha << GetParameter(i)->GetBool();
375  break;
376  }
377  if (i < GetNpar() - 1) cout << ",";
378  }
379  cout << endl;
380 }
381 
382 
383 
387 
389 {
390  //set if the KVNameValueList owns its objects or not
391  //by default it is owner
392  fList.SetOwner(enable);
393 }
394 
395 
396 
400 
402 {
403  //return kTRUE if the list owns its objects
404  //kFALSE if not
405  return fList.IsOwner();
406 }
407 
408 
409 
413 
415 {
416  // Compare the contents of two KVNameValueList
417  // Returns the number of same parameters (name and value)
418 
419  KVNameValueList* nvl = (KVNameValueList*)obj;
420  Int_t neq = 0;
421  Int_t np1 = GetNpar();
422  Int_t np2 = nvl->GetNpar();
423  for (Int_t ii = 0; ii < np1; ii += 1) {
424  for (Int_t jj = 0; jj < np2; jj += 1) {
425 
426  if (*(GetParameter(ii)) == *(GetParameter(jj))) neq += 1;
427  }
428  }
429  return neq;
430 
431 }
432 
433 
434 
437 
439 {
440  // add (or replace) a parameter with the same name, type & value as 'p'
441 
443  par ? par->Set(p.GetName(), p) : fList.Add(new KVNamedParameter(p));
444 
445 }
446 
447 
448 
452 
454 {
455  // Store a 64-bit integer in the list as two 32-bit parameters with
456  // names 'name_up' and 'name_lo'
457 
458  TString parname = name;
459  parname += "_hi";
460  SetValue(parname, (Int_t)(x >> 32));
461  parname = name;
462  parname += "_lo";
463  SetValue(parname, (Int_t)((x << 32) >> 32));
464 }
465 
466 
467 
471 
473 {
474  // Return a 64-bit integer stored as two 32-bit parameters with
475  // names 'name_up' and 'name_lo'
476 
477  ULong64_t lo, hi;
478  TString parname = name;
479  parname += "_lo";
480  lo = (UInt_t)GetIntValue(parname);
481  parname = name;
482  parname += "_hi";
483  hi = (UInt_t)GetIntValue(parname);
484  ULong64_t x = (ULong64_t)((hi << 32) + lo);
485  return x;
486 }
487 
488 
489 
493 
495 {
496  // Returns kTRUE if 'name' is stored as a 64-bit value i.e. if
497  // integer parameters 'name_lo' and 'name_hi' are defined
498 
499  TString parname_hi = name;
500  parname_hi += "_hi";
501  TString parname_lo = name;
502  parname_lo += "_lo";
503  return (HasIntParameter(parname_hi) && HasIntParameter(parname_lo));
504 }
505 
506 
507 
513 
515 {
516  // if a parameter with the same name & type as 'p' exists,
517  // add numerical value of p to value of parameter in list,
518  // or for strings we add to a comma-separated list of strings.
519  // otherwise, add a copy of p to list
521  par ? par->Add(p) : fList.Add(new KVNamedParameter(p));
522 }
523 
524 
525 
528 
530 {
531  //return the parameter object with the asking name
533 }
534 
535 
536 
539 
541 {
542  //return the parameter object with index idx
543  return (KVNamedParameter*)fList.At(idx);
544 }
545 
546 
547 
551 
553 {
554  //remove parameter from the list,
555  //Warning the TNamed object associated is deleted
556 
558  if (par) {
559  fList.Remove(par);
560  delete par;
561  }
562 }
563 
564 
565 
571 
573 {
574  //Check if there is a parameter with the asked name
575  //in the list
576  //kTRUE, parameter already present
577  //kFALSE, if not
578  return (FindParameter(name) != nullptr);
579 }
580 
581 
582 
587 
589 {
590  //return the position in the list of a given parameter
591  //using its name
592  //return -1 if no parameter with such name are present
593 
594  TObject* par = 0;
595  Int_t idx = 0;
596  TIter next(&fList);
597  while ((par = next())) {
598  if (!strcmp(par->GetName(), name)) return idx;
599  idx++;
600  }
601  Error("GetNameIndex", "Parameter \"%s\" not found, -1 returned", name);
602  return -1;
603 }
604 
605 
606 
612 
614 {
615  //return the name of the parameter store at the idx position
616  //in the list
617  //if the idx is greater than the number of stored parameters
618  //return empty string
619 
620  if (idx >= GetNpar()) {
621  Error("GetNameAt", "index has to be less than %d, empty string is returned", GetNpar());
622  return "";
623  }
624  return fList.At(idx)->GetName();
625 }
626 
627 
628 
633 
635 {
636  //return the value in TString format
637  //for a parameter using its name
638  //return string "-1" if no parameter with such name are present
639 
641  if (!par) {
642  Error("GetStringValue(const Char_t*)", "\"%s\" does not correspond to an existing parameter, default value \"-1\" is returned", name);
643  return "-1";
644  }
645  return par->GetTString();
646 }
647 
648 
649 
652 
654 {
655  //return the number of stored parameters
656  return fList.GetEntries();
657 }
658 
659 
660 
665 
667 {
668  //return the value in string format
669  //for a parameter using its position
670  //return -1 idx is greater than the number of stored parameters
671  static TString tmp("-1");
672  if (idx >= GetNpar()) {
673  Error("GetStringValue(Int_t)", "index has to be less than %d, \"-1\" is returned\n", GetNpar());
674  return tmp;
675  }
676  return GetParameter(idx)->GetTString();
677 }
678 
679 
680 
697 
699 {
700  // Read all name-value pairs in the TEnv format file and store in list.
701  // Clears any previously stored values.
702  //
703  // values are read as strings from the TEnv and we use
704  // TString::IsDigit, TString::IsFloat to decide whether to store
705  // them as integers, floats, or strings.
706  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
707  // (to disable this feature and read such values as strings, call
708  // SetIgnoreBool(kTRUE))
709  //
710  // Special case:
711  // if the parameter name contains the string NumberList
712  // then we store the value string as is, as in this case
713  // it is assumed to be the string representation of a
714  // KVNumberList (easily confused with floating point numbers)
715 
716  Clear();
717  KVEnv env_file;
718  Int_t status = env_file.ReadFile(filename, kEnvAll);
719  if (status == -1) {
720  Error("ReadEnvFile", "The file %s does not exist", filename);
721  return;
722  }
723  ReadEnv(env_file);
724 }
725 
726 
727 
744 
745 void KVNameValueList::ReadEnv(const TEnv &env_file)
746 {
747  // Read all name-value pairs in the TEnv format file and store in list.
748  // Clears any previously stored values.
749  //
750  // values are read as strings from the TEnv and we use
751  // TString::IsDigit, TString::IsFloat to decide whether to store
752  // them as integers, floats, or strings.
753  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
754  // (to disable this feature and read such values as strings, call
755  // SetIgnoreBool(kTRUE))
756  //
757  // Special case:
758  // if the parameter name contains the string NumberList
759  // then we store the value string as is, as in this case
760  // it is assumed to be the string representation of a
761  // KVNumberList (easily confused with floating point numbers)
762 
763  Clear();
764  THashList* name_value_list = env_file.GetTable();
765  TIter next_nv(name_value_list);
766  TEnvRec* nv_pair;
767  while ((nv_pair = (TEnvRec*)next_nv())) {
768  TString parname(nv_pair->GetName());
769  if (parname == "KVNameValueList.Name") SetName(nv_pair->GetValue());
770  else if (parname == "KVNameValueList.Title") SetTitle(nv_pair->GetValue());
771  else if (parname.Contains("NumberList")) SetValue(parname, nv_pair->GetValue());
772  else {
773  TString parval(nv_pair->GetValue());
774  if (parval.IsDigit()) SetValue(parname, parval.Atoi());
775  else if (parval.IsFloat()) SetValue(parname, parval.Atof());
776  else {
777  TString PARVAL(parval);
778  PARVAL.ToUpper();
779  if (!fIgnoreBool && (PARVAL == "TRUE" || PARVAL == "FALSE" || PARVAL == "ON" || PARVAL == "OFF"
780  || PARVAL == "YES" || PARVAL == "NO" || PARVAL == "OK" || PARVAL == "NOT"))
781  SetValue(parname, (Bool_t)env_file.GetValue(parname, 0));
782  else SetValue(parname, parval);
783  }
784  }
785  }
786 }
787 
788 
789 
793 
795 {
796  // Put all name-value pairs in this list as a TEnv format.
797  // delete after use
798  KVEnv* envfile = new KVEnv();
799  envfile->SetValue("KVNameValueList.Name", GetName());
800  envfile->SetValue("KVNameValueList.Title", GetTitle());
801  WriteToEnv(envfile);
802  return envfile;
803 }
804 
805 
806 
809 
811 {
812  // Write all name-value pairs in this list as a TEnv format file.
813  KVEnv* envfile = ProduceEnvFile();
814  envfile->SetRcName(filename);
815  envfile->Save();
816  delete envfile;
817 }
818 
819 
820 
821 
826 
828 {
829  // Concatenate this list with nvl.
830  //
831  // \note Any parameters with the same name in nvl will **replace** the corresponding parameters in this one
832 
833  TIter it(nvl.GetList());
834  KVNamedParameter* par = 0;
835  while ((par = (KVNamedParameter*)it())) SetValue(*par);
836 }
837 
838 
839 
844 
845 void KVNameValueList::WriteClass(const Char_t* classname, const Char_t* classdesc, const Char_t* base_class)
846 {
847  // Generate a class with member variables and Get/Set methods corresponding
848  // to the names and types of the parameters in the list
849  // For booleans we use Isxxxx/SetIsxxx
850 
851  KVClassFactory cf(classname, classdesc, base_class);
852  cf.AddGetSetMethods(*this);
853  cf.GenerateCode();
854 }
855 
856 
857 
863 
864 void KVNameValueList::SetFromEnv(TEnv* tenv, const TString& prefix)
865 {
866  // Update the values of any parameters in the KVNameValueList which are found
867  // in the TEnv, optionally using the given prefix.
868  // Example: if KVNameValueList contains a parameter "Legs" and if prefix="Large",
869  // then if the TEnv contains a value "Large.Legs", it will be used to update "Legs"
870 
871  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->Set(tenv, prefix);
872 }
873 
874 
875 
876 
880 
881 void KVNameValueList::WriteToEnv(TEnv* tenv, const TString& prefix)
882 {
883  // Write the values of all parameters in the KVNameValueList in the TEnv,
884  // optionally using the given prefix.
885 
886  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->WriteToEnv(tenv, prefix);
887 }
888 
889 
890 
897 
899 {
900  // Merge other list into this one.
901  //
902  // Any parameters in 'other' which do not exist in this one are added to this list.
903  //
904  // Any parameters which exist in both have their values summed (see KVNamedParameter::Add()).
905 
906  for (int i = 0; i < other.GetNpar(); ++i) {
907  KVNamedParameter* np_other = other.GetParameter(i);
908  AddValue(*np_other);
909  }
910 }
911 
912 
913 
914 
915 
916 
917 
918 
919 
920 
921 
922 
int Int_t
unsigned int UInt_t
bool Bool_t
char Char_t
constexpr Bool_t kFALSE
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:17
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)
virtual ~KVNameValueList()
Destructor.
Bool_t fIgnoreBool
do not convert "yes", "false", "on", etc. in TEnv file to boolean
Bool_t IsOwner() const
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
virtual void ReadEnv(const TEnv &)
virtual void ReadEnvFile(const Char_t *filename)
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 &)
KVNameValueList()
Default constructor.
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 SetOwner(Bool_t enable=kTRUE)
virtual KVEnv * ProduceEnvFile()
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
virtual void ClearSelection(TRegexp &)
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
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
Bool_t IsOwner() 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 void SetRcName(const char *name)
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
virtual void Save()
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
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)