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 
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 
354 {
355  // Produce listing of stored parameters (name, and value) like:
356  //
357  // {PAR1=254295, PAR2=29524869, ...}
358  //
359  // Option can be used to select type of parameters to print:
360  // + option = "int", "double", "string", or "64bit"
361  //
362  // If you want to exclude 1 or more parameters, add "|name1,name2,..."
363  // after the option
364 
365  if (!GetNpar()) return "{}";
366 
367  TString output = "{";
368  KVString _options(opt);
369  _options.Begin("|");
370  auto option = _options.Next();
371  KVString exclude;
372  if(!_options.End()) exclude=_options.Next();
373  if(option=="64bit")
374  {
375  for (Int_t ii = 0; ii < GetNpar(); ++ii)
376  {
377  TString n(GetNameAt(ii));
378  if(n.EndsWith("_lo") || n.EndsWith("_hi"))
379  {
380  n.Remove(n.Length()-3,3);
381  if(!exclude.Contains(n)){
382  if(output!="{") output+=", ";
383  output += n+"="+std::to_string(GetValue64bit(n));
384  }
385  ++ii;
386  }
387  }
388  output+="}";
389  return output;
390  }
391  for (Int_t ii = 0; ii < GetNpar(); ii += 1)
392  {
393  if(output!="{") output+=", ";
394  output+=GetParameter(ii)->List(option);
395  }
396  output+="}";
397  return output;
398 }
399 
401 {
402  if (TString(GetName()) != "") cout << GetName();
403  else cout << "KVNameValueList";
404  cout << " : ";
405  for (int i = 0; i < GetNpar(); ++i) {
406  cout << GetParameter(i)->GetName() << "=";
407  switch (GetParameter(i)->GetType()) {
409  cout << GetParameter(i)->GetDouble();
410  break;
412  cout << GetParameter(i)->GetInt();
413  break;
415  cout << GetParameter(i)->GetString();
416  break;
418  cout << boolalpha << GetParameter(i)->GetBool();
419  break;
420  }
421  if (i < GetNpar() - 1) cout << ",";
422  }
423  cout << endl;
424 }
425 
426 //______________________________________________
428 {
429  //set if the KVNameValueList owns its objects or not
430  //by default it is owner
431  fList.SetOwner(enable);
432 }
433 
434 //______________________________________________
436 {
437  //return kTRUE if the list owns its objects
438  //kFALSE if not
439  return fList.IsOwner();
440 }
441 
442 //______________________________________________
444 {
445  // Compare the contents of two KVNameValueList
446  // Returns the number of same parameters (name and value)
447 
448  KVNameValueList* nvl = (KVNameValueList*)obj;
449  Int_t neq = 0;
450  Int_t np1 = GetNpar();
451  Int_t np2 = nvl->GetNpar();
452  for (Int_t ii = 0; ii < np1; ii += 1) {
453  for (Int_t jj = 0; jj < np2; jj += 1) {
454 
455  if (*(GetParameter(ii)) == *(GetParameter(jj))) neq += 1;
456  }
457  }
458  return neq;
459 
460 }
461 
463 {
464  // add (or replace) a parameter with the same name, type & value as 'p'
465 
467  par ? par->Set(p.GetName(), p) : fList.Add(new KVNamedParameter(p));
468 
469 }
470 
472 {
473  // Store a 64-bit integer in the list as two 32-bit parameters with
474  // names 'name_up' and 'name_lo'
475 
476  TString parname = name;
477  parname += "_hi";
478  SetValue(parname, (Int_t)(x >> 32));
479  parname = name;
480  parname += "_lo";
481  SetValue(parname, (Int_t)((x << 32) >> 32));
482 }
483 
485 {
486  // Return a 64-bit integer stored as two 32-bit parameters with
487  // names 'name_up' and 'name_lo'
488 
489  ULong64_t lo, hi;
490  TString parname = name;
491  parname += "_lo";
492  lo = (UInt_t)GetIntValue(parname);
493  parname = name;
494  parname += "_hi";
495  hi = (UInt_t)GetIntValue(parname);
496  ULong64_t x = (ULong64_t)((hi << 32) + lo);
497  return x;
498 }
499 
501 {
502  // Returns kTRUE if 'name' is stored as a 64-bit value i.e. if
503  // integer parameters 'name_lo' and 'name_hi' are defined
504 
505  TString parname_hi = name;
506  parname_hi += "_hi";
507  TString parname_lo = name;
508  parname_lo += "_lo";
509  return (HasIntParameter(parname_hi) && HasIntParameter(parname_lo));
510 }
511 
513 {
514  // if a parameter with the same name & type as 'p' exists,
515  // add numerical value of p to value of parameter in list,
516  // or for strings we add to a comma-separated list of strings.
517  // otherwise, add a copy of p to list
519  par ? par->Add(p) : fList.Add(new KVNamedParameter(p));
520 }
521 
522 //______________________________________________
524 {
525  //return the parameter object with the asking name
527 }
528 
530 {
531  //return the parameter object with index idx
532  return (KVNamedParameter*)fList.At(idx);
533 }
534 
535 //______________________________________________
537 {
538  //remove parameter from the list,
539  //Warning the TNamed object associated is deleted
540 
542  if (par) {
543  fList.Remove(par);
544  delete par;
545  }
546 }
547 
548 //______________________________________________
550 {
551  //Check if there is a parameter with the asked name
552  //in the list
553  //kTRUE, parameter already present
554  //kFALSE, if not
555  return (FindParameter(name) != nullptr);
556 }
557 
558 //______________________________________________
560 {
561  //return the position in the list of a given parameter
562  //using its name
563  //return -1 if no parameter with such name are present
564 
565  TObject* par = 0;
566  Int_t idx = 0;
567  TIter next(&fList);
568  while ((par = next())) {
569  if (!strcmp(par->GetName(), name)) return idx;
570  idx++;
571  }
572  Error("GetNameIndex", "Parameter \"%s\" not found, -1 returned", name);
573  return -1;
574 }
575 
576 //______________________________________________
578 {
579  //return the name of the parameter store at the idx position
580  //in the list
581  //if the idx is greater than the number of stored parameters
582  //return empty string
583 
584  if (idx >= GetNpar()) {
585  Error("GetNameAt", "index has to be less than %d, empty string is returned", GetNpar());
586  return "";
587  }
588  return fList.At(idx)->GetName();
589 }
590 
591 //______________________________________________
593 {
594  //return the value in TString format
595  //for a parameter using its name
596  //return string "-1" if no parameter with such name are present
597 
599  if (!par) {
600  Error("GetStringValue(const Char_t*)", "\"%s\" does not correspond to an existing parameter, default value \"-1\" is returned", name);
601  return "-1";
602  }
603  return par->GetTString();
604 }
605 
606 //______________________________________________
608 {
609  //return the number of stored parameters
610  return fList.GetEntries();
611 }
612 
613 //______________________________________________
615 {
616  //return the value in string format
617  //for a parameter using its position
618  //return -1 idx is greater than the number of stored parameters
619  static TString tmp("-1");
620  if (idx >= GetNpar()) {
621  Error("GetStringValue(Int_t)", "index has to be less than %d, \"-1\" is returned\n", GetNpar());
622  return tmp;
623  }
624  return GetParameter(idx)->GetTString();
625 }
626 
628 {
629  // Read all name-value pairs in the TEnv format file and store in list.
630  // Clears any previously stored values.
631  //
632  // values are read as strings from the TEnv and we use
633  // TString::IsDigit, TString::IsFloat to decide whether to store
634  // them as integers, floats, or strings.
635  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
636  // (to disable this feature and read such values as strings, call
637  // SetIgnoreBool(kTRUE))
638  //
639  // Special case:
640  // if the parameter name contains the string NumberList
641  // then we store the value string as is, as in this case
642  // it is assumed to be the string representation of a
643  // KVNumberList (easily confused with floating point numbers)
644 
645  Clear();
646  KVEnv env_file;
647  Int_t status = env_file.ReadFile(filename, kEnvAll);
648  if (status == -1) {
649  Error("ReadEnvFile", "The file %s does not exist", filename);
650  return;
651  }
652  ReadEnv(env_file);
653 }
654 
655 void KVNameValueList::ReadEnv(const TEnv &env_file)
656 {
657  // Read all name-value pairs in the TEnv format file and store in list.
658  // Clears any previously stored values.
659  //
660  // values are read as strings from the TEnv and we use
661  // TString::IsDigit, TString::IsFloat to decide whether to store
662  // them as integers, floats, or strings.
663  // booleans are recognized as: TRUE, FALSE, ON, OFF, YES, NO, OK, NOT
664  // (to disable this feature and read such values as strings, call
665  // SetIgnoreBool(kTRUE))
666  //
667  // Special case:
668  // if the parameter name contains the string NumberList
669  // then we store the value string as is, as in this case
670  // it is assumed to be the string representation of a
671  // KVNumberList (easily confused with floating point numbers)
672 
673  Clear();
674  THashList* name_value_list = env_file.GetTable();
675  TIter next_nv(name_value_list);
676  TEnvRec* nv_pair;
677  while ((nv_pair = (TEnvRec*)next_nv())) {
678  TString parname(nv_pair->GetName());
679  if (parname == "KVNameValueList.Name") SetName(nv_pair->GetValue());
680  else if (parname == "KVNameValueList.Title") SetTitle(nv_pair->GetValue());
681  else if (parname.Contains("NumberList")) SetValue(parname, nv_pair->GetValue());
682  else {
683  TString parval(nv_pair->GetValue());
684  if (parval.IsDigit()) SetValue(parname, parval.Atoi());
685  else if (parval.IsFloat()) SetValue(parname, parval.Atof());
686  else {
687  TString PARVAL(parval);
688  PARVAL.ToUpper();
689  if (!fIgnoreBool && (PARVAL == "TRUE" || PARVAL == "FALSE" || PARVAL == "ON" || PARVAL == "OFF"
690  || PARVAL == "YES" || PARVAL == "NO" || PARVAL == "OK" || PARVAL == "NOT"))
691  SetValue(parname, (Bool_t)env_file.GetValue(parname, 0));
692  else SetValue(parname, parval);
693  }
694  }
695  }
696 }
697 
699 {
700  // Put all name-value pairs in this list as a TEnv format.
701  // delete after use
702  KVEnv* envfile = new KVEnv();
703  envfile->SetValue("KVNameValueList.Name", GetName());
704  envfile->SetValue("KVNameValueList.Title", GetTitle());
705  WriteToEnv(envfile);
706  return envfile;
707 }
708 
710 {
711  // Write all name-value pairs in this list as a TEnv format file.
712  KVEnv* envfile = ProduceEnvFile();
713  envfile->SetRcName(filename);
714  envfile->Save();
715  delete envfile;
716 }
717 
718 
720 {
721  // Concatenate this list with nvl.
722  //
723  // \note Any parameters with the same name in nvl will **replace** the corresponding parameters in this one
724 
725  TIter it(nvl.GetList());
726  KVNamedParameter* par = 0;
727  while ((par = (KVNamedParameter*)it())) SetValue(*par);
728 }
729 
730 void KVNameValueList::WriteClass(const Char_t* classname, const Char_t* classdesc, const Char_t* base_class)
731 {
732  // Generate a class with member variables and Get/Set methods corresponding
733  // to the names and types of the parameters in the list
734  // For booleans we use Isxxxx/SetIsxxx
735 
736  KVClassFactory cf(classname, classdesc, base_class);
737  cf.AddGetSetMethods(*this);
738  cf.GenerateCode();
739 }
740 
741 void KVNameValueList::SetFromEnv(TEnv* tenv, const TString& prefix)
742 {
743  // Update the values of any parameters in the KVNameValueList which are found
744  // in the TEnv, optionally using the given prefix.
745  // Example: if KVNameValueList contains a parameter "Legs" and if prefix="Large",
746  // then if the TEnv contains a value "Large.Legs", it will be used to update "Legs"
747 
748  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->Set(tenv, prefix);
749 }
750 
751 
752 void KVNameValueList::WriteToEnv(TEnv* tenv, const TString& prefix)
753 {
754  // Write the values of all parameters in the KVNameValueList in the TEnv,
755  // optionally using the given prefix.
756 
757  for (int i = 0; i < GetNpar(); ++i) GetParameter(i)->WriteToEnv(tenv, prefix);
758 }
759 
761 {
762  // Merge other list into this one.
763  //
764  // Any parameters in 'other' which do not exist in this one are added to this list.
765  //
766  // Any parameters which exist in both have their values summed (see KVNamedParameter::Add()).
767 
768  for (int i = 0; i < other.GetNpar(); ++i) {
769  KVNamedParameter* np_other = other.GetParameter(i);
770  AddValue(*np_other);
771  }
772 }
773 
774 
775 
776 
777 
778 
779 
780 
781 
782 
783 
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
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
virtual void ReadEnv(const TEnv &)
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)
Int_t GetNameIndex(const Char_t *name) const
void Merge(const KVNameValueList &)
KVNameValueList()
Default constructor.
KVNamedParameter * FindParameter(const Char_t *name) const
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
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 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)