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 
18 
20  : fList(), fIgnoreBool(kFALSE)
21 {
22  // Default constructor
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 address of the KVHashList where
231  //parameters are stored with their values
232  return (KVHashList*)&fList;
233 }
234 
235 
236 
241 
243 {
244  // Copy this to the nvl object.
245  //
246  // Any existing parameters will be destroyed
247 
248  TNamed::Copy(nvl);
249  KVNameValueList& _obj = (KVNameValueList&)nvl;
250  fList.Copy(_obj.fList);
251  _obj.fIgnoreBool = fIgnoreBool;
252 }
253 
254 
255 
260 
262 {
263  //Clear all the stored parameters
264  //
265  //Deletes the parameter objects if owner & opt!="nodelete"
266  fList.Clear(opt);
267 }
268 
269 
270 
277 
279 {
280  // Remove from list all parameters whose name matches the regular expression
281  //
282  // Examples:
283  // + remove all parameters starting with "toto": TRegexp sel("^toto")
284  // + remove all parameters with "toto" in name: TRegexp sel("toto")
285 
286  TList toBeRemoved;
287  Int_t np1 = GetNpar();
288  for (Int_t ii = 0; ii < np1; ii += 1) {
289  TString name = GetParameter(ii)->GetName();
290  if (name.Contains(sel)) toBeRemoved.Add(new TNamed(name.Data(), ""));
291  }
292  if (toBeRemoved.GetEntries()) {
293  TIter next(&toBeRemoved);
294  TNamed* tbr;
295  while ((tbr = (TNamed*)next())) RemoveParameter(tbr->GetName());
296  toBeRemoved.Delete();
297  }
298 }
299 
300 
301 
307 
309 {
310  // Print stored parameters (name, and value)
311  //
312  // \param[in] opt can be used to select type of parameters to print: `int`, `double`, `string`, `64bit`.
313  // If you want to exclude 1 or more parameters, add `|name1,name2,...` after the type
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") {
327  for (Int_t ii = 0; ii < GetNpar(); ++ii) {
328  TString n(GetNameAt(ii));
329  if (n.EndsWith("_lo") || n.EndsWith("_hi")) {
330  n.Remove(n.Length() - 3, 3);
331  if (!exclude.Contains(n)) {
333  std::cout << n << "=" << GetValue64bit(n) << std::endl;
334  }
335  ++ii;
336  }
337  }
339  return;
340  }
342  for (Int_t ii = 0; ii < GetNpar(); ii += 1) {
343  GetParameter(ii)->ls(option);
344  }
346 }
347 
348 
349 
351 
353 {
354  if (TString(GetName()) != "") cout << GetName();
355  else cout << "KVNameValueList";
356  cout << " : ";
357  for (int i = 0; i < GetNpar(); ++i) {
358  cout << GetParameter(i)->GetName() << "=";
359  switch (GetParameter(i)->GetType()) {
361  cout << GetParameter(i)->GetDouble();
362  break;
364  cout << GetParameter(i)->GetInt();
365  break;
367  cout << GetParameter(i)->GetString();
368  break;
370  cout << boolalpha << GetParameter(i)->GetBool();
371  break;
372  }
373  if (i < GetNpar() - 1) cout << ",";
374  }
375  cout << endl;
376 }
377 
378 
379 
383 
385 {
386  //set if the KVNameValueList owns its objects or not
387  //by default it is owner
388  fList.SetOwner(enable);
389 }
390 
391 
392 
396 
398 {
399  //return kTRUE if the list owns its objects
400  //kFALSE if not
401  return fList.IsOwner();
402 }
403 
404 
405 
409 
411 {
412  // Compare the contents of two KVNameValueList
413  // Returns the number of same parameters (name and value)
414 
415  KVNameValueList* nvl = (KVNameValueList*)obj;
416  Int_t neq = 0;
417  Int_t np1 = GetNpar();
418  Int_t np2 = nvl->GetNpar();
419  for (Int_t ii = 0; ii < np1; ii += 1) {
420  for (Int_t jj = 0; jj < np2; jj += 1) {
421 
422  if (*(GetParameter(ii)) == *(GetParameter(jj))) neq += 1;
423  }
424  }
425  return neq;
426 
427 }
428 
429 
430 
433 
435 {
436  // add (or replace) a parameter with the same name, type & value as 'p'
437 
439  par ? par->Set(p.GetName(), p) : fList.Add(new KVNamedParameter(p));
440 
441 }
442 
443 
444 
448 
450 {
451  // Store a 64-bit integer in the list as two 32-bit parameters with
452  // names 'name_up' and 'name_lo'
453 
454  TString parname = name;
455  parname += "_hi";
456  SetValue(parname, (Int_t)(x >> 32));
457  parname = name;
458  parname += "_lo";
459  SetValue(parname, (Int_t)((x << 32) >> 32));
460 }
461 
462 
463 
467 
469 {
470  // Return a 64-bit integer stored as two 32-bit parameters with
471  // names 'name_up' and 'name_lo'
472 
473  ULong64_t lo, hi;
474  TString parname = name;
475  parname += "_lo";
476  lo = (UInt_t)GetIntValue(parname);
477  parname = name;
478  parname += "_hi";
479  hi = (UInt_t)GetIntValue(parname);
480  ULong64_t x = (ULong64_t)((hi << 32) + lo);
481  return x;
482 }
483 
484 
485 
489 
491 {
492  // Returns kTRUE if 'name' is stored as a 64-bit value i.e. if
493  // integer parameters 'name_lo' and 'name_hi' are defined
494 
495  TString parname_hi = name;
496  parname_hi += "_hi";
497  TString parname_lo = name;
498  parname_lo += "_lo";
499  return (HasIntParameter(parname_hi) && HasIntParameter(parname_lo));
500 }
501 
502 
503 
509 
511 {
512  // if a parameter with the same name & type as 'p' exists,
513  // add numerical value of p to value of parameter in list,
514  // or for strings we add to a comma-separated list of strings.
515  // otherwise, add a copy of p to list
517  par ? par->Add(p) : fList.Add(new KVNamedParameter(p));
518 }
519 
520 
521 
524 
526 {
527  //return the parameter object with the asking name
529 }
530 
531 
532 
535 
537 {
538  //return the parameter object with index idx
539  return (KVNamedParameter*)fList.At(idx);
540 }
541 
542 
543 
547 
549 {
550  //remove parameter from the list,
551  //Warning the TNamed object associated is deleted
552 
554  if (par) {
555  fList.Remove(par);
556  delete par;
557  }
558 }
559 
560 
561 
567 
569 {
570  //Check if there is a parameter with the asked name
571  //in the list
572  //kTRUE, parameter already present
573  //kFALSE, if not
574  return (FindParameter(name) != nullptr);
575 }
576 
577 
578 
583 
585 {
586  //return the position in the list of a given parameter
587  //using its name
588  //return -1 if no parameter with such name are present
589 
590  TObject* par = 0;
591  Int_t idx = 0;
592  TIter next(&fList);
593  while ((par = next())) {
594  if (!strcmp(par->GetName(), name)) return idx;
595  idx++;
596  }
597  Error("GetNameIndex", "Parameter \"%s\" not found, -1 returned", name);
598  return -1;
599 }
600 
601 
602 
608 
610 {
611  //return the name of the parameter store at the idx position
612  //in the list
613  //if the idx is greater than the number of stored parameters
614  //return empty string
615 
616  if (idx >= GetNpar()) {
617  Error("GetNameAt", "index has to be less than %d, empty string is returned", GetNpar());
618  return "";
619  }
620  return fList.At(idx)->GetName();
621 }
622 
623 
624 
629 
631 {
632  //return the value in TString format
633  //for a parameter using its name
634  //return string "-1" if no parameter with such name are present
635 
637  if (!par) {
638  Error("GetStringValue(const Char_t*)", "\"%s\" does not correspond to an existing parameter, default value \"-1\" is returned", name);
639  return "-1";
640  }
641  return par->GetTString();
642 }
643 
644 
645 
648 
650 {
651  //return the number of stored parameters
652  return fList.GetEntries();
653 }
654 
655 
656 
661 
663 {
664  //return the value in string format
665  //for a parameter using its position
666  //return -1 idx is greater than the number of stored parameters
667  static TString tmp("-1");
668  if (idx >= GetNpar()) {
669  Error("GetStringValue(Int_t)", "index has to be less than %d, \"-1\" is returned\n", GetNpar());
670  return tmp;
671  }
672  return GetParameter(idx)->GetTString();
673 }
674 
675 
676 
693 
695 {
696  // Read all name-value pairs in the TEnv format file and store in list.
697  // Clears any previously stored values.
698  //
699  // values are read as strings from the TEnv and we use
700  // TString::IsDigit, TString::IsFloat to decide whether to store
701  // them as integers, floats, or strings.
702  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
703  // (to disable this feature and read such values as strings, call
704  // SetIgnoreBool(kTRUE))
705  //
706  // Special case:
707  // if the parameter name contains the string NumberList
708  // then we store the value string as is, as in this case
709  // it is assumed to be the string representation of a
710  // KVNumberList (easily confused with floating point numbers)
711 
712  Clear();
713  KVEnv env_file;
714  Int_t status = env_file.ReadFile(filename, kEnvAll);
715  if (status == -1) {
716  Error("ReadEnvFile", "The file %s does not exist", filename);
717  return;
718  }
719  ReadEnv(env_file);
720 }
721 
722 
723 
740 
741 void KVNameValueList::ReadEnv(const TEnv& env_file)
742 {
743  // Read all name-value pairs in the TEnv format file and store in list.
744  // Clears any previously stored values.
745  //
746  // Values are read as strings from the TEnv and we use
747  // TString::IsDigit(), TString::IsFloat() to decide whether to store
748  // them as integers, floats, or strings.
749  //
750  // Booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
751  // (to disable this feature and read such values as strings, call
752  // SetIgnoreBool(kTRUE))
753  //
754  // \note if the parameter name contains the string NumberList
755  // then we store the value string as is, as in this case
756  // it is assumed to be the string representation of a
757  // KVNumberList (easily confused with floating point numbers)
758 
759  Clear();
760  THashList* name_value_list = env_file.GetTable();
761  TIter next_nv(name_value_list);
762  TEnvRec* nv_pair;
763  while ((nv_pair = (TEnvRec*)next_nv())) {
764  TString parname(nv_pair->GetName());
765  if (parname == "KVNameValueList.Name") SetName(nv_pair->GetValue());
766  else if (parname == "KVNameValueList.Title") SetTitle(nv_pair->GetValue());
767  else if (parname.Contains("NumberList")) SetValue(parname, nv_pair->GetValue());
768  else {
769  TString parval(nv_pair->GetValue());
770  if (parval.IsDigit()) SetValue(parname, parval.Atoi());
771  else if (parval.IsFloat()) SetValue(parname, parval.Atof());
772  else {
773  TString PARVAL(parval);
774  PARVAL.ToUpper();
775  if (!fIgnoreBool && (PARVAL == "TRUE" || PARVAL == "FALSE" || PARVAL == "ON" || PARVAL == "OFF"
776  || PARVAL == "YES" || PARVAL == "NO" || PARVAL == "OK" || PARVAL == "NOT"))
777  SetValue(parname, (Bool_t)env_file.GetValue(parname, 0));
778  else SetValue(parname, parval);
779  }
780  }
781  }
782 }
783 
784 
785 
788 
789 std::unique_ptr<KVEnv> KVNameValueList::ProduceEnvFile()
790 {
791  // Put all name-value pairs in this list as a TEnv format.
792 
793  auto envfile = std::make_unique<KVEnv>();
794  envfile->SetValue("KVNameValueList.Name", GetName());
795  envfile->SetValue("KVNameValueList.Title", GetTitle());
796  WriteToEnv(envfile.get());
797  return envfile;
798 }
799 
800 
801 
804 
806 {
807  // Write all name-value pairs in this list as a TEnv format file.
808  auto envfile = ProduceEnvFile();
809  envfile->SetRcName(filename);
810  envfile->Save();
811 }
812 
813 
814 
815 
820 
822 {
823  // Concatenate this list with nvl.
824  //
825  // \note Any parameters with the same name in nvl will **replace** the corresponding parameters in this one
826 
827  TIter it(nvl.GetList());
828  KVNamedParameter* par = 0;
829  while ((par = (KVNamedParameter*)it())) SetValue(*par);
830 }
831 
832 
833 
839 
840 void KVNameValueList::WriteClass(const Char_t* classname, const Char_t* classdesc, const Char_t* base_class)
841 {
842  // Generate a class with member variables and `Get`/`Set` methods corresponding
843  // to the names and types of the parameters in the list.
844  //
845  // For booleans we implement methods Isxxxx()/SetIsxxx()
846 
847  KVClassFactory cf(classname, classdesc, base_class);
848  cf.AddGetSetMethods(*this);
849  cf.GenerateCode();
850 }
851 
852 
853 
860 
861 void KVNameValueList::SetFromEnv(TEnv* tenv, const TString& prefix)
862 {
863  // Update the values of any parameters in the KVNameValueList which are found
864  // in the TEnv, optionally using the given prefix.
865  //
866  // Example: if KVNameValueList contains a parameter `Legs` and if `prefix="Large"`,
867  // then if the TEnv contains a value `Large.Legs`, it will be used to update `Legs`
868 
869  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->Set(tenv, prefix);
870 }
871 
872 
873 
874 
878 
879 void KVNameValueList::WriteToEnv(TEnv* tenv, const TString& prefix)
880 {
881  // Write the values of all parameters in the KVNameValueList in the TEnv,
882  // optionally using the given prefix.
883 
884  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->WriteToEnv(tenv, prefix);
885 }
886 
887 
888 
895 
897 {
898  // Merge other list into this one.
899  //
900  // Any parameters in 'other' which do not exist in this one are added to this list.
901  //
902  // Any parameters which exist in both have their values summed (see KVNamedParameter::Add()).
903 
904  for (int i = 0; i < other.GetNpar(); ++i) {
905  KVNamedParameter* np_other = other.GetParameter(i);
906  AddValue(*np_other);
907  }
908 }
909 
910 
921 {
922  if (!GetNpar()) return "{}";
923 
924  TString output = "{";
925  KVString _options(opt);
926  _options.Begin("|");
927  auto option = _options.Next();
928  KVString exclude;
929  if (!_options.End()) exclude = _options.Next();
930  if (option == "64bit") {
931  for (Int_t ii = 0; ii < GetNpar(); ++ii) {
932  TString n(GetNameAt(ii));
933  if (n.EndsWith("_lo") || n.EndsWith("_hi")) {
934  n.Remove(n.Length() - 3, 3);
935  if (!exclude.Contains(n)) {
936  if (output != "{") output += ", ";
937  output += n + "=" + std::to_string(GetValue64bit(n));
938  }
939  ++ii;
940  }
941  }
942  output += "}";
943  return output;
944  }
945  for (Int_t ii = 0; ii < GetNpar(); ii += 1) {
946  if (output != "{") output += ", ";
947  output += GetParameter(ii)->List(option);
948  }
949  output += "}";
950  return output;
951 }
952 
953 
954 
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
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 &)
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)
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
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 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
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)